Like What you See?
Like what you see here? Found something useful? If you benefited from anything I've posted here, please think about buying one of my books or taking advantage of one or more of the ads on the page.
- Category: Microcontrollers & Single Board Computers
As any hardware developer does, before I started, I made sure my Pi had the latest version of Raspian, the default OS for the Pi. In this case, I grabbed the latest version of Raspian from https://www.raspberrypi.org/downloads/raspbian/. In this case, it’s Raspian Jessie (February 2016) as shown in Figure 1.
Figure 1 – Raspian Download Page
I burned the OS to a memory card, inserted it in the device and booted it up. After it booted, I opened a terminal window and checked the node version. Raspian Jessie ships with Node 0.10, which is pretty old. So, before I went any further, I knew I had to update my Node installation. I checked and npm wasn’t installed as well, so I had to do that installation as well.
Fortunately, the folks at Adafruit published some instructions on how to upgrade node on the Pi; you can find the instructions here: https://learn.adafruit.com/node-embedded-development/installing-node-dot-js. Basically, all you have to do is execute the following commands in a terminal window to update node:
curl -sLS https://apt.adafruit.com/add | sudo bash
sudo apt-get install node
When you’re done, execute the following command to check the version:
It should return something like v0.12.0 or greater. OK, at this point, I know I’m running a newer version of Node than came with the latest version of Raspian.
Now, I knew that interacting with the Pi’s GPIO ports was a little different, so I knew I’d need a library to make this easier in Node. One of the articles I found mentioned a library called rpi-gpio (https://www.npmjs.com/package/rpi-gpio), so I thought I’d give it a try.
I opened a terminal window and tried to install rpi-gpoi using the following command:
npm install rpi-gpio --save
Unfortunately, the installation failed every time I tried to install it. In the npm log, I found the following:
606 error install: `node-gyp rebuild`
606 error Exit status 1
607 error Failed at the install script.
607 error This is most likely a problem with the epoll package,
607 error not with npm itself.
607 error Tell the author that this fails on your system:
607 error node-gyp rebuild
607 error You can get their info via:
607 error npm owner ls epoll
607 error There is likely additional logging output above.
608 error System Linux 4.1.17-v7+
609 error command "/usr/bin/nodejs" "/usr/bin/npm" "install" "rpi-gpio" "--save"
610 error cwd /home/pi/dev/test
611 error node -v v0.10.29
612 error npm -v 1.4.21
613 error code ELIFECYCLE
614 verbose exit [ 1, true ]
Apparently, the build process failed. Not sure what to do, I looked at the author’s GitHub account (https://github.com/JamesBarwell/rpi-gpio.js) and found a recent issue that was similar to my problem (https://github.com/JamesBarwell/rpi-gpio.js/issues/33). There wasn’t an immediate solution provided, but one helpful (sarcasm) visitor suggested looking at the readme at https://github.com/JamesBarwell/rpi-gpio.js/blob/master/README.md#dependency. Apparently the version of gcc is a problem with Raspian.
I quickly took a look, and the version I was running was much, much different than rpi-gpio expected. A quick pointer to https://github.com/fivdi/onoff/wiki/Node.js-v4-and-native-addons provided me with the instructions to install the latest version of gcc on the Pi.
Unfortunately, after the gcc update, it still didn’t work. On a hunch, I restarted the Pi and suddenly it worked, the rpi-gpio module installed successfully and I was all ready to go (at least until the next problem pops up).
I just have one question for you: why does everything have to be so hard?
- Category: Miscellaneous
I’m a huge fan of everything Warren Haynes does; a friend of mine introduced me to Gov’t Mule many, many years ago and since then I’ve purchased every one of his CDs and attended every concert I can (solo, Mule, Allman Brothers).
When I moved to North Carolina, I was surprised to learn that he has a yearly charity concert called the Christmas Jam just a few hours’ drive away. I quickly bought tickets, found someone to watch the kids and my wife and I headed off to the show. We loved it.
In case you haven’t heard about this show before, here’s a little background. Warren is from Asheville, and every year he hosts a benefit concert for Habitat for Humanity. A bunch of bands come into town and essentially this show takes over the town. The show starts at 7 PM or so and runs until every band has had a chance to play. The first time we attended, Greg Allman started playing at 2 – we watched half of his show and went to bed (couldn’t stay up any longer) and I don’t know how much longer the show went on.
The show’s amazing and donates a bunch of money to the charity, but there are a lot of flaws in its execution, and that’s what this article is about.
General Implementation Flaws
Here are some of the general purpose issues with the implementation of the concert.
For some bizarre reason, the concert promotors decided to setup this event as general seating. What this means is that if you buy a ticket to the show, there’s no guarantee you’ll have someplace to sit. Yep, first come, first served and it’s a freaking nightmare.
See, they sell out the show, so there’s multiple thousands of people there trying to find a place to sit. Now, if you want to stand for 8 hours or so, this isn’t a problem as you can come in and go right to the floor and stand in front of the stage all night listening to the bands. I’m an old guy, so I can no longer stand for hours at a time, so that option isn’t good for me.
So what happens, for those that aren’t content to stand on the floor (like me), is that most people get there early and stake out a place to sit in the stands. This isn’t that big of a deal except that when people stake out their seats, people generally leave one seat open on either side of them. Right? You don’t want to be crushed up against someone else all night (and it is a loooong night), so when you mark your seats, you make sure there’s space between you and the couple or group next to you. The problem with this is that since this is a sold out show, there are a LOT of people looking for seats. With the extra seats being open, what this means is that for every group of two people, three seats are consumed. Do the math, that means that a full 33% of the seats are sitting empty, but, don’t forget that it’s a sold out show. It’s a freaking nightmare.
Unless you’re a party of one, there’s no way you’re finding two seats open anywhere within the arena. If you’re two or more people, which most are, the only way you’re getting a seat is if you get there reeeeeally early or if you are willing to cajole and push people into shifting around in a particular row to open up enough seats for you. Did I mention it’s a freaking nightmare?
They could sell assigned seats and fix this entire problem, but every year there are hundreds or potentially thousands of folks wandering through the arena looking for a place to sit.
Now, when I first attended the show, there was an option to purchase VIP tickets at a slightly increased cost. I don’t remember how much it was, but it wasn’t that much, and it made it much easier to attend the show. With VIP tickets, there’s a dedicated area on the floor where you can stand. It’s off to the right, so you’re not near the middle of the stage, but you can still see and hear everything well. With the VIP standing area, it’s easier to come and go and still have a good view. I would argue that regular seats are actually better since you’re closer to the middle of the stage, but if you want to be close, you can’t get very close with regular tickets.
Another benefit of the VIP ticket is VIP Seating – the arena marks off a couple of sections for VIP ticket holders, and it’s easier to move between the seats and the floor. Not much easier as the same seating problem that applies to the general ticket holders apply to VIP ticket holders. 33% of the seats are empty between the groups.
Anyway, this was a great option the first year we attended the show, but the very next year they increased the VIP ticket price by about 6 times. Were it was a reasonable bump to get VIP tickets my first year, the next year it was hundreds of dollars more (I think it was about $300 more), so really not worth it.
What Went Ghastly Wrong this year
So, with that background in mind, what could have been so horrible about this year’s show to warrant this article. Let me count the ways…
Joe Bonamassa No-show
We decided after that first year that we would only go again if we had VIP tickets (it was too much of a better experience to pass on) but with the $300 increase, we just could never justify the expense. I watch my inbox every year hoping the lineup will make it worth the extra expense and this year they delivered. The announcement came, and there it was… Joe Bonamassa. My wife and I have been wanting to see him in concert, but there he was on the bill for Xmas Jam 2015 (#27 I think it was), and here was our chance. The show was supposed to include the Warren Haynes Band and the Tedeschi Trucks Band. With Joe included, there was a good chance three of the top 100 guitarists in the world would be on the stage at the same time. This was not to be missed.
I called my wife, told her the news and asked her if she wanted to go, even with the ENORMOUS price of the VIP tickets, she immediately agreed and I had tickets purchased in seconds then reserved a hotel room and arranged for my sister to take the kids for the weekend. We were all set.
Now, normally, the event adds additional bands as it gets closer to the show. So, I’d check back every so often to see what other bands would be there. Less than a week before the show, I checked the site only to learn that Joe Bonamassa wasn’t going to attend the show. Apparently he couldn’t make it.
I understand that schedules change and, as this is a benefit concert and NOBODY gets paid, that there’s a chance someone would cancel. The problem for us is that we ONLY bought tickets this year because of Joe Bonamassa and no other reason. The other issue is that they dropped him off the schedule without letting ticket holders know. You’d think in this modern time and with how much we use email to communicate that they would have considered emailing ticket holders to let them know of the change. Nope, nothing. If I’d not checked the schedule on the web site, there’s no way I could have known until I showed up for the show.
I’m pretty sure they had advance notice of his cancellation because none of the shirts have his name on them. I can only imagine that when you’re printing (I’m guessing here) 10,000 shirts, that you need quite a bit of lead time, and somehow the shirts miraculously didn’t have Joe’s name on them. So, I imagine the promotors sat on the information for a while before telling us while still letting the shirt people know. Sigh. Big failure here.
VIP Concert Shirts
As part of the VIP experience, they included a free concert shirt with VIP tickets. That’s a nice touch and saved me from having to buy one at the show (which I know I would). A few weeks before the show, they emailed VIP ticket holders (see, I knew they could email us and let us know about Joe not coming, but they apparently decided not to) and asked us to let them know what sizes we needed. I quickly responded and told them my sizes (for me and my wife) and expected to get what I ordered when I arrived at the show.
When I arrived at the VIP check-in, I learned that even though they asked for sizes and I provided them ours, they didn’t do anything with the information. Enough people didn’t reply that they just gave people whatever shirts they wanted when they showed up. I had to pick up my kids at school before heading across state to the show, so we got there late in the process, and didn’t get the shirts we ordered.
What they should have done is set aside the shirts for the people who requested specific sizes then distribute the remainder to the folks who didn’t. All they had when we arrived were XXL shirts, so my wife and I both got XXL shirts. Now, I can wear an XXL shirt, but that’s way, way too big for my wife. The extra money we paid for VIP tickets? Got my wife a shirt that was too big.
One of the things they promoted to VIP ticket holders was a special VIP entrance we could use to expedite access to the venue. Too bad they never told us where to find this entrance nor did they let the people managing the main line know; we asked several employees where it was only to get the information from a guest instead.
Clear communication problem; big failure here.
Another the thing promoted to VIP ticket holders was a special VIP lounge we could use at the show. Too bad they never told us where to find this entrance nor did they let the ushers know; we asked several employees where it was only to get the information from a guest instead.
Clear communication problem; big failure here.
VIP seating vs. Friends and Family Seating
Remember how I told you about this special VIP seating area? It’s on either side of the stage. What I didn’t notice until this year is that the VIP seats are almost the worst seats in the arena (except for those seats behind the stage). From the VIP seats, all you can see is the side of the stage. The stage is open, so you can ‘see’ everything, but only the side of the performers. The better seats? Oh, those are the Friends and Family seats. Apparently if you’re a friend of Warren’s or of the bands, you get better seats than the folks who paid hundreds of dollars for a ticket. Big failure here.
BlackBerry Smoke Letdown
I’m a fan of BlackBerry Smoke, and I was excited to hear they would be performing at the show. Unfortunately, they came on late in the evening (10 PM or 11PM? I can’t remember) right after the Tedeschi Trucks Band (TTB). TTB NAILED IT – they delivered a performance with great gusto and energy. Even though BlackBerry Smoke has songs with some great energy, for some bizarre reason they decided to deliver a set with their slowest and lowest energy songs. So, after getting all fired up and full of energy by the TTB performance, the whole arena almost fell asleep during the BlackBerry Smoke performance.
Note to BlackBerry Smoke: when performing at an all-night show, make sure you don’t put your audience to sleep.
Warren’s awesome. He delivers most performances with a smile and a neighborly attitude. Something must have been wrong with him this year, because he hardly said anything and didn’t have any energy when performing. He came out to play with several bands, but he didn’t look like he wanted to or enjoyed it; he seemed bored or disconnected. He was not a very gracious host.
The Value of the VIP Ticket
The VIP ticket is…cool, but not worth the money. For $300 more per ticket we got the following:
- Access to a VIP-only Jam the night before (OK, this was way cool).
- A pair of Xmas Jam socks (who cares).
- A cool Xmas Jam poster (unfortunately, I’m 53 and no longer hang rock posters on my bedroom wall).
- A concert shirt in the wrong size.
- VIP entrance (OK, but hard to find).
- VIP Lounge (OK, but not enough seats and the food was crappy).
- VIP seating (good, but Friends and Family had much better seats; what’s up with that?).
- VIP Standing Area (good, but for $300, don’t you think we could be center stage?).
Overall, we love the event and enjoyed hanging out in Asheville. We’re definitely coming again next year, but I doubt we’ll do the VIP tickets since it’s just not worth $300 more. We’ll be unhappy to miss the VIP concert, because that was a lot of fun, but I can save 75% of the ticket cost by not getting VIP tickets.
I hope someone assesses what they’re doing and works to make future events better.
- Category: Mobile Development
The website for my BlackBerry Development Fundamentals (www.blackberrydevelopmentfundamentals.com) was retired today. The book was published back in 2009 and focused on BlackBerry 6 (or was it 7? I can’t remember it’s been so long) development. At the time, BlackBerry apps were written in Java, but now, with BlackBerry 10, BlackBerry devices run a completely different OS and apps are written in C. BlackBerry’s newest device is an Android device, so BlackBerry as a development platform is essentially dead.
If you have a copy of the book and you’re working through some code for a very old BlackBerry device, you can find all of the sample code from the book on my GitHub page at https://github.com/johnwargo/blackberry-development-fundamentals-code.
- Category: Mobile Development
The PhoneGap Essentials web site located at www.phonegapessentials.com was retired today. The site was a repository of information about my PhoneGap Essentials book. I retired the site because the book was published more than three years ago and is woefully outdated. The book targeted PhoneGap 2 and since then many things have changed. PhoneGap was changed to Apache Cordova the PhoneGap became Adobe’s distribution of Apache Cordova (with some extra things added). As Apache Cordova and PhoneGap are both now at version 6, it didn’t seem appropriate to maintain a site dealing with technologies 4 versions back.
Since the book was published, I have published multiple updates to the book. Apache Cordova 3 Programming (www.cordovaprogramming.com) was an update to the first half of PhoneGap Essentials. The second half of PhoneGap Essentials was later refreshed in a new book called Apache Cordova API Cookbook (www.cordovacookbook.com). So, with both of those books, you have an update that covers the newer version plus jumps from 300 pages to about 500 pages.
Then, when Apache Cordova 4 came out, I updated the Apache Cordova 3 Programming book for Apache Cordova 4 (which also covered PhoneGap 4) in a new book called Apache Cordova 4 Programming (www.cordova4programming.com). With this book in place and coupled with the Apache Cordova API Cookbook, you now have about 800 pages of material on the newer version of Apache Cordova/Adobe PhoneGap.
So, if you’re looking for PhoneGap Essentials, you will be better served by Apache Cordova 4 Programming and Apache Cordova API Cookbook.
If you have to have information on PhoneGap Essentials, you’ll find all of the book’s code on my GitHub page at https://github.com/johnwargo/phonegap-essentials-code.
- Category: Microcontrollers & Single Board Computers
I’ve been working on a Particle Photon-powered garage door opener project with my son; I’d found an example project online somewhere (I can’t remember where, otherwise I’d post a link here) and looked pretty interesting. I, of course, modified it and put my own twist on the project. I’ll write about the project once it’s completed. The project’s pretty simple and it’s all ready to assemble (plus the code is all written).
I came up with a few features I wanted for the opener that I couldn’t implement on the Photon, so I decided to do a V2 on the Raspberry Pi. I’ve got the hardware all figured out and I wanted to create a node-based server process running on the Pi to control everything. I love working with the Pi, but I honestly don’t want to write code on it. The editors I’m comfortable with aren’t compatible and the system’s just not fast enough for the dev stuff I want to do. So, for this server project, I started thinking of how I could use my PC to code everything, but also maintain a quick and easy way to publish code to the Pi for execution and testing.
What follows are instructions on how to setup WebStorm to publish code directly to the Pi.
Implementation – Enabling SSH
The first step in the process is to enable SSH on the Pi. It’s fairly easy to do this, simply open the Raspberry Pi Configuration utility (open the Pi menu and select Preferences, then Raspberry Pi Configuration). In the dialog that appears (Figure 1), select the Interfaces tab then enable SSH as shown in the figure. When you click the OK button, the Pi will reboot with SSH enabled.
Figure 1 – Raspberry Pi Configuration Application Interfaces Tab
The next thing you need to do is figure out how your desktop development environment will connect to the Pi. WebStorm needs to know how to reach the Pi; you could enable DNS and use the Pi’s name to connect to it, but that’s more complicated than I wanted for this project. Instead, I decided to connect to the Pi using the device’s IP address. There are several ways to determine the Pi’s IP address. A quick look at the Pi documentation told me I could use the following command to determine the IP address:
So, I opened a terminal window on the Pi and typed in the command and received the results shown in Figure 2. The first time I did this (OK, it was a couple of times) I didn’t get the results I wanted. I’d type in the command, but I’d get back an IP address of 127.0.1.1 which is a local address (only accessible from the PI) and something that wouldn’t work for me. I finally figured out the problem, I used a lower case i and that got me completely different results.
Figure 2 – Using the hostname command to determine the Pi IP address
Another way to get the IP address is to execute the following terminal command:
With this command, you get the results shown in Figure 3.
Figure 3 – Using the ifconfig command to determine the PI IP address
Using either approach, I quickly determined my device’s IP address (192.168.1.92). With that in place, I’m ready to configure WebStorm.
Now that I know how to reach my Pi and the SSH software is installed, it’s time to configure my WebStorm project to publish my code to it. In WebStorm, open the Tools menu, select Deployment then Configuration; you should see a dialog similar to the one shown in Figure 4.
Figure 4 – Configuring a Connection in WebStorm
The first thing you’ll want to do is click the green plus sign in the upper-left corner of the dialog. By clicking on it, you’re instructing WebStorm to create a new connection. When the new connection appears (it will take up the right side of the dialog as shown in the figure), do the following:
- Set the connection type to SFTP as shown in the figure.
- Specify the Pi’s IP address as the SFTP host.
- Leave port alone; port 22 is the default port for SSH and the Raspberry Pi will use it by default.
- For Root Path, you can type in the full path pointing to the Pi user’s home folder if you know what it is. I didn’t know, so I clicked the Autodetect button and it filled it in for me.
- Specify the User name defined on the Pi. The default user name is “pi” and the default password is “raspberry” – if you’ve changed the default user settings on the Pi, make sure you enter the correct values here. Set Auth type to Password as shown in the figure.
- Be sure to check the Save password checkbox if you don’t want to have to type in the password every time you deploy your code to the Pi.
- At this point, you should have everything you need to connect – click the Test SFTP connection button to validate the settings you’ve entered. If the test fails, you’ll have to tweak the settings until everything’s right.
Once you’ve validated the connection, switch over to the Mappings tab shown in Figure 5.
Figure 5 – Mapping the local file system to the remote host
The Local path field should be populated with your current WebStorm project folder. This field specifies the source folder for the deployment.
In the Deployment path on server ‘Pi’ field, enter the home folder path where you want the files deployed. For my configuration, the user’s home folder is located in /home/pi, so with the deployment path shown in the figure, the files will be deployed to /home/pi/dev/pi_garage_door_server.
There will be files/folders in my project’s source folder that I don’t want copied over to the Pi, do I used the Excluded Paths tab to specify the content I wanted excluded as shown in Figure 6.
Figure 6 – Excluding folders published to the Pi
In this case, I wanted to be able to manually install any modules I needed on the Pi, rather than using the ones from my dev environment. I clicked the Add local path button and selected the node_modules folder from my project.
Click the OK button when finished.
Deploying the Project Files
With everything in place, you can deploy the project files to the Pi in two ways:
- Open the WebStorm Tools menu, select Deployment then the Upload to Pi option
- Right-click on the project folder in WebStorm then, in the pop-up menu that appears, select Deployment then the Upload to Pi option
WebStorm will open a File transfer window and show you the status of the file transfer as it progresses.
That’s it, that’s all there is to configuring WebStorm to deploy files to the Raspberry Pi. To test my code, I’ll need to keep a SSH window open, connected to the Pi, to execute the server code. Ultimately, when the code’s stable, I will configure my server to reload itself after every execution, so all I’ll have to do is refresh my browser window twice to load the new code I’ve deployed. More on the server process later. Enjoy!
- Category: Miscellaneous
My publisher recently asked me for some content to use to help promote my latest books, so I spent some time during the holidays writing a couple of articles for their website. I recently received one of the articles back from the editor and I was struck by the absurdity of one of the comments in the file. This post is my response to that absurdity.
When I get a few spare moments, I look through the Cordova/PhoneGap questions on Google Group or Stack Overflow. Whenever I do, I usually find one or two that I can answer without too much work, so I give it a shot. In my most recent article about Cordova, I wrote the following:
“For many years now, I've been trolling the PhoneGap Google Groups and Stack Overflow Cordova sites, trying to answer what questions I can.”
In response to this, the editor wrote the following:
“Can you think of a verb that doesn't resemble troll, since that word is also used to describe the abusive activity of online jerks?”
As I’m describing a scenario where I’m putting a hook in the water and driving around in my boat looking for fish, I was pretty happy with my choice of trolling in this case. That is, after all, the definition (source http://www.merriam-webster.com/dictionary/troll):
- To fish with a hook and line that you pull through the water
- To search for or try to get (something)
- To search through (something)
Sometimes a word is just a word and the classic definition of the word…simply…works. In this case, there’s trolling for fish and, the other, bad, Internet Troll. In this case, I’m pretty sure my context is clear; as you read the sentence, does it feel to you that I’m announcing to the world that I monitor Stack Overflow and Google Groups looking for people to attack verbally? Or, more reasonably, did I intend to mean that I’m, as per the Merriam Webster dictionary definition above, searching through something?
We shouldn’t be afraid to use words simply because of one, unofficial, interpretation of the word. The urban dictionary, for example, completly ignores the actual definition of the word and instead leads with the bad Internet Troll interpretation of the word. I bet that many people don’t actually know the true meaning of troll; the Urban Dictionary’s manipulation of the definition doesn’t help either.
We have to stop looking for things to be offended about; people are way, way too sensitive nowadays and it’s getting a little ridiculous. As George Carlin famously said: “There are bad thoughts, bad intentions, and words.” I’d like to amend that to the following: “There are bad thoughts, bad intentions, actions and words.” Judge me on my actions or the reasonable assessment of my words; not the potential, unreasonable interpretation of a word. Reasonable people will likely assume the least offensive meaning of my use of trolling until I prove otherwise.
- Category: Miscellaneous
A Book Review
I recently received a copy of Simon Monk’s The Maker’s Guide to the Zombie Apocalypse. I’d read several of Simon’s books (Programming the BeagleBone Black and Make: Getting Started with the Photon). I’ve enjoyed his books, and they’ve helped me learn how to work with the Photon and BeagleBone Black.
I travel a lot and when I’m trying to learn something, I prefer to pick up a book and work through the book step by step. Online documentation is OK, especially when you’re trying to find a quick fix to something, but I find that books are better at the overall learning you need when you first start working with a hardware device, developer tool or programming language. There’s something about the structure of a book vs. poking around in product documentation that makes it easier for me to learn from a book.
This book is different – instead of working with a specific hardware device, he’s picked a theme for this one and targeted all of the book’s projects to that theme. In this case, it’s all about some projects you can do that will help you survive the Zombie Apocalypse (ZA). Overall, he’s done a good job in selecting useful projects and connecting them well with the theme. The good news is that even though he’s working with a theme, and having some fun with the whole Zombie aspect of it, he doesn’t overdo it. The ZA attitude and the jokes that accompany it are fun and not overdone. I especially liked the web cam example image that included a Zombie in it – a nice and fun touch.
The good thing about this themed approach is that he’s crafted a series of useful projects then tied them together with a single management console. Each project can be built separately, but when you follow the theme and get them all working together through the console, you get a feel for how more complicated projects can work.
Since he’s focusing on a series of projects and not a specific hardware device, you get to see how to implement projects on different hardware platforms (Most projects are on the Arduino, but the Raspberry Pi shows up as well).
Unfortunately, his parts lists don’t take into account that you might not be adding a particular project to another existing project that already has some parts. I found myself looking at the shopping list and thinking that things were missing only to discover later that he’s expecting this particular project to be added to another. I would have preferred a complete list of parts that were somehow marked to indicate “You may already have this part if you’re adding this to that other project.” It’s not a big deal, but it did cause me some pause as I tried to figure out which parts were needed to complete the whole project.
The thing I liked the most about this book compared to the others I’d read is the length of the book. Since he wasn’t doing a quick hit on a specific hardware device, he spent more time (pages) covering the background material in detail before showing how to make the report. I especially liked the chapter on survival tips for the ZA: Chapter 1 – Apocalypse Basics. In this chapter he covers some basic survival requirements before jumping into the skills you need to make the projects. In the second chapter, he talks about how to generate electricity and provides a lot of good background about electricity and battery life. The value of this for many readers will be when they’re trying to build something with similar (but different parts); the material he provides makes it easy for the reader to figure out how his stuff will work compared to what Monk shows in the book. He did a really good job showing how to make use of the flash in a pile of discarded (empty) disposable cameras.
Of all the microcontroller projects book I’ve read (and I’ve read a bunch), this book had more practical material (background and project) than most others. There are real world applications for each of the projects described herein. Additionally, the none of the projects were that hard, I knew I had the skills for each. I’m looking forward to see what he does next.
- Category: Miscellaneous
For years, I've had this problem in Microsoft Outlook where Outlook will populate only the country field for select contacts. I've never done it purposefully, but somehow either because of some weird sync process or other reason, I had a bunch of contacts with no address, only a country set for them.
Figure 1 – Michael Palin Contact Card (NOT his real contact information)
Anyway, this has been bugging me for some time and I've been too lazy to fix this manually. So, with all the Outlook integration code I've been doing lately, I decided I'd write an app that whacks the Country fields value (there are 4 of them: mailing, home, work and other) from every Outlook contact.
I've posted the Delphi project code to GitHub. The app basically opens a memo field and processes all of the contact records, blanking out the country if it's 'United States of America'. I got the code working then cleaned up my contact list.
Thought about it a bit and realized that I could have done a better job with the code. I made separate blocks of code to check each country field individually, turn out that there isn't (that I could find) a way to retrieve a contact record field value by name, so I don't think there's a better way to do this. Also, whenever the app whacks a country field, it saves the record. I could have easily tracked whether a change was made and save only once, but I didn't.
- Category: Miscellaneous
As I mentioned in my previous post, I'm helping a friend with some Microsoft Outlook integration and came across the need to access the list of meeting and email categories defined within Outlook. Microsoft has done a great job of documenting the object model for Outlook, so it's quick work in Delphi to open an OLE connection to Outlook and get a listing of the Categories. The code's below, but I also posted the complete project to GitHub.
Here's the code:
var category, outlook, ns: OLEVariant; i, numItems: Integer; begin // initialize a connection to Outlook outlook := CreateOLEObject('Outlook.Application'); // get the MAPI namespace ns := outlook.GetNamespace('MAPI'); numItems := ns.Categories.Count; output.Lines.add(Format('Found %d items', [numItems])); if numItems > 0 then begin for i := 1 to numItems do begin category := ns.Categories.Item[i]; // category.Name is the name of the category // category.CategoryID is an internal, unique ID for the category output.Lines.add(Format('%d: %s: (%s)', [i, category.Name, category.CategoryID])); end; end; end;
The output object is a TMemo component on the app's main form, so it is used to list all of the categories when the app initializes. The app doesn't do anything with the categories, this is just an example of how to retrieve them.
- Category: Miscellaneous
Until recently, I've always kept my main set of contacts on my personal mobile device and used Exchange ActiveSync to synchronize it with my mobile device. When I joined Forrester, I decided to keep my work stuff separate from my personal stuff. So, rather than have all of my personal contacts available to me while at work, I let my work account sync my work PIM data to my device through its normal means and used a separate process to sync my person PIM data to my device as well.
Since I carry an Android device, I looked around and found an open source solution called Go Contact Sync Mod (http://googlesyncmod.sourceforge.net/) that works pretty well. I could have the sync run automatically, but for now I'm running it manually. One of the things I noticed when I run it is that it was showing an error indicating that it had found empty calendar entries in Outlook. I didn't know I had empty calendar entries nor did I know you could create empty calendar entries, but apparently my pst file had a bunch of them.
I looked around for a while and didn't find a solution for deleting those empty entries, and I couldn't 'see' them in Outlook, so I decided to write some code to solve the problem. I'd been helping a friend with some Outlook automation, so I had the basis of what I needed to make this work. I'm a big Delphi developer, although I'm pretty upset with Embarcadero right now, so it gave me a chance to dust off my Delphi skills and write some code.
I'm not going to go through everything here, but I've posted the code to GitHub at https://github.com/johnwargo/Kill-Empty-Outlook-Calendar-Entries. Basically you can open the project in Delphi then build and run it, or you can use the pre-built executables I've included in the repository. Enjoy!
Page 3 of 36Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 29 Warning: Illegal string offset 'active' in /hermes/walnaweb07a/b1193/moo.johnwargo/home/templates/js_simpletech/wright/html/pagination.php on line 35 «StartPrev12345678910NextEnd»