Thursday, December 12, 2013

A Quick Regular Expression (Regex) to Pull Colors From a CSS Stylesheet


This one's mostly for my quick personal reference. It wasn't hard by any means but figured someone else might find it useful.

Problem

I need to find all hex color codes in a style sheet so I can extract them.

Solution
I came up with a quick Regex (regular expression) to do this:

#([A-Fa-f0-9]*);

Essentially, it just looks for a pound symbol (#), followed by any amount of numbers 0-9 or letters a-f, followed by a semi-colon.

If you're interested to try it, you can view my example over at Regex Tester.

It's not the slickest but it got the job done quickly.

Happy coding!

Wednesday, December 04, 2013

Touched by a Peripheral: Logitech T650 Review [A must-have]

Summary: I thought this device would be inconsequential, but it makes a world of difference. The T650 is a top-notch device so far, and between the great experience with this and my Logitech K750 Keyboard, Logitech has cemented itself as my brand of choice for peripherals going forward. Brand loyalty to a company that makes keyboards and mice -- I would not have foreseen that. As of this writing, it's $47 on Amazon -- down from around $70. I can't recommend it highly enough.

I don't talk a lot about products on here. It's never really been my schtick. Aside from beginning to catalog my desktop PC rebuilding adventure, I was never really into gadget reviews and the like.

But this little square device came along and changed all that.

Below are some rough, bulleted notes because I just couldn't contain my gushing.

Unboxing Impressions

  • Small box -- wonder if the surface area will be smaller than I thought.
  • Nope -- box just fits very snugly. The packaging reminded me of Apple's while remaining distinct -- it was sleek, easy to open, intuitive, and showcased the product.
  • And man, does the T650 look good. It looks so simple that it's hard for me to anticipate how powerful my first experiences will be with it.
  • It looks solid. The single square design gives a feeling that not much could go wrong with it in the way of hardware. I'm not nervous to plunk it down.
  • A special point needs to be made of their USB cabling. I don't know why all USB cabling doesn't come like the cabling on this device. The cable has clips strung all along it that allow the ends to clip into specific places and the coil to clip into itself as it coils. This makes it super easy to wrap, unwrap, and store. I'll be looking into whether a company makes these sorts of clips for other cables, and if so, I must have them.
Overall, the first impressions I get are those of simplicity, innovation, and power. Kind of a sweet spot for gadgets.

Initial setup

Wow, was that easy and fast. To install the device I:
  • Turned it on (it ships with some charge) by sliding the power forward.
  • Opened my Logitech unifying software (already installed from my K750)
  • Turned the touchpad off and on again
  • Let it download all the necessary components
  • Clicked finish.
After that, and the obligatory "would you like to register your device", I was done.

Tutorials abound -- in the quick-start manual, the Unifying software, etc. However, I found a barely needed them. A few a-ha moments when using different swipes and I was off to the races.

There is nothing I find cumbersome with the touchpad so far. Copy/Paste, middle click, dragging and dropping, right-clicking, etc. have all come easy while orienting myself.

Usage

While I've just started, I can already feel the power of this in day-to-day use.

I'm moving my wrist so much less, which feels better, though I have no opinion/science on whether it's truly ergonomically better.

Charging is easy as well. The device has a small light that pulses when it's charging, and shines red when the battery is low. And it's beautiful to use this device in its wired capacity. I could have dealt with a cable but the wireless setup really completes the package.

Overall

Kudos, Logitech. Your commitment to product and user experience shines through well here. The unboxing was easy, the setup was almost nonexistent it was so simple, your software gets out of my way, your instructions are clear, and your device is solid, intuitive, and well executed, from the device itself to the USB cable it ships with. 

I'm really glad I got this device. 

References

Monday, December 02, 2013

Solved: Visual Studio sometimes loses Intellisense with ReSharper 8.x [Field Notes]

Problem 

Sometimes, for whatever reason, Intellisense will go away in Visual Studio while using ReSharper.

This is a bummer, because Intellisense is a huge help, and very easy to take for granted until its gone.

Resolution

Some folks reported having to close and reopen Visual Studio to get this to work, but I was able to fix it in the following way:


  1. From the ReSharper Menu, choose "Options"

  1. From the Intellisense Menu, choose "General":

  1. Ensure that "ReSharper" is selected, so you get all that extra goodness:

  1. Click "Save":

At this point, ReSharper appears to refresh its settings and this kicks Intellisense back into action.

Monday, November 25, 2013

UI/UX Joy of the Day: ContinuousTests.com Visual Studio Add-In

When you don't have code coverage for a number of tests in a class:


Using JSHint with Underscore.js in Visual Studio 2012 [Field Notes]

Since my new gig has me diving into Javascript quite a bit, I've really been loving JSHint integration (brought to us lovingly by Mads Kristensen and the team building the Web Essentials 2012 add-on).

Firstly: The Cool Feature that Caused my Issue -- Global Variables

One of my favorite features of JSHint is that it will tell you when you're using a variable that hasn't been defined yet. This does wonders for reducing scoping issues, etc.

But, when referencing browser functionality or variables from other files (think console.log, ko, moment, toastr, etc.) it would see them as undefined:

Yiiiikes.
Luckily, this can be fixed for most issues by utilizing the "global" command in a comment. JSLint will interpret the following as "assume all of these variables are defined":


This saves so many validation headaches.

The Problem: Identifying UnderscoreJS as a Global Variable

However, when I add the Underscore.js global identifier ("_", unsurprisingly) to the global list, I get a different error -- "Unexpected dangling '_' in '_'":

Why can't I just let it dangle?
The Solution: the "nomen" Option

One line of code removed this error:
/*jslint nomen: true */
According to the JSLint options documentation, this allows underscores to begin a name. In the case of underscore, the '_' definition is both the beginning and end of the name (similar to jQuery's "$").

Cautions & Some Tiny Pitfalls

Had a few minor "oops" moments while figuring this out.

Ensure that the nomen option is set before your Globals are Defined

This won't work:

/*global $, jQuery, ko, moment, console, toastr, accounting, _ */
/*jslint nomen: true */

But this will:

/*jslint nomen: true */
/*global $, jQuery, ko, moment, console, toastr, accounting, _ */

JSHint says "nomen" will be deprecated. 

I kind of hope that's not the case, since it helps here.

There has been some back and forth on the JSHint Github about this, but the JSHint options page for "nomen" makes it pretty clear:

This option disallows the use of dangling _ in variables. We don't know why would you need it.

If you were a little new to this, as I was, I hope this helps! Feel free to send some feedback in the comments.

References

Sunday, November 24, 2013

How to: Fix error 0x80041010 on Windows 8.1 + Hyper-V

After upgrading to Windows 8.1 Pro recently, I opened my Event Log to show a TON of errors from WMI. Event showed as an error and had the following text:

Event filter with query "SELECT * FROM __InstanceOperationEvent WITHIN 10 WHERE (TargetInstance ISA 'Msvm_ExternalEthernetPort') OR (TargetInstance ISA 'Msvm_VmLANEndpoint') OR (TargetInstance ISA 'Msvm_SyntheticEthernetPort') OR (TargetInstance ISA 'Msvm_ComputerSystem') OR (TargetInstance ISA 'Msvm_VLANEndpointSettingData')" could not be reactivated in namespace "//./root/virtualization" because of error 0x80041010. Events cannot be delivered through this filter until the problem is corrected.

I did a little searching around and found this link which suggested removing the network adapter and installing 8.1's default network adapter.

However, I decided to see if an update to the latest drivers would do the trick.

I have the P8Z68 V/Pro motherboard (which I love), which comes with an Intel 82579V card. I hopped over to the Intel Download Center and found the Windows 8.1 Network Adapter Driver v18.7 (direct link here).

Sure enough, installing the updated version of the adapter was enough -- no need to replace it with the generic Windows 8.1 adapter. The errors have stopped and I'm seeing a performance gain as well. 

If you were experiencing the same issue, I hope this helps! Feel free to let me know how you fared in the comments.

References

Tuesday, September 10, 2013

Plaintext Password Offender: Jitbit Helpdesk

Just signed up for the Jitbit Helpdesk support site so that I could report an issue with their product.

Lo and behold, the following appears in my inbox:


Uncool, Jitbit, uncool. I'll be looking to move my company away from your products at some point.

Tuesday, July 09, 2013

Problem Solved: Windows 8 Windows Update Freezes on KB2760600, "Security Update for Microsoft OneNote 2010"

Ran into this today; thought I'd document it for others.

Problem

When installing Windows Updates on Windows 8, it seems to stall while processing the following update:

"Security Update for Microsoft OneNote 2010 (KB2760600) 32-Bit Edition"

Solution

Per this conversion on a Microsoft forum, run task manager and close "spoolsv.exe".

The update should finish shortly thereafter without issue.

References

KB2760600 - not installing [Microsoft Community]

Sunday, May 26, 2013

Minecraft Tekkit Lite Earth Map as a Service [Nerd Fun]

I have a little time to kill this holiday weekend and wanted to try something fun (at least before it gets warm enough to go outside for the rest of the day). Some friends and I have been playing Tekkit Lite off and on, and being the resident IT geek, I'm hosting the server.

I'm going to set up my own Tekkit Lite server, using the 1:1500 Earth Map, and running as a service on my machine.

Before You Begin

  • Lock down your machine. This is important. If you're hosting on your own server, it's going to have to involve some port forwarding and letting the internet into your machine. Lock it down with appropriate firewall knowledge. If you don't do this, then you're going to have a terrible time at some point.
  • Get a FreeDNS account at afraid.org. Your machine has an IP that might change, and if you're not paying for a domain name, getting one of their free subdomains is an easy way to allow access to your machine without having to give our your IP every time it changes.
  • Do all of the proper port forwarding. I'm not going to explain that here, as it's different for every ISP/router. If you don't know how to port forward and port trigger, look it up elsewhere first (unless you want to just play by yourself. Which is a little sad.)

Obtaining the Software

Initial Setup

  • Extract the LetLente! Earth maps. This will take a while.
  • Extract the Tekkit Lite Server Files. Use 7-Zip or Windows to Extract the Zip files.
  • Extract the yajsw files.
  • Rename the Tekkit Lite folder to the name of your server (I called mine "MinecraftServer_EarthMap")
  • In the root of the Tekkit Lite folder, there is a server.properties file. Configure it according to however you'd like the world to be. See this wiki page as a starting guide. 
  • I suggest at least setting your player handle as an op in the ops.txt file as well.
  • If you have multiple servers running, be sure to set the "server-port" option in server.properties.
  • In your server folder, create a folder called "world".
  • Copy the Earth map files into that "world" folder.
  • Create a folder called "service".
  • Copy the yajsw files into the "service" folder. (I recommend copying the files so that you can go service --> yajsw --> [files]. Remove the second layer of 'yajsw' folder that gets extracted.)
  • Run launch.bat to start up the server. Make sure there aren't any fatal errors.
  • Open your Technic Launcher and try to connect to "localhost:25565" (the default port). You should be able to see the world and connect to it.
  • Once you can connect to the world, exit it but don't shut down the launch.bat window.

The Server Becomes the Service

Now that we have a working installation, we want to make this a legitimate service that runs all the time in the background.
  • Copy your server files to "Program Files". I do this because it's a really good way to ensure that you don't delete them when you clear out your downloads folder.
  • Find the PID of your server. I recommend using a tool like procexp to view all your processes. You need to find the "java.exe" process that is running the Tekkit Lite server. It will likely be something like "java  -Xmx3G -Xms2G -jar TekkitLite.jar nogui". The PID for this will be a number (procexp is helpful and lists it for you). 
  • Generate your wrapper.conf file. Open a command prompt and navigate to the yajsw\bat directory. (e.g. your minecraft server\service\yajsw\bat). Run "genConfig [pid]", where you replace [pid] with the process ID.
    • e.g. if the PID you found was 1234, you'd run "genConfig 1234".
    • This will create the wrapper.conf file that you need.
  • Edit your generated wrapper.conf file. In the yajsw folder, find the "conf" directory and edit the "wrapper.conf" file. You need to make the following changes:
    • Memory Levels: At the end of the file, you'll see "wrapper.java.additional.1" = "-Xmx3G" or some variant. "-Xmx" is the maximum memory. "-Xms" is the minimum memory. the 3G, 2G etc. represent x GB of memory (hence the G). Adjust these to your desired values.
    • No GUI: Ensure that the "wrapper.app.parameter.1 = nogui" is present. This is what will stop a window from needing to show up when the service is running.
    • Working Directory: Make sure that "wrapper.working.dir" is set to the directory of your server (it normally is by default since the generator does it for you.)
      • For example, with my server called "MinecraftServer_EarthMap", the line reads "wrapper.working.dir=C:\\Program Files\\MinecraftServer_EarthMap\\"
    • Service Name: This is what will appear on your "Services" screen. 
      • Change "wrapper.ntservice.name=yajsw" to the name of your server.
        • e.g. "wrapper.ntservice.name=MinecraftServer_EarthMap
      • Change wrapper.ntservice.displayname as well.
      • Change wrapper.ntservice.description as well.
    • Auto Start: If you want to set the service to auto start (and I did), un-comment the "wrapper.netservice.starttype" line, which will set it to auto-start.
      • To un-comment, just remove the pound ("#") sign and space in front of the line.

Finishing the Service Installation

  • Open a new command prompt.
  • Navigate to your service\yajsw\bat folder and run "installService.bat". It should complete without errors.

Starting it up!

  • Open the services window. You can do this via control panel or typing "services.msc" into your start window.
  • Find your service name.
  • Right-click the service and select "Start".
  • Open your client and connect.

If you try this, let me know how it works out for you in the comments. Happy gaming!

Saturday, March 16, 2013

Mr. Rogers: Can you say hero?

Update: As promised, I'm updating this to include Tom Junod's response. He notes that the profile is  available in the Esquire collection of profiles entitled "Great Men" at Byliner. At $3.99 it appears to be a fantastic deal. I'll be purchasing, and I hope you will, too. If he asks me to remove the text below, I'll be doing so, but I hope he'll let us continue to read it here as well.

-----

In 1998, Tom Junod wrote an article for Esquire -- a beautiful profile of an incredible person, Mr. Rogers. I was lucky enough to stumble across it, and for a few minutes I was transported to a world and a feeling I didn't know I'd missed.

I've reproduced it from the site I originally found it on here in its entirety for easy reading. I've asked him for a place to link to the article. I was unable to find a copy on the Esquire site, but original links to my source articles are here: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8.

If you enjoyed being transported like I did, let's think about how we can better create Mr. Rogers' world. 

----


ONCE UPON A TIME, a little boy loved a stuffed animal whose name was Old Rabbit. It was so old, in fact, that it was really an unstuffed animal; so old that even back then, with the little boy's brain still nice and fresh, he had no memory of it as "Young Rabbit," or even "Rabbit"; so old that Old Rabbit was barely a rabbit at all but rather a greasy hunk of skin without eyes and ears, with a single red stitch where its tongue used to be. The little boy didn't know why he loved Old Rabbit; he just did, and the night he threw it out the car window was the night he learned how to pray. He would grow up to become a great prayer, this little boy, but only intermittently, only fitfully, praying only when fear and desperation drove him to it, and the night he threw Old Rabbit into the darkness was the night that set the pattern, the night that taught him how. He prayed for Old Rabbit's safe return, and when, hours later, his mother and father came home with the filthy, precious strip of rabbity roadkill, he learned not only that prayers are sometimes answered but also the kind of severe effort they entail, the kind of endless frantic summoning. And so when he threw Old Rabbit out the car window the next time, it was gone for good.

YOU WERE A CHILD ONCE, TOO. That's what Mister Rogers said, that's what he wrote down, once upon a time, for the doctors. The doctors were ophthalmologists. An ophthalmologist is a doctor who takes care of the eyes. Sometimes, ophthalmologists have to take care of the eyes of children, and some children get very scared, because children know that their world disappears when their eyes close, and they can be afraid that the ophthalmologists will make their eyes close forever. The ophthalmologists did not want to scare children, so they asked Mister Rogers for help, and Mister Rogers agreed to write a chapter for a book the ophthalmologists were putting together—a chapter about what other ophthalmologists could do to calm the children who came to their offices. Because Mister Rogers is such a busy man, however, he could not write the chapter himself, and he asked a woman who worked for him to write it instead. She worked very hard at writing the chapter, until one day she showed what she had written to Mister Rogers, who read it and crossed it all out and wrote a sentence addressed directly to the doctors who would be reading it: "You were a child once, too."

And that's how the chapter began.

THE OLD NAVY-BLUE SPORT JACKET comes off first, then the dress shoes, except that now there is not the famous sweater or the famous sneakers to replace them, and so after the shoes he's on to the dark socks, peeling them off and showing the blanched skin of his narrow feet. The tie is next, the scanty black batwing of a bow tie hand-tied at his slender throat, and then the shirt, always white or light blue, whisked from his body button by button. He wears an undershirt, of course, but no matter—soon that's gone, too, as is the belt, as are the beige trousers, until his undershorts stand as the last impediment to his nakedness. They are boxers, egg-colored, and to rid himself of them he bends at the waist, and stands on one leg, and hops, and lifts one knee toward his chest and then the other and then… Mister Rogers has no clothes on.

Nearly every morning of his life, Mister Rogers has gone swimming, and now, here he is, standing in a locker room, seventy years old and as white as the Easter Bunny, rimed with frost wherever he has hair, gnawed pink in the spots where his dry skin has gone to flaking, slightly wattled at the neck, slightly stooped at the shoulder, slightly sunken in the chest, slightly curvy at the hips, slightly pigeoned at the toes, slightly aswing at the fine bobbing nest of himself… and yet when he speaks, it is in that voice, his voice, the famous one, the unmistakable one, the televised one, the voice dressed in sweater and sneakers, the soft one, the reassuring one, the curious and expository one, the sly voice that sounds adult to the ears of children and childish to the ears of adults, and what he says, in the midst of all his bobbing nudity, is as understated as it is obvious: "Well, Tom, I guess you've already gotten a deeper glimpse into my daily routine than most people have."

ONCE UPON A TIME, a long time ago, a man took off his jacket and put on a sweater. Then he took off his shoes and put on a pair of sneakers. His name was Fred Rogers. He was starting a television program, aimed at children, called Mister Rogers' Neighborhood. He had been on television before, but only as the voices and movements of puppets, on a program called The Children's Corner. Now he was stepping in front of the camera as Mister Rogers, and he wanted to do things right, and whatever he did right, he wanted to repeat. And so, once upon a time, Fred Rogers took off his jacket and put on a sweater his mother had made him, a cardigan with a zipper. Then he took off his shoes and put on a pair of navy-blue canvas boating sneakers. He did the same thing the next day, and then the next…until he had done the same things, those things, 865 times, at the beginning of 865 television programs, over a span of thirty-one years. The first time I met Mister Rogers, he told me a story of how deeply his simple gestures had been felt, and received. He had just come back from visiting Koko, the gorilla who has learned—or who has been taught—American Sign Language. Koko watches television. Koko watches Mister Rogers' Neighborhood, and when Mister Rogers, in his sweater and sneakers, entered the place where she lives, Koko immediately folded him in her long, black arms, as though he were a child, and then … "She took my shoes off, Tom," Mister Rogers said.

Koko was much bigger than Mister Rogers. She weighed 280 pounds, and Mister Rogers weighed 143. Koko weighed 280 pounds because she is a gorilla, and Mister Rogers weighed 143 pounds because he has weighed 143 pounds as long as he has been Mister Rogers, because once upon a time, around thirty-one years ago, Mister Rogers stepped on a scale, and the scale told him that Mister Rogers weighs 143 pounds. No, not that he weighed 143 pounds, but that he weighs 143 pounds…. And so, every day, Mister Rogers refuses to do anything that would make his weight change—he neither drinks, nor smokes, nor eats flesh of any kind, nor goes to bed late at night, nor sleeps late in the morning, nor even watches television—and every morning, when he swims, he steps on a scale in his bathing suit and his bathing cap and his goggles, and the scale tells him that he weighs 143 pounds. This has happened so many times that Mister Rogers has come to see that number as a gift, as a destiny fulfilled, because, as he says, "the number 143 means 'I love you.' It takes one letter to say 'I' and four letters to say 'love' and three letters to say 'you.' One hundred and forty-three. 'I love you.' Isn't that wonderful?"

THE FIRST TIME I CALLED MISTER ROGERS on the telephone, I woke him up from his nap. He takes a nap every day in the late afternoon—just as he wakes up every morning at five-thirty to read and study and write and pray for the legions who have requested his prayers; just as he goes to bed at nine-thirty at night and sleeps eight hours without interruption. On this afternoon, the end of a hot, yellow day in New York City, he was very tired, and when I asked if I could go to his apartment and see him, he paused for a moment and said shyly, "Well, Tom, I'm in my bathrobe, if you don't mind." I told him I didn't mind, and when, five minutes later, I took the elevator to his floor, well, sure enough, there was Mister Rogers, silver-haired, standing in the golden door at the end of the hallway and wearing eyeglasses and suede moccasins with rawhide laces and a flimsy old blue-and-yellow bathrobe that revealed whatever part of his skinny white calves his dark-blue dress socks didn't hide. "Welcome, Tom," he said with a slight bow, and bade me follow him inside, where he lay down—no, stretched out, as though he had known me all his life—on a couch upholstered with gold velveteen. He rested his head on a small pillow and kept his eyes closed while he explained that he had bought the apartment thirty years before for $11,000 and kept it for whenever he came to New York on business for the Neighborhood. I sat in an old armchair and looked around. The place was drab and dim, with the smell of stalled air and a stain of daguerreotype sunlight on its closed, slatted blinds, and Mister Rogers looked so at home in its gloomy familiarity that I thought he was going to fall back asleep when suddenly the phone rang, startling him. "Oh, hello, my dear," he said when he picked it up, and then he said that he had a visitor, someone who wanted to learn more about the Neighborhood. "Would you like to speak to him?" he asked, and then handed me the phone. "It's Joanne," he said. I took the phone and spoke to a woman—his wife, the mother of his two sons—whose voice was hearty and almost whooping in its forthrightness and who spoke to me as though she had known me for a long time and was making the effort to keep up the acquaintance. When I handed him back the phone, he said, "Bye, my dear," and hung up and curled on the couch like a cat, with his bare calves swirled underneath him and one of his hands gripping his ankle, so that he looked as languorous as an odalisque. There was an energy to him, however, a fearlessness, an unashamed insistence on intimacy, and though I tried to ask him questions about himself, he always turned the questions back on me, and when I finally got him to talk about the puppets that were the comfort of his lonely boyhood, he looked at me, his gray-blue eyes at once mild and steady, and asked, "What about you, Tom? Did you have any special friends growing up?"

"Special friends?"

"Yes," he said. "Maybe a puppet, or a special toy, or maybe just a stuffed animal you loved very much. Did you have a special friend like that, Tom?"

"Yes, Mister Rogers."

"Did your special friend have a name, Tom?"

"Yes, Mister Rogers. His name was Old Rabbit."

"Old Rabbit. Oh, and I'll bet the two of you were together since he was a very young rabbit. Would you like to tell me about Old Rabbit, Tom?"



And it was just about then, when I was spilling the beans about my special friend, that Mister Rogers rose from his corner of the couch and stood suddenly in front of me with a small black camera in hand. "Can I take your picture, Tom?" he asked. "I'd like to take your picture. I like to take pictures of all my new friends, so that I can show them to Joanne...." And then, in the dark room, there was a wallop of white light, and Mister Rogers disappeared behind it.

ONCE UPON A TIME, there was a boy who didn't like himself very much. It was not his fault. He was born with cerebral palsy. Cerebral palsy is something that happens to the brain. It means that you can think but sometimes can't walk, or even talk. This boy had a very bad case of cerebral palsy, and when he was still a little boy, some of the people entrusted to take care of him took advantage of him instead and did things to him that made him think that he was a very bad little boy, because only a bad little boy would have to live with the things he had to live with. In fact, when the little boy grew up to be a teenager, he would get so mad at himself that he would hit himself, hard, with his own fists and tell his mother, on the computer he used for a mouth, that he didn't want to live anymore, for he was sure that God didn't like what was inside him any more than he did. He had always loved Mister Rogers, though, and now, even when he was fourteen years old, he watched the Neighborhood whenever it was on, and the boy's mother sometimes thought that Mister Rogers was keeping her son alive. She and the boy lived together in a city in California, and although she wanted very much for her son to meet Mister Rogers, she knew that he was far too disabled to travel all the way to Pittsburgh, so she figured he would never meet his hero, until one day she learned through a special foundation designed to help children like her son that Mister Rogers was coming to California and that after he visited the gorilla named Koko, he was coming to meet her son.

At first, the boy was made very nervous by the thought that Mister Rogers was visiting him. He was so nervous, in fact, that when Mister Rogers did visit, he got mad at himself and began hating himself and hitting himself, and his mother had to take him to another room and talk to him. Mister Rogers didn't leave, though. He wanted something from the boy, and Mister Rogers never leaves when he wants something from somebody. He just waited patiently, and when the boy came back, Mister Rogers talked to him, and then he made his request. He said, "I would like you to do something for me. Would you do something for me?" On his computer, the boy answered yes, of course, he would do anything for Mister Rogers, so then Mister Rogers said, "I would like you to pray for me. Will you pray for me?" And now the boy didn't know how to respond. He was thunderstruck. Thunderstruck means that you can't talk, because something has happened that's as sudden and as miraculous and maybe as scary as a bolt of lightning, and all you can do is listen to the rumble. The boy was thunderstruck because nobody had ever asked him for something like that, ever. The boy had always been prayed for. The boy had always been the object of prayer, and now he was being asked to pray for Mister Rogers, and although at first he didn't know if he could do it, he said he would, he said he'd try, and ever since then he keeps Mister Rogers in his prayers and doesn't talk about wanting to die anymore, because he figures Mister Rogers is close to God, and if Mister Rogers likes him, that must mean God likes him, too.


As for Mister Rogers himself…well, he doesn't look at the story in the same way that the boy did or that I did. In fact, when Mister Rogers first told me the story, I complimented him on being so smart—for knowing that asking the boy for his prayers would make the boy feel better about himself—and Mister Rogers responded by looking at me at first with puzzlement and then with surprise. "Oh, heavens no, Tom! I didn't ask him for his prayers for him; I asked for me. I asked him because I think that anyone who has gone through challenges like that must be very close to God. I asked him because I wanted his intercession."

ON DECEMBER 1, 1997—oh, heck, once upon a time—a boy, no longer little, told his friends to watch out, that he was going to do something "really big" the next day at school, and the next day at school he took his gun and his ammo and his earplugs and shot eight classmates who had clustered for a prayer meeting. Three died, and they were still children, almost. The shootings took place in West Paducah, Kentucky, and when Mister Rogers heard about them, he said, "Oh, wouldn't the world be a different place if he had said, 'I'm going to do something really little tomorrow,'" and he decided to dedicate a week of the Neighborhood to the theme "Little and Big." He wanted to tell children that what starts out little can sometimes become big, and so that could devote themselves to little dreams without feeling bad about them. But how could Mister Rogers show little becoming big, and vice versa? That was a challenge. He couldn't just say it, the way he could always just say to the children who watch his program that they are special to him, or even sing it, the way he would always sing "It's You I Like" and "Everybody's Fancy" and "It's Such a Good Feeling" and "Many Ways to Say I Love You" and "Sometimes People Are Good." No, he had to show it, he had to demonstrate it, and that's how Mister Rogers and the people who work for him eventually got the idea of coming to New York City to visit a woman named Maya Lin.

Maya Lin is a famous architect. Architects are people who create big things from the little designs they draw on pieces of paper. Most famous architects are famous for creating big famous buildings, but Maya Lin is more famous for creating big fancy things for people to look at, and in fact, when Mister Rogers had gone to her studio the day before, he looked at the pictures she had drawn of the clock that is now on the ceiling of a place in New York called Penn Station. A clock is a machine that tells people what time it is, but as Mister Rogers sat in the backseat of an old station wagon hired to take him from his apartment to Penn Station, he worried that Maya Lin's clock might be too fancy and that the children who watch the Neighborhood might not understand it. Mister Rogers always worries about things like that, because he always worries about children, and when his station wagon stopped in traffic next to a bus stop, he read aloud the advertisement of an airline trying to push its international service. "Hmmm," Mister Rogers said, "that's a strange ad. 'Most people think of us as a great domestic airline. We hate that.' Hmmm. Hate is such a strong word to use so lightly. If they can hate something like that, you wonder how easy it would be for them to hate something more important." He was with his producer, Margy Whitmer. He had makeup on his face and a dollop of black dye combed into his silver hair. He was wearing beige pants, a blue dress shirt, a tie, dark socks, a pair of dark-blue boating sneakers, and a purple, zippered cardigan. He looked very little in the backseat of the car. Then the car stopped on Thirty-fourth Street, in front of the escalators leading down to the station, and when the doors opened—

—he turned into Mister F*** Rogers. This was not a bad thing, however, because he was in New York, and in New York it's not an insult to be called Mister ** Anything. In fact, it's an honorific. An honorific is what people call you when they respect you, and the moment Mister Rogers got out of the car, people wouldn't stay away from him, they respected him so much. Oh, Margy Whitmer tried to keep people away from him, tried to tell people that if they gave her their names and addresses, Mister Rogers would send them an autographed picture, but every time she turned around, there was Mister Rogers putting his arms around someone, or wiping the tears off someone's cheek, or passing around the picture of someone's child, or getting on his knees to talk to a child. Margy couldn't stop them, and she couldn't stop him. "Oh, Mister Rogers, thank you for my childhood." "Oh, Mister Rogers, you're the father I never had." "Oh, Mister Rogers, would you please just hug me?" After a while, Margy just rolled her eyes and gave up, because it's always like this with Mister Rogers, because the thing that people don't understand about him is that he's greedy for this—greedy for the grace that people offer him. What is grace? He doesn't even know. He can't define it. This is a man who loves the simplifying force of definitions, and yet all he knows of grace is how he gets it; all he knows is that he gets it from God, through man. And so in Penn Station, where he was surrounded by men and women and children, he had this power, like a comic-book superhero who absorbs the energy of others until he bursts out of his shirt.


If Mister Rogers can tell me how to read that clock, I'll watch his show every day for a year"—that's what someone in the crowd said while watching Mister Rogers and Maya Lin crane their necks at Maya Lin's big fancy clock, but it didn't even matter whether Mister Rogers could read the clock or not, because every time he looked at it, with the television cameras on him, he leaned back from his waist and opened his mouth wide with astonishment, like someone trying to catch a peanut he had tossed into the air, until it became clear that Mister Rogers could show that he was astonished all day if he had to, or even forever, because Mister Rogers lives in a state of astonishment, and the astonishment he showed when he looked at the clock was the same astonishment he showed when people—absolute strangers—walked up to him and fed his hungry ear with their whispers, and he turned to me, with an open, abashed mouth, and said, "Oh, Tom, if you could only hear the stories I hear!"

ONCE UPON A TIME, Mister Rogers went to New York City and got caught in the rain. He didn't have an umbrella, and he couldn't find a taxi, either, so he ducked with a friend into the subway and got on one of the trains. It was late in the day, and the train was crowded with children who were going home from school. Though of all races, the schoolchildren were mostly black and Latino, and they didn't even approach Mister Rogers and ask him for his autograph. They just sang. They sang, all at once, all together, the song he sings at the start of his program, "Won't You Be My Neighbor?" and turned the clattering train into a single soft, runaway choir.

HE FINDS ME, OF COURSE, AT PENN STATION. He finds me, because that's what Mister Rogers does—he looks, and then he finds. I'm standing against a wall, listening to a bunch of mooks from Long Island discuss the strange word—a foreign word—he has written down on each of the autographs he gave them. First mook: "He says it's the Greek word for grace." Second mook: "Huh. That's cool. I'm glad I know that. Now, what is grace?" First mook: "Looks like you're gonna have to break down and buy a dictionary." Second mook: "What I'm buying is a ticket to the Lotto. I just met Mister Rogers—this is definitely my lucky day." I'm listening to these guys when, from thirty feet away, I notice Mister Rogers looking around for someone and know, immediately, that he is looking for me. He is on one knee in front of a little girl who is hoarding, in her arms, a small stuffed animal, sky-blue, a bunny.

"Remind you of anyone, Tom?" he says when I approach the two of them. He is not speaking of the little girl.

"Yes, Mister Rogers."

"Looks a bit like…Old Rabbit, doesn't it, Tom?"

"Yes, Mister Rogers."

"I thought so." Then he turns back to the little girl. "This man's name is Tom. When he was your age, he had a rabbit, too, and he loved it very much. Its name was Old Rabbit. What is yours named?"

The little girl eyes me suspiciously, and then Mister Rogers. She goes a little knock-kneed, directs a thumb toward her mouth. "Bunny Wunny," she says.


"Oh, that's a nice name," Mister Rogers says, and then goes to the Thirty-fourth Street escalator to climb it one last time for the cameras. When he reaches the street, he looks right at the lens, as he always does, and says, speaking of the Neighborhood, "Let's go back to my place," and then makes a right turn toward Seventh Avenue, except that this time he just keeps going, and suddenly Margy Whitmer is saying, "Where is Fred? Where is Fred?" and Fred, he's a hundred yards away, in his sneakers and his purple sweater, and the only thing anyone sees of him is his gray head bobbing up and down amid all the other heads, the hundreds of them, the thousands, the millions, disappearing into the city and its swelter.

ONCE UPON A TIME, a little boy with a big sword went into battle against Mister Rogers. Or maybe, if the truth be told, Mister Rogers went into battle against a little boy with a big sword, for Mister Rogers didn't like the big sword. It was one of those swords that really isn't a sword at all; it was a big plastic contraption with lights and sound effects, and it was the kind of sword used in defense of the universe by the heroes of the television shows that the little boy liked to watch. The little boy with the big sword did not watch Mister Rogers. In fact, the little boy with the big sword didn't know who Mister Rogers was, and so when Mister Rogers knelt down in front of him, the little boy with the big sword looked past him and through him, and when Mister Rogers said, "Oh, my, that's a big sword you have," the boy didn't answer, and finally his mother got embarrassed and said, "Oh, honey, c'mon, that's Mister Rogers," and felt his head for fever. Of course, she knew who Mister Rogers was, because she had grown up with him, and she knew that he was good for her son, and so now, with her little boy zombie-eyed under his blond bangs, she apologized, saying to Mister Rogers that she knew he was in a rush and that she knew he was here in Penn Station taping his program and that her son usually wasn't like this, he was probably just tired…. Except that Mister Rogers wasn't going anywhere. Yes, sure, he was taping, and right there, in Penn Station in New York City, were rings of other children wiggling in wait for him, but right now his patient gray eyes were fixed on the little boy with the big sword, and so he stayed there, on one knee, until the little boy's eyes finally focused on Mister Rogers, and he said, "It's not a sword; it's a death ray." A death ray! Oh, honey, Mommy knew you could do it….And so now, encouraged, Mommy said, "Do you want to give Mister Rogers a hug, honey?" But the boy was shaking his head no, and Mister Rogers was sneaking his face past the big sword and the armor of the little boy's eyes and whispering something in his ear—something that, while not changing his mind about the hug, made the little boy look at Mister Rogers in a new way, with the eyes of a child at last, and nod his head yes.

We were heading back to his apartment in a taxi when I asked him what he had said.

"Oh, I just knew that whenever you see a little boy carrying something like that, it means that he wants to show people that he's strong on the outside.

"I just wanted to let him know that he was strong on the inside, too.

"And so that's what I told him.

"I said, 'Do you know that you're strong on the inside, too?' "

"Maybe it was something he needed to hear."

HE WAS BARELY MORE THAN A BOY himself when he learned what he would be fighting for, and fighting against, for the rest of his life. He was in college. He was a music major at a small school in Florida and planning to go to seminary upon graduation. His name was Fred Rogers. He came home to Latrobe, Pennsylvania, once upon a time, and his parents, because they were wealthy, had bought something new for the corner room of their big redbrick house. It was a television. Fred turned it on, and as he says now, with plaintive distaste, "there were people throwing pies at one another." He was the soft son of overprotective parents, but he believed, right then, that he was strong enough to enter into battle with that—that machine, that medium—and to wrestle with it until it yielded to him, until the ground touched by its blue shadow became hallowed and this thing called television came to be used "for the broadcasting of grace through the land." It would not be easy, no—for in order to win such a battle, he would have to forbid himself the privilege of stopping, and whatever he did right he would have to repeat, as though he were already living in eternity. And so it was that the puppets he employed on The Children's Corner would be the puppets he employed forty-four years later, and so it was that once he took off his jacket and his shoes…well, he was Mister Rogers for good. And even now, when he is producing only three weeks' worth of new programs a year, he still winds up agonizing—agonizing—about whether to announce his theme as "Little and Big" or "Big and Little" and still makes only two edits per televised minute, because he doesn't want his message to be determined by the cuts and splices in a piece of tape—to become, despite all his fierce coherence, "a message of fragmentation."


He is losing, of course. The revolution he started—a half hour a day, five days a week—it wasn't enough, it didn't spread, and so, forced to fight his battles alone, Mister Rogers is losing, as we all are losing. He is losing to it, to our twenty-four-hour-a-day pie fight, to the dizzying cut and the disorienting edit, to the message of fragmentation, to the flicker and pulse and shudder and strobe, to the constant, hivey drone of the electroculture…and yet still he fights, deathly afraid that the medium he chose is consuming the very things he tried to protect: childhood and silence. Yes, at seventy years old and 143 pounds, Mister Rogers still fights, and indeed, early this year, when television handed him its highest honor, he responded by telling television—gently, of course—to just shut up for once, and television listened. He had already won his third Daytime Emmy, and now he went onstage to accept Emmy's Lifetime Achievement Award, and there, in front of all the soap-opera stars and talk-show sinceratrons, in front of all the jutting man-tanned jaws and jutting saltwater bosoms, he made his small bow and said into the microphone, "All of us have special ones who have loved us into being. Would you just take, along with me, ten seconds to think of the people who have helped you become who you are….Ten seconds of silence." And then he lifted his wrist, and looked at the audience, and looked at his watch, and said softly, "I'll watch the time," and there was, at first, a small whoop from the crowd, a giddy, strangled hiccup of laughter, as people realized that he wasn't kidding, that Mister Rogers was not some convenient eunuch but rather a man, an authority figure who actually expected them to do what he asked…and so they did. One second, two seconds, three seconds…and now the jaws clenched, and the bosoms heaved, and the mascara ran, and the tears fell upon the beglittered gathering like rain leaking down a crystal chandelier, and Mister Rogers finally looked up from his watch and said, "May God be with you" to all his vanquished children.

ONCE UPON A TIME, there was a little boy born blind, and so, defenseless in the world, he suffered the abuses of the defenseless, and when he grew up and became a man, he looked back and realized that he'd had no childhood at all, and that if he were ever to have a childhood, he would have to start having it now, in his forties. So the first thing he did was rechristen himself "Joybubbles"; the second thing he did was declare himself five years old forever; and the third thing he did was make a pilgrimage to Pittsburgh, where the University of Pittsburgh's Information Sciences Library keeps a Mister Rogers archive. It has all 865 programs, in both color and black and white, and for two months this past spring, Joybubbles went to the library every day for ten hours and watched the Neighborhood's every episode, plus specials—or, since he is blind, listened to every episode, imagined every episode. Until one night, Mister Rogers came to him, in what he calls a visitation—"I was dreaming, but I was awake"—and offered to teach him how to pray.

"But Mister Rogers, I can't pray," Joybubbles said, "because every time I try to pray, I forget the words."

"I know that," Mister Rogers said, "and that's why the prayer I'm going to teach you has only three words."

"What prayer is that, Mister Rogers? What kind of prayer has only three words?"

THE WALLS OF MISTER ROGERS' neighborhood are light blue and fleeced with clouds. They are tall—as tall as the cinder-block walls they are designed to hide—and they encompass the Neighborhood's entire stage set, from the flimsy yellow house where Mister Rogers comes to visit, to the closet where he finds his sweaters, to the Neighborhood of Make-Believe, where he goes to dream. The blue walls are the ends of the daylit universe he has made, and yet Mister Rogers can't see them—or at least can't know them—because he was born blind to color. He doesn't know the color of his walls, and one day, when I caught him looking toward his painted skies, I asked him to tell me what color they are, and he said, "I imagine they're blue, Tom." Then he looked at me and smiled. "I imagine they're blue."


He has spent thirty-one years imagining and reimagining those walls—the walls that have both penned him in and set him free. You would think it would be easy by now, being Mister Rogers; you would think that one morning he would wake up and think, Okay, all I have to do is be nice for my allotted half hour today, and then I'll just take the rest of the day off….But no, Mister Rogers is a stubborn man, and so on the day I ask about the color of his sky, he has already gotten up at five-thirty, already prayed for those who have asked for his prayers, already read, already written, already swum, already weighed himself, already sent out cards for the birthdays he never forgets, already called any number of people who depend on him for comfort, already cried when he read the letter of a mother whose child was buried with a picture of Mister Rogers in his casket, already played for twenty minutes with an autistic boy who has come, with his father, all the way from Boise, Idaho, to meet him. The boy had never spoken, until one day he said, "X the Owl," which is the name of one of Mister Rogers's puppets, and he had never looked his father in the eye until one day his father had said, "Let's go to the Neighborhood of Make-Believe," and now the boy is speaking and reading, and the father has come to thank Mister Rogers for saving his son's life….And by this time, well, it's nine-thirty in the morning, time for Mister Rogers to take off his jacket and his shoes and put on his sweater and his sneakers and start taping another visit to the Neighborhood. He writes all his own scripts, but on this day, when he receives a visit from Mrs. McFeely and a springer spaniel, she says that she has to bring the dog "back to his owner," and Mister Rogers makes a face. The cameras stop, and he says, "I don't like the word owner there. It's not a good word. Let's change it to 'bring the dog home.'" And so the change is made, and the taping resumes, and this is how it goes all day, a life unfolding within a clasp of unfathomable governance, and once, when I lose sight of him, I ask Margy Whitmer where he is, and she says, "Right over your shoulder, where he always is," and when I turn around, Mister Rogers is facing me, child-stealthy, with a small black camera in his hand, to take another picture for the album that he will give me when I take my leave of him.
Yes, it should be easy being Mister Rogers, but when four o'clock rolls around, well, Mister Rogers is tired, and so he sneaks over to the piano and starts playing, with dexterous, pale fingers, the music that used to end a 1940s newsreel and that has now become the music he plays to signal to the cast and crew that a day's taping has wrapped. On this day, however, he is premature by a considerable extent, and so Margy, who has been with Mister Rogers since 1983—because nobody who works for Mister Rogers ever leaves the Neighborhood—comes running over, papers in hand, and says, "Not so fast there, buster."

"Oh, please, sister," Mister Rogers says. "I'm done."

And now Margy comes up behind him and massages his shoulders. "No, you're not," she says. "Roy Rogers is done. Mister Rogers still has a ways to go."


HE WAS A CHILD ONCE, TOO, and so one day I asked him if I could go with him back to Latrobe. He thought about it for a second, then said, by way of agreement, "Okay, then—tomorrow, Tom, I'll show you childhood." Not his childhood, mind you, or even a childhood—no, just "childhood." And so the next morning, we swam together, and then he put on his boxer shorts and the dark socks, and the T-shirt, and the gray trousers, and the belt, and then the white dress shirt and the black bow tie and the gray suit jacket, and about two hours later we were pulling up to the big brick house on Weldon Street in Latrobe, and Mister Rogers was thinking about going inside.

There was nobody home. The doors were open, unlocked, because the house was undergoing a renovation of some kind, but the owners were away, and Mister Rogers's boyhood home was empty of everyone but workmen. "Do you think we can go in?" he asked Bill Isler, president of Family Communications, the company that produces Mister Rogers' Neighborhood. Bill had driven us there, and now, sitting behind the wheel of his red Grand Cherokee, he was full of remonstrance. "No!" he said. "Fred, they're not home. If we wanted to go into the house, we should have called first. Fred…" But Mister Rogers was out of the car, with his camera in his hand and his legs moving so fast that the material of his gray suit pants furled and unfurled around both of his skinny legs, like flags exploding in a breeze. And here, as he made his way through thickets of bewildered workmen—this skinny old man dressed in a gray suit and a bow tie, with his hands on his hips and his arms akimbo, like a dance instructor—there was some kind of wiggly jazz in his legs, and he went flying all around the outside of the house, pointing at windows, saying there was the room where he learned to play the piano, and there was the room where he saw the pie fight on a primitive television, and there was the room where his beloved father died…until finally we reached the front door. He put his hand on the knob; he cracked it open, but then, with Bill Isler calling caution from the car, he said, "Maybe we shouldn't go in. And all the people who made this house special to me are not here, anyway. They're all in heaven."


And so we went to the graveyard. We were heading there all along, because Mister Rogers loves graveyards, and so as we took the long, straight road out of sad, fading Latrobe, you could still feel the speed in him, the hurry, as he mustered up a sad anticipation, and when we passed through the cemetery gates, he smiled as he said to Bill Isler, "The plot's at the end of the yellow-brick road." And so it was; the asphalt ended, and then we began bouncing over a road of old blond bricks, until even that road ended, and we were parked in front of the place where Mister Rogers is to be buried. He got out of the car, and, moving as quickly as he had moved to the door of his house, he stepped up a small hill to the door of a large gray mausoleum, a huge structure built for six, with a slightly peaked roof, and bronze doors, and angels living in the stained glass. He peeked in the window, and in the same voice he uses on television, that voice, at once so patient and so eager, he pointed out each crypt, saying "There's my father, and there's my mother, and there, on the left, is my place, and right across will be Joanne...." The window was of darkened glass, though, and so to see through it, we had to press our faces close against it, and where the glass had warped away from the frame of the door—where there was a finger-wide crack—Mister Rogers's voice leaked into his grave, and came back to us as a soft, hollow echo.
And then he was on the move again, happily, quickly, for he would not leave until he showed me all the places of all those who'd loved him into being. His grandfather, his grandmother, his uncles, his aunts, his father-in-law and mother-in-law, even his family's servants—he went to each grave, and spoke their names, and told their stories, until finally I headed back down to the Jeep and turned back around to see Mister Rogers standing high on a green dell, smiling among the stones. "And now if you don't mind," he said without a hint of shame or embarrassment, "I have to find a place to relieve myself," and then off he went, this ecstatic ascetic, to take a proud piss in his corner of heaven.

ONCE UPON A TIME, a man named Fred Rogers decided that he wanted to live in heaven. Heaven is the place where good people go when they die, but this man, Fred Rogers, didn't want to go to heaven; he wanted to live in heaven, here, now, in this world, and so one day, when he was talking about all the people he had loved in this life, he looked at me and said, "The connections we make in the course of a life—maybe that's what heaven is, Tom. We make so many connections here on earth. Look at us—I've just met you, but I'm investing in who you are and who you will be, and I can't help it."

The next afternoon, I went to his office in Pittsburgh. He was sitting on a couch, under a framed rendering of the Greek word for grace and a biblical phrase written in Hebrew that means "I am my beloved's, and my beloved is mine." A woman was with him, sitting in a big chair. Her name was Deb. She was very pretty. She had a long face and a dark blush to her skin. She had curls in her hair and stars at the centers of her eyes. She was a minister at Fred Rogers's church. She spent much of her time tending to the sick and the dying. Fred Rogers loved her very much, and so, out of nowhere, he smiled and put his hand over hers. "Will you be with me when I die?" he asked her, and when she said yes, he said, "Oh, thank you, my dear." Then, with his hand still over hers and his eyes looking straight into hers, he said, "Deb, do you know what a great prayer you are? Do you know that about yourself? Your prayers are just wonderful." Then he looked at me. I was sitting in a small chair by the door, and he said, "Tom, would you close the door, please?" I closed the door and sat back down. "Thanks, my dear," he said to me, then turned back to Deb. "Now, Deb, I'd like to ask you a favor," he said. "Would you lead us? Would you lead us in prayer?"

Deb stiffened for a second, and she let out a breath, and her color got deeper. "Oh, I don't know, Fred," she said. "I don't know if I want to put on a performance…."

Fred never stopped looking at her or let go of her hand. "It's not a performance. It's just a meeting of friends," he said. He moved his hand from her wrist to her palm and extended his other hand to me. I took it and then put my hand around her free hand. His hand was warm, hers was cool, and we bowed our heads, and closed our eyes, and I heard Deb's voice calling out for the grace of God. What is grace? I'm not certain; all I know is that my heart felt like a spike, and then, in that room, it opened and felt like an umbrella. I had never prayed like that before, ever. I had always been a great prayer, a powerful one, but only fitfully, only out of guilt, only when fear and desperation drove me to it…and it hit me, right then, with my eyes closed, that this was the moment Fred Rogers—Mister Rogers—had been leading me to from the moment he answered the door of his apartment in his bathrobe and asked me about Old Rabbit. Once upon a time, you see, I lost something, and prayed to get it back, but when I lost it the second time, I didn't, and now this was it, the missing word, the unuttered promise, the prayer I'd been waiting to say a very long time.

"Thank you, God," Mister Rogers said.






Tuesday, February 26, 2013

Crystal Reports Gotchas: Spinning Wheel Forever? Check for Hidden Error Messages. [Field Notes]

Problem

When attempting to run a report from Crystal Reports Server 2008, the "processing data" wheel seems to be stuck in an infinite spin. On a server with constrained resources, this might seem to be a processing speed issue. This only happens with a specific report.

Solution

  • Open and log into Crystal Reports Server InfoView
  • In InfoView, click on Preferneces. 
  • Click the arrow next to the Crystal Report section to drop it down.
  • For the "default view format" option, choose "Web Java" (Java Required).
  • Run the report again.
Doing this revealed a hidden error message for me. The other two modes appear to infinitely process the report, but "web java" mode revealed an error in the report very quickly.

This led me on a goose chase for hours the other day, so I hope someone else might benefit.

Monday, February 18, 2013

How To: Keep Cross-references Updated in Microsoft Word [Field Notes]

Problem

I was writing a Microsoft Word document and making use of cross-references, when I realized that upon changing the text/title of my cross reference, the links to that reference would not update their text. This led to me having to right-click each reference and choose "Update".

That was not going to fly.

Solution

A quick Google revealed the solution to me:

F9 is the magic key in Word to update cross-references, so selecting the entire document (via CTRL + A) and then pressing F9 gets the job done.

Monday, January 28, 2013

How To: Use PowerCLI to find (and disconnect) all CD Drives on VMs [Field Notes]

Problem

VMs that leave ISOs mounted cause problems. I'd like to find all the VMs that have CD-ROM drives loaded with ISOs, look over that list, and then remove them if necessary.

Solution (NOTE: Update)

The first solution I provided here wasn't that great, so I'm updating this post. The original contents have been changed because they previously would disconnect the entire CD-ROM drive, vs. just unmounting the ISO. As you can imagine, pulling the equivalent of ripping a CD-ROM drive out while a machine is running can cause some interesting behavior. The solution below outlines a much better way to do this.

Two one-line PowerCLI scripts will help us with this.

Firstly, to search for all Connected CD-ROMs for all VMs:

 Get-VM | Where-Object {$_.PowerState –eq “PoweredOn”} | Get-CDDrive | FT Parent, IsoPath

And as long as there aren't any you need to keep up, you can just select them all and then set the state to "No Media" for each CD-Drive:

Get-VM | Where-Object {$_.PowerState –eq “PoweredOn”} | Get-CDDrive | Set-CDDrive -NoMedia -Confirm:$False

Note the -Confirm:$False to allow it to just proceed with what it needs to do.

How To: Run VMWare PowerCLI (PowerShell) Scripts as a Scheduled Task [Field Notes]

Problem

I need to create a scheduled task that runs a powershell script that takes actions against my VMWare environment.

For this article, we'll use the example of shutting down all VMs in a Non-Production folder when we're not scheduled to be at our desk (a real problem I'd faced).

Solution

Before you Begin: This solution assumes that you've already got PowerCLI configured and know your way around a little bit of PowerCLI/PowerShell.

Step 1: Create a VMWare Credential Store in a File

Firstly, your script will need login permissions to connect to a VI server. We can set this up ahead of time by  creating an encrypted credential store for your server.
  • Open PowerCLI as an Administrator.
  • Run the following command:

NOTES: When creating the credential store, you'll want to create it as the same user that will eventually need to access it. If you create the credential file as user X but run the Scheduled Task as user Y, your task will be unable to read the file. Also, you don't need to have a file extension, but I use "creds" just to make it clearer to me. Obviously, replace the host, username, password, and path with something that makes sense to you.

Step 2: Create a Script that Uses the Credential Store

Create a PowerShell Script Similar to the following:

Step 3: Set up the Scheduled Task

  • Create a scheduled task in the task scheduler.
  • Run the task with the highest privileges.
  • In the action for the task, run the program/script "powershell.exe" (no quotes). 
  • For the arguments, use "c:\Path\To\YourScript.ps1" (with quotes in case of spaces -- good habit).
Test your task manually several times. Make sure the log output looks right.

Taking it Live: Removing the -WhatIf
When the task is scheduled and you're satisfied it will run as you intended it, edit the script to remove the -WhatIf line. This means the Guest OSes will actually be shut down.


Afterwards: Gotchas
I gained some insights from this process, mostly by trial and error. I thought I should share the fruits of my errors with you:

  • Do not run a powershell script directly as a scheduled task. It does not work. Use the powershell.exe "C:\Path\To\script.ps1" format to execute.


References

Sunday, January 13, 2013

Chrome Tip: Add a Keyboard Shortcut to a Bookmarklet

I use Google Chrome for a lot of browsing, and I've been getting into Delicious for archiving content that I know I might want to find again but don't want hanging out in my Google Reader. It's sort of a take on Scott Hanselman's workflow for reading and archiving.

The other day I thought: it would be nice if I had a keyboard shortcut while browsing to save to delicious, instead of navigating through the bookmarks bar to click it? And a short google search later, up popped a great process from the Switched Download Squad.

The abbreviated steps are:

  • Copy the text of your delicious bookmarklet (edit the bookmark and then copy the location -- it's a bit of javascript that you'll be copying)
  • Right-click on Chrome's address/Search bar and select Edit Search Engines..
  • Scroll to the bottom of your search engines and add a new one. I chose "Add to Delicious" for the title.
  • Give the search engine a keyword -- preferably a short one. I chose "d" for delicious.
  • Paste in the javascript.
Now, to use it:
  • Navigate to a page that you want to save
  • Type CTRL + L (this activates the search bar), then your keyword ("d" in my case), then enter.
This effectively opens the search bar, chooses your "search engine", and navigates to it (which opens the bookmarklet javascript code).

Use for any bookmarklet you need.

Resources