tag:blogger.com,1999:blog-71905482024-03-13T22:54:48.573-06:00Everyday EpicEvery day our life should be epic and not everyday.
OK, I confess, I am back to writing in my blog in a effort to get more people to view my YouTube videos and subscribe to my YouTube channel.Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.comBlogger333125tag:blogger.com,1999:blog-7190548.post-43013373307075705322019-04-13T18:57:00.001-06:002019-04-13T18:57:39.568-06:00Key West, Biking the Florida Keys part 4<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-NGNYV7QRXzk/XLKFbRpDEwI/AAAAAAAAd3s/ybISPl_NNuMpu5ENChRtUtRPCZ4LZ1vJwCLcBGAs/s1600/20190413_094554.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://1.bp.blogspot.com/-NGNYV7QRXzk/XLKFbRpDEwI/AAAAAAAAd3s/ybISPl_NNuMpu5ENChRtUtRPCZ4LZ1vJwCLcBGAs/s320/20190413_094554.jpg" width="320" /></a></div>
I'm ready to get moving. Kendall was feeling too tired to bike today, so we are taking our rest day today and will go back to Marathon tomorrow.<br />
The sun is intense. Sitting in the shade neat the pool today and just the reflection of the sun off the water felt like it was sunburning me.<br />
So we are going to get going in the morning as soon as it is light enough to see and hope to skip out on the hot afternoon.<br />
<br />
Forecast for the night calls for rain, so I guess I better put up the rain fly. Might still be raining when we start in the morning.</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-1999975678849767712019-04-12T20:21:00.000-06:002019-04-12T20:24:42.330-06:00It's a scam. Biking the Florida Keys part 3<div dir="ltr" style="text-align: left;" trbidi="on">
We made it to Key Largo. Before heading out on<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Z8gz6d-10os/XLFIMvAFixI/AAAAAAAAd3A/Q2hu6nD8JB8O0fxx-SekjhQgkWLCXZ0zgCLcBGAs/s1600/20190412_182856.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://1.bp.blogspot.com/-Z8gz6d-10os/XLFIMvAFixI/AAAAAAAAd3A/Q2hu6nD8JB8O0fxx-SekjhQgkWLCXZ0zgCLcBGAs/s320/20190412_182856.jpg" width="320" /></a></div>
this trip I did a quick search to see what others said about biking the overseas heritage path from Key Largo to Key West. Most of what I read was that it was mostly doable except they didn't recommend biking over some of the bridges. Never did figure which bridges. But if you are a confident cyclist then there really isn't anything that isn't just fine to bike. If you have the mistaken idea that bikes should be on paths or sidewalks then this is not a good fit for you.<br />
<br />
A few weeks ago we were babysitting my grandson while his parents went to the temple. We decided to take him to Disney world. But he was upset that he was getting babysat and not going with Mom and Dad. We tried to sell him on Disney but he is two and was having none of that.<br />
<br />
However a couple days before that as we were driving we were thinking of going to Hobby Lobby, but I just wanted to get home, so we passed the Hobby Lobby. Hobby Lobby is a fun word for two year olds. So he spent the next few hours repeating phrases like "passed the Hobby Lobby'<br />
<br />
So when he started saying, "no Disney" I asked if he wanted to go to Hobby Lobby. His answer, "don't pass the Hobby Lobby"<br />
<br />
So we convinced him that Disney was hobby lobby. All day we asked him how he was enjoying hobby lobby. He loved it. But to get into the magic kingdom you have to ride the ferry boat or the monorail. The Disney employees will try and convince you that they are both the same fast. False. The ferry boat is a scam. So we spent all the day trying to teach my grandson to say the ferry boat is a scam. Tried to get him to tell all the ride opporators but he would never do it. But when we got back home and in the arms of mom we again asked, what is the ferry boat?" And he tells mom, "a scam."<br />
<br />
So the overseas heritage trail is a scam. All these bike paths are a disaster. Larger sections are torn up and a lot of the bike path bridges are closed. I guess the hurricane a couple years ago did a lot of damage. Anyway for a lot of it it is just better to ride in the bike lane on the road.<br />
<br />
Had a great time riding down, with beautiful views. But it kind of smells like Yellowstone here, and the beaches are a bust.<br />
<br />
Kendall is too tired so we decided to take our rest day tomorrow instead of Sunday. And then it will be two days of head winds to get back.<br />
<br />
I guess having him use my cheap Trek mountain bike that I bought to pull the baby trailer with was a mistake. </div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-91748954771104448062019-04-11T20:39:00.001-06:002019-04-11T20:39:33.842-06:00Key Largo to Marathon, Biking the Florida Keys part 2<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;"> </span><a href="https://4.bp.blogspot.com/-A8LcaR2Zri0/XK_5-gvL9_I/AAAAAAAAd2s/yhlUYNlXOksyneIbnlWBYxcfd26BKLvhACLcBGAs/s1600/20190411_133719.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="781" data-original-width="1600" height="156" src="https://4.bp.blogspot.com/-A8LcaR2Zri0/XK_5-gvL9_I/AAAAAAAAd2s/yhlUYNlXOksyneIbnlWBYxcfd26BKLvhACLcBGAs/s320/20190411_133719.jpg" width="320" /></a></div>
Yesterday we got a cheap motel in Homestead. For 50 some odd dollars it wasn't bad, and the breakfast in the morning was great. Then drive to Key Largo for our starting point.<br />
<br />
OK, what is the deal with the drivers here! Every time one lane was dropping out some idiot would think they need to sneak around at the last second. And when it is a big truck that means they are going to push you off into the mangroves. I guess it just fits in with the Florida thing of thinking they are stock car drivers and need to draft a few inches off your bumper.<br />
<br />
But even though I'm going to leave a reasonable amount of space between me and the car in front of me, I'm aware of what is going on and I'm not going to let you force me off the road.<br />
<br />
See we got to the chamber of commerce building a bit before it opens. Fortunately the lady running it also got there early. She says she has to leave early because frequently there is an accident from people getting forced off the road when the lanes merge.<br />
<br />
In Key Largo the bike route is a nice path along the side of the road. But there are a lot of places south of Key Largo where the trail is all broken up and not ridable on a road bike. And if you are dumb to ride it anyway then you'll be fixing a flat. :-) <br />
<br />
Anyway it was a fun ride with amazing scenery and more iguanas than I've ever seen. OK, I'm not sure I've ever seen iguanas in the wild before, but I promise there are a lot and some of them are practically the size of an alligator. OK, OK, I yet to see an alligator in Florida, but they are big iguanas.<br />
<br />
So tonight we are staying with some hosts we arranged through couch surfing. They have been the best. They even claim they like the vegetation version if Thai curry I made for them.<br />
<br />
So get some sleep tonight and head out to Key West tomorrow.</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-73440299403684828092019-04-10T20:41:00.000-06:002019-04-10T20:44:06.700-06:00Homestead Florida, Bike the Florida Keys part 1<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/UN4D0T6bTdo/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/UN4D0T6bTdo?feature=player_embedded" width="320"></iframe></div>
<br />
<div dir="ltr">
So, my friend Kendall, flew into Orlando this morning. His flight was delayed, probably die to all the issues with the 737 Max planes being grounded. So by the time we hit home it was about 4 am. </div>
<div dir="ltr">
Today we did our final packing and then drove down to Homestead Florida. Key Largo is just a few miles from here. The plan is to bike from Key Largo to Marathon tomorrow, and then stay with some people we found through couch surfing. This is our first time trying out couch surfing. We tried getting other hosts in Key West and in Marathon for the return trip but so far have not been successful. </div>
<div dir="ltr">
This is a trip that Kendall suggested way back before I decided I want to move to Florida. Before this trip my biking in Florida has consisted of the local bike paths and roads near Clermont. </div>
<div dir="ltr">
Video of biking most prominent point in Florida: <u>https</u>://youtu.be/UN4D0T6bTdo</div>
<br /></div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-45017470196847968852019-04-08T21:46:00.000-06:002019-04-08T21:46:42.766-06:00SeaWorld doing the rides<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<iframe width="600" height="300" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/-IA0vHxmxrA/0.jpg" src="https://www.youtube.com/embed/-IA0vHxmxrA?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
We went back to SeaWorld again today. My grandson just had such a blast at Sesame Street last time, we had to come back and do it again with his mom and dad. So we spent about half a day doing Sesame Street and the Orca show, and then spent the last half of the day doing the roller coasters, and water rides.<br />
<br />
We got drenched watching the Orcas and so then went to the splash pad and rinsed off the salt water. And then went and rode the Infinity Falls. It is a pretty good water rapids fall, not too long and the last drop that seems like it will be pretty intense, isn't as bad as it looks.<br />
<br />
I'm not a big roller coaster guy, but we had a blast doing the coasters at SeaWorld. The Mako coaster was the biggest coaster I've been on. I think half the time I was floating out of my seat. Then we did the Manta coaster. My daughter did NOT want to do that a second time. You are essentially riding the whole thing laying on your stomach. The first drop was terrifying and they take your picture at the bottom, but then as you head back up and around the next loop... yeah well it just gets even more terrifying. Finally we did the Kraken which is more rickety than the others and has a lot of loops. It really is a good set of roller coasters, and the lines were only like 5 to 10 minute waits. After Kraken we did the Atlantis ride which is something of a combo water ride and boat ride. Kinda cool.<br />
<br />
We tried out the all day dining plan for one of us. It worked out good, and was enough food to share with the rest of us. I also bought their refillable drink cup. Usually I count on these park trips as a way to get some exercise in while not eating much because I don't want to pay the prices they charge for the food, but I think today I ate more calories than I burned.</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-6295285760352655122019-04-06T13:50:00.000-06:002019-04-06T13:50:58.213-06:00Can you tell me how to get<div dir="ltr" style="text-align: left;" trbidi="on">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/1fHShO8qnt0/0.jpg" frameborder="0" height="360" src="https://www.youtube.com/embed/1fHShO8qnt0?feature=player_embedded" style="clear: left; float: left;" width="550"></iframe>Today we decided to check out SeaWorld. Dieter F. <a href="https://www.lds.org/general-conference/2011/04/your-potential-your-privilege?lang=eng" target="_blank">Uchtdorf tells a parable</a> of a man that goes on a cruise and spends most of his time in his cabin eating crackers he brought with him because he was unaware that all the food and entertainment on the ship was included with the cost of his ticket.<br />
<br />
Today I felt like that man. When I bought my annual pass for Sea World a couple of months ago it included a coupon for a free PhotoKey. I had no idea what a PhotoKey was and when I asked they told me how and where I could go and get it, but nobody explained what it was.<br />
<br />
So today we decided to check out the new Sesame Street area of SeaWorld. It was actually pretty cool. Kind of like stepping into the Sesame Street from the TV show. The rumors I have been hearing is that the crowds at Disney the last week or so have been really bad. So I expected Sesame Street to be crowded, after all it has only been open for one week. But actually it wasn't crowded at all. In fact we were frequently able to ride the same ride multiple times in a row because there was no line.<br />
<br />
Also the lines to meet Cookie Monster, Elmo, and Big Bird were very short, or at times no line at all. Each time we would go see Cookie and Elmo my grandson, Cayman, would run past Cookie and over to Elmo. He has an Elmo toy that he loves but really doesn't know who any of the Sesame Street characters are. Anyway, after were are done with the character greets they would give me a little card for getting the pictures they take. And I'm thinking I'm not going to buy those pictures. But then I look at the card and it says PhotoKey on it. So I take it to the counter and ask if my free photo key deal is good for the pictures they took. I'm thinking it is some kind of keychain with a picture on it. They tell me yeah but you have to go to the place by the entrance to get it.<br />
<br />
So after we were done with Sesame Street Cayman was getting tired and I decided to head home for the day. After being at the beach all day yesterday I had a slight sunburn and figured it would be best not to spend another full day in the sun.<br />
<br />
So we stop by the KeyPass place on our way out and I ask if I can use the free PhotoKey with the pictures they took today. I'm still thinking this is some kind of keychain. She says no problem and scans the cards I had collected and my coupon, and then tells me how the PhotoKey works. For the next year anytime I visit any of the SeaWorld family of parks I can give the PhotoKey card they give me to the photographer and then all the pictures they take will be available for me to download. For FREE.<br />
<br />
The sad thing is, when I got the annual pass I also got a free animal encounter. I let my son Stephan, and my grandson Vincent use the animal encounter to go and see and pet the dolphins. And of course they took pictures, and I could have had those pictures, also we could have taken other pictures with Vincent. But like they guy in the parable I was figuratively sitting in my stateroom eating the crackers instead of enjoying the free benefits that came with my pass.<br />
<br />
And one passing thought, I think they want you to go around the park asking, "Can you tell me how to get, how to get to Sesame Street?" because they didn't have any signs showing how to get there.<br />
<br /></div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-24996888568928235072019-04-03T23:15:00.000-06:002019-04-03T23:15:19.412-06:00Florida Beaches<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/0Nx-BrXAs8A/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/0Nx-BrXAs8A?feature=player_embedded" width="460"></iframe><br />
<br />
<br />
<a href="https://3.bp.blogspot.com/-eGeOnJQBRCY/XKV9bIRTCAI/AAAAAAAAdxo/Vy6edYdcFgAOOKrrOrADr4fps_bVGs9QQCLcBGAs/s1600/20190309_182210.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://3.bp.blogspot.com/-eGeOnJQBRCY/XKV9bIRTCAI/AAAAAAAAdxo/Vy6edYdcFgAOOKrrOrADr4fps_bVGs9QQCLcBGAs/s320/20190309_182210.jpg" width="320" /></a>Over the last few months we have visited several Florida beaches. First we went to Daytona Beach on the Atlantic coast, and loved it. It was the middle of November, yet the water temperatures were fine and I was surprised how nice it was for being so late in the year. Then we tried Clearwater Beach on the Gulf coast. We were surprised at how nice the sand was, but near the water it was more broken shells than sand and so not quite as nice as Daytona Beach. Also the waves at Daytona Beach were a lot more fun to play. At least so far, and it makes sense, the waves on the Atlantic beaches are much bigger than on the Gulf beaches.<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
Then in January we tried out Cocoa Beach. My son in law gave me some pointers on body surfing and we had a blast surfing the waves. By the end of the day I actually got to where I could ride the waves pretty well. </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-5V1rALFNC-Q/XKV9aqXhrWI/AAAAAAAAdxs/nXumitUB3gQA2yEVsvOYJ5p0aOOrEuw7QCEwYBhgL/s1600/20190309_125947.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://2.bp.blogspot.com/-5V1rALFNC-Q/XKV9aqXhrWI/AAAAAAAAdxs/nXumitUB3gQA2yEVsvOYJ5p0aOOrEuw7QCEwYBhgL/s320/20190309_125947.jpg" width="320" /></a></div>
<div>
A few weeks ago I decided to get up early in the morning and bike from Clermont Florida to Pine Island Park beach and then meet my daughter and family would drive out and we could have a fun day at the beach. </div>
<div>
<br /></div>
<div>
The problem is there isn't enough parking at the park so if you don't get there early you can't park. So after stopping to get a picture I headed north for Crystal River, and my daughter picked me up somewhere along the highway between Pine Island and Crystal River. Anyway we ended up going to Fort Island beach.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-Nuw5jCpOvBE/XKV9a-FVNMI/AAAAAAAAdx0/ZNN1Uv7-2lMFr17qZRQz2I-0gJgLWQmFACEwYBhgL/s1600/20190309_181458.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://3.bp.blogspot.com/-Nuw5jCpOvBE/XKV9a-FVNMI/AAAAAAAAdx0/ZNN1Uv7-2lMFr17qZRQz2I-0gJgLWQmFACEwYBhgL/s320/20190309_181458.jpg" width="320" /></a></div>
<div>
Fort Island beach was a great little beach for kids. It is well protected so there isn't much in the way of waves. Also while we were there a pod of dolphins came near the beach and played around for awhile. We stayed for sunset and I just had to get some pictures. </div>
<div>
<br /></div>
<div>
And then today we headed out to go to Fort De Soto Park beach. But we didn't bring any cash with us so we couldn't go over the toll bridges to get to the park and decided to go to St. Pete beach instead. We had a blast there. The sand was super soft and fine. And while the water felt a bit cold when you first step into it, after you get used to it, it is just fine.</div>
<div>
<br /></div>
<div>
So out of the beaches we visited so far, which is the best? Hmm, hard to say. I guess so far every Florida beach we've been to so far has been great.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-31551591839521482642017-09-13T09:50:00.001-06:002017-09-13T09:50:49.840-06:00Can you ski coast to coast across Antarctica solo?<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
A friend sent me a link to this expedition: https://soloacrossantarctica.com/expedition<br />
<br />
After a quick glance my first reaction was, this is basically an attempt at completing the expedition that killed <a href="https://en.wikipedia.org/wiki/Henry_Worsley_(explorer)" target="_blank">Henry Worsley</a>. This morning I took a more in depth look at the website, and yup, that is what it is.<br />
<br />
So, some thoughts on the expedition:<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-elUgBsqkrY4/VDF5NwyOjpI/AAAAAAAAIt8/RbvTuT1PxOQ8gjB0GfxvMWBav7X3S6aegCPcBGAYYCw/s1600/IMG_0892.JPG" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://2.bp.blogspot.com/-elUgBsqkrY4/VDF5NwyOjpI/AAAAAAAAIt8/RbvTuT1PxOQ8gjB0GfxvMWBav7X3S6aegCPcBGAYYCw/s320/IMG_0892.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">My bike in the endless sea of Antarctica Ice</td></tr>
</tbody></table>
I've never skied in Antarctica, so I really don't know how hard it is compared to biking. When Juan passed me while I was pushing my bike and he was skiing, skiing with a bike in a sled was a lot easier than pushing it. But there were other times where it seemed that my riding the bike was making a better progress then his skiing. My guess is that overall skiing is easier than biking in Antartica, but still extremely physically demanding.<br />
<br />
Charlie is planning on leaving in early November and taking 80 to 100 days to complete the expedition. Henry Worsley took about 71 days before he had to be picked up and was some <a href="http://www.forces.net/news/feature/ssvc-backs-expedition-paying-tribute-henry-worsley" target="_blank">120 miles</a> from finishing. That would mean he probably would have taken another 10 days to finish. So, the 80 to 100 days to complete seems reasonable. Given that you have to finish by the end of January when the last flight leaves, you would have to leave in early November to be able to finish.<br />
<br />
The problem is the earlier you leave the softer the snow is, and the colder and worse the weather conditions are. This means the first month and a half or so will be in soft difficult snow conditions, and then when he gets to the polar plateau, near the South Pole, the snow becomes a bit like sand and again difficult to ski on. In other words this is an extremely physically challenging task.<br />
<br />
On his website he says he plans on consuming 9,000 calories per day, while skiing 12 hours a day. Looking at Henry's expedition and from my own experience I would say 12 hours a day is probably a minimum amount of time needed. Eating 9,000 calories a day and having your body absorb those calories while doing a 12 hour a day physical workout is very difficult.<br />
<br />
He is expecting to expend 12,000 calories a day. So that is about 1,000 calories per hour of skiing. My guess is this is about right. Now the problem; he is expecting to lose 40-50 pounds on his expedition. The general rule of thumb is that 3,500 calories is about 1 pound of fat. If he is expending 12,000 calories and consuming 9,000 calories that is a 3,000 calorie deficit per day. If it takes 85 days that is about 73 pounds of fat. To only lose 40-50 pounds he would either need to consume more calories or expend less. The thing is, I don't know if either of those options is possible. So it looks like he would lose about 73 pounds on the expedition. Looking at his pictures I doubt there is 75 pounds of fat on his body.<br />
<br />
If he can't get the needed calories from fat then it has to come from something else -- muscle and organs. Once the body starts cannibalizing itself you are in trouble. I figure on my expedition I depleted my fat store and was burning muscle and who knows what else to complete my expedition. Fortunately for me my expedition ended after 51 days. I'm not sure I could have lasted the 71 days that Henry Worsley went, and I am sure I would not last 80+ days.<br />
<br />
So, knowing what I think I know, this is not an expedition I would want to attempt. I don't know if I could find the right balance between not giving up and not killing myself. I am afraid this expedition would kill me.<br />
<br />
Is it possible to do? In spite of my calculations above I think it probably is possible. I will be sure to follow Charlie's progress and hope and pray that he successfully completes what is sure to be an amazing expedition.</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-76369167626894069192017-08-16T09:36:00.001-06:002017-08-16T09:37:31.636-06:00Mr. Blue Bird is on My Shoulder<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="float: right;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-vAjnEu1YN-Q/WZRjF9TZLOI/AAAAAAAAWbM/OlCdUnqkUWY1S5mUPIW4M6etFLwXDBuHwCLcBGAs/s1600/FullSizeRender.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://1.bp.blogspot.com/-vAjnEu1YN-Q/WZRjF9TZLOI/AAAAAAAAWbM/OlCdUnqkUWY1S5mUPIW4M6etFLwXDBuHwCLcBGAs/s320/FullSizeRender.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Crossing the Jordan River</td></tr>
</tbody></table>
</div>
<div dir="ltr" style="text-align: left;" trbidi="on">
This morning was just one of those mornings...
<br />
<br />
I went out to get ready to ride and you could feel the crispness in the air that says Autumn is just around the corner. Actually as I started riding I wondered if I would get too cold as I head down the hill to Saratoga Springs. However after getting going it turned out to be that perfect temperature.
<br />
<br />
Really it was just a perfect morning to be riding a bike. The skies were a beautiful azure blue. It was one of those days you wish the bike ride would never end.<br />
<br />
It is the truth, it's actual, everything is satisfactual!
</div>
</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-54150946077280393352017-06-14T14:43:00.000-06:002017-06-14T14:46:20.773-06:00Yeah, but I had a penny...<div dir="ltr" style="text-align: left;" trbidi="on">
One day, when I was just a little kid, my brother had a dime. Back then we could buy two pieces of candy for 1 cent. So three or four of us decided to head out to the store. I'm not sure our parents would have approved having us little kids walk the mile to the store crossing the busiest street in the city, but I don't think we asked anyone for permission.<br />
<br />
Along the way to the store I found a penny on the ground. More candy! However there was a problem. On 10 cents there is no sales tax, but if you spend 11 cents then you also have to spend one cent for tax. So as we walked to the store we devised what we thought was a clever plan. Each of us would pick out our candy and one by one pay for the candy and then pass the change on to the next person.<br />
<br />
We thought we were so smart. I picked out a couple of Swedish fish and was the last to buy our goods. But before we left, the sales lady asked us why we hadn't just payed for everything at once. So my brother tells her that we didn't want to pay sales tax. "There is not tax on a dime." she said. And I proudly replied back, "yeah, but I had a penny!"<br />
<br />
They teased me about that the whole way home. Actually they teased me about that for years afterwards. I still remember how great we thought it was that we out smarted the system.<br />
<br />
At the intersection where I cross Redwood Road on my way to work, there is what I thought was a dime amongst the debris that piles up at the intersection. A few days ago I stopped and picked it up. It actually is a penny that has had all of the copper worn off of it. I've actually noticed a lot of coins amongst the road debris as I bike to and from work. As a kid I was so excited when I found that penny, now I simply ride past quarters, nickels, dimes, and pennies every day. Surely other people see them too but nobody cares enough to even stop and pick them up.</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-25098581617676401032017-06-09T09:21:00.000-06:002017-06-09T09:24:02.576-06:00Sorry Dude...<div dir="ltr" style="text-align: left;" trbidi="on">
... but let me explain. Ever since that lady intentionally tried to kill me because, in her words, "he was riding his bike on the road," I have suffered from a real bad paranoia.<br />
<br />
I still have not been able to ride my bike down that road. When I think about it I get a vision of the lazy lady putting the pedal to the floor and swerving at me, and this time successfully turning me into roadkill. When the Sheriff's department arrives to clean up, the deputy gives the lady a high five for doing her part to rid the roads of non motorized vehicles.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-0ls0wFCsqYE/WTq60laFVvI/AAAAAAAAV88/LFcEuUljYA8WyovvywwYCLZZyX4qhAe-QCK4B/s1600/IMG_1908.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4.bp.blogspot.com/-0ls0wFCsqYE/WTq60laFVvI/AAAAAAAAV88/LFcEuUljYA8WyovvywwYCLZZyX4qhAe-QCK4B/s320/IMG_1908.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Hmm, blog posts need pictures: our bike ride in Prague a few weeks ago.</div>
<div>
<br /></div>
</td></tr>
</tbody></table>
So to deal with this paranoia, instead of riding my bike on the 30 mph road I ride down the highway where the speed limit is 55 mph. Of course this means the average speed is something like 70 mph. OK, yeah, this doesn't make sense.<br />
<br />
Anyway, as I head down this road I need to make a left hand turn. I like to turn one intersection before the main one so I can get off the highway and on to the pathway. But the problem with this is, it requires me to ride on the left side of the highway for a block or so.<br />
<br />
...and that is my excuse, after making that left and heading to the pathway my brain shifted into riding on the left. So that confusing moment when you were riding your bike off the pathway, and you couldn't figure out which way I was going, was just a strange way of me trying to stay alive as I go to work.<br />
<br /></div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-84483047527683360592017-04-27T15:26:00.004-06:002017-04-27T15:26:58.227-06:00Don't Give Up<div dir="ltr" style="text-align: left;" trbidi="on">
We all have those days. As soon as you arrive at work, you wonder if it is time to go home yet. Days like that remind me of <a href="http://epicsouthpole.blogspot.com/2014/01/jan-14-soft-snow-and-cookies.html" target="_blank">Tuesday Jan 14, 2014</a>.<br />
<br />
It was one week before I would arrive at the South Pole. I had got into the routine of taking Sundays as rest days. Every day I was putting in 13+ hours a day of intense work. So it got to the point that I looked forward to Sunday more than a little kid looks forward to Christmas.<br />
<br />
On Sunday the 12th I took a nice rest from the weeks work. Then on Tuesday I got another bad whiteout. There was a lot of new soft snow. I could not see where I was going. I had been biking across Antarctica for almost two months, and I had gotten good at just accepting the conditions and continuing on in much worse conditions than this. But this day broke me. After a couple of hours of whiteout conditions I just quit. I wanted it to be Sunday so bad, but it was only Tuesday!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-ZJkIg2Ecbrc/WQJgGC4KzkI/AAAAAAAAVuo/iJ6qb0XihcQDsA3lCcNS6KXMdz7wLcLuwCLcB/s1600/IMG_0308.CR2" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://4.bp.blogspot.com/-ZJkIg2Ecbrc/WQJgGC4KzkI/AAAAAAAAVuo/iJ6qb0XihcQDsA3lCcNS6KXMdz7wLcLuwCLcB/s320/IMG_0308.CR2" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
What is the point? I don't know, but yeah Xamarin studio has been getting worse and worse with each new update, and today I just didn't want to deal with it anymore. Oh well, back to work!</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-10646937858643793432017-03-16T10:06:00.001-06:002017-03-16T10:06:49.978-06:00<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">When we were kids we used to like digging big holes in the orchard. The joke was that if you dug deep enough you would come out in China. Of course we never thought we could dig all the way to China. Besides this was during the Cold War so we knew that Americans were not allowed to go to China. </span></div>
<b id="docs-internal-guid-422e39c4-d7d3-cbd3-3eb7-afc6561cadf5" style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><a href="http://www.gocomics.com/calvinandhobbes/" target="_blank">Calvin had his Hobbes</a>, and my son Stephan had <a href="http://christmas-specials.wikia.com/wiki/Topper_the_Penguin" target="_blank">Top</a>. Top was a stuffed penguin I bought as a gift for my wife, but when Stephan was just a baby he decided Top was his. Stephan loved Top and thus all penguins. The <a href="https://www.nhl.com/penguins" target="_blank">Pittsburgh Penguins</a> became his favorite sports team. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For some reason my kid’s schools thought the kids should decide what their career will be before they were even teenagers. Stephan was a smart kid and it seemed very likely he could become a scientist. So I pondered the idea of him becoming some kind of researcher going to Antarctica to study penguins. He however went a different direction. Stephan will be getting his PhD in mathematics this spring.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://1.bp.blogspot.com/-J08VLP6wAYY/U2hg58LS9nI/AAAAAAAAGTU/5ToituADG2kUPN31-rxhHP_5PrknJoD3ACPcB/s1600/BB97B36802E1CD810F6DB7318B3DA5FC.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="239" src="https://1.bp.blogspot.com/-J08VLP6wAYY/U2hg58LS9nI/AAAAAAAAGTU/5ToituADG2kUPN31-rxhHP_5PrknJoD3ACPcB/s320/BB97B36802E1CD810F6DB7318B3DA5FC.jpeg" width="320" /></a><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">My father was a scientist and was invited to go on a sabbatical to Antarctica with<a href="http://www.americaspace.com/2014/07/07/wolf-v-vishniac-the-first-human-to-walk-on-mars/" target="_blank"> Dr. Wolf Vishniac </a>to do research on detecting life on Mars. However he decided to go on a sabbatical to New England instead. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">So the point of all this, I never dreamt of going to Antarctica. It was something someone else might do, but wasn't something I considered doing myself. Fat bikes and the amazing <a href="http://www.ericlarsenexplore.com/" target="_blank">Eric Larsen</a> changes that. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I also never thought I would go to China. My South Pole expedition has changed that also. I have been invited to go to Shanghai to help someone plan for his Antarctic expedition. So I'll see if I can figure out how to add some blog posts while I'm there. </span></div>
<br /><span style="font-family: Arial; font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; vertical-align: baseline; white-space: pre-wrap;">Hmmm, before Antarctica visiting all the continents was not on my list, after China I will only have two more to go. </span></div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com2tag:blogger.com,1999:blog-7190548.post-41192957221394742562016-09-01T21:22:00.000-06:002016-09-01T21:46:21.394-06:00Why do you think I want this boat<div dir="ltr" style="text-align: left;" trbidi="on">
I love <i>Joe vs the Volcano. </i>It is one of my all time favorite movies. I think the part on the boat expresses a lot of what I like.<br />
J: Are you used to this?<br />
P: What?<br />
J: The ocean, the stars.<br />
P: You never get used to it. Why do you think I want this boat? All I want to do is sail away.<br />
J: Where would you go<br />
P: Away from the things of man.<br />
...<br />
J: up till now I've lived on a tiny island called Staten Island, and I've commuted to a job in a shut up room with pumped in air, no sunshine, despicable people, and now that I've got some distance from that situation, that seems pretty unbelievable. Your life seems unbelievable to me. All this like life, seems unbelievable to me.<br />
<br />
I'm in Barcelona. This is about as close to the boat as I have been so far.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-TyCnh-AJYc4/V8jxqtKtCnI/AAAAAAAASvk/59ETFC-vCzkEJTUSotwggf_10N5w2NngACKgB/s1600/IMG_0664.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="167" src="https://2.bp.blogspot.com/-TyCnh-AJYc4/V8jxqtKtCnI/AAAAAAAASvk/59ETFC-vCzkEJTUSotwggf_10N5w2NngACKgB/s320/IMG_0664.JPG" width="320" /></a></div>
<br /></div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-36623243855582515572016-06-17T16:10:00.000-06:002016-06-17T16:10:17.462-06:00Biking to Work is Dangerous <div dir="ltr" style="text-align: left;" trbidi="on">
I think biking to work is dangerous, but not for the reasons that just popped into your head.<br />
<br />
<a href="https://4.bp.blogspot.com/-vieNQbG4rts/V2QWvDJaBzI/AAAAAAAAP7I/CJWduBK7TUEs0QprRFsu7QvYfcdSo3sigCLcB/s1600/IMG_0281.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="https://4.bp.blogspot.com/-vieNQbG4rts/V2QWvDJaBzI/AAAAAAAAP7I/CJWduBK7TUEs0QprRFsu7QvYfcdSo3sigCLcB/s200/IMG_0281.JPG" width="200" /></a>I was a bit lazy this morning and took a little longer to do those things I do every morning before going to work, like feeding the chickens and the raven (yes. I have a friendly raven). So, after finally getting going on the bike you would think I would choose the fastest, easiest way to get to work to make up for leaving late, but no. You see, it was a perfect morning, cool temperatures, a blue sky, and no wind. So of course I decided to take the river route to work.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-nFzw5l24AEM/V2QU1H-PlxI/AAAAAAAAP68/tLq-NG_Thok1but-7SJXvEwfC-lI4XFEgCLcB/s1600/IMG_0301.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-nFzw5l24AEM/V2QU1H-PlxI/AAAAAAAAP68/tLq-NG_Thok1but-7SJXvEwfC-lI4XFEgCLcB/s320/IMG_0301.JPG" width="100%" /></a></div>
<br />
<div>
Of course I started Strava before heading out, but I'm not a typical Strava user. I really don't care about KOM, PR, or other achievements, sometimes I just like to keep a record of my rides. And like I said, I was feeling lazy this morning so I was just riding and enjoying being out on the bike, and that is where the danger comes in.<br />
<br />
I started when my son was in scouts, well that is probably not true as there is no real beginning, but it works for this story. So, it started when my son was in scouts and they were getting ready to do a White Rim biking trip, and I volunteered to go along.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-fNhJCmKzXy0/V2Qj3jFrLYI/AAAAAAAAP7Y/8Ic7pUrCYzk_XaWJCohJ4V9jvPa6JZcLwCKgB/s1600/IMG_0753.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-fNhJCmKzXy0/V2Qj3jFrLYI/AAAAAAAAP7Y/8Ic7pUrCYzk_XaWJCohJ4V9jvPa6JZcLwCKgB/s320/IMG_0753.JPG" width="100%" /></a></div>
<br />
The next year I went on a trip with the scouts doing the Kokopelli trail. The White Rim and the Kokopelli were great multi day trips, but somehow I jumped from that to biking across Antarctica to the South Pole, and that was followed by a couple of bike tours, one from Utah to Oregon, and a second one going down the Oregon coast.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-INx8pZIqxaE/V2QsY3srciI/AAAAAAAAP7s/kOCogBnHfhAyqswqrs4wp8dEmW4-5lILACKgB/s1600/DSC00207.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-INx8pZIqxaE/V2QsY3srciI/AAAAAAAAP7s/kOCogBnHfhAyqswqrs4wp8dEmW4-5lILACKgB/s320/DSC00207.JPG" width="100%" /></a></div>
<br />
And that is the real danger of biking to work. I start by thinking how nice it would be to just skip going to work and spend the day out on the bike. Then the idea that it would be awesome to just forget everything else and go on a bike tour with no real destination, just each day ride to somewhere new.<br />
<br />
Now that wouldn't be so bad, but this leads to fantasies of selling everything and buying a yacht and heading out on an around the world cruise. I imagine starting in California and sailing south along the coast of South America and through the straits of Magellan, and of course stopping in Punta Arenas to visit my friends there. Then continuing up the Atlantic coast to the Caribbean, the Bahamas, maybe up to Greenland, Iceland, Scandinavia, England, through the strait of Gibraltar and into the Mediterranean. Africa scares me, but still I would have to stop somewhere in Africa just to make sure that I get all seven continents marked off the bucket list. (I'm not a bucket list kind of guy, but since I have been to Antarctica now I feel the obligation to visit Africa, Asia, and Australia).<br />
<br />
So somewhere I'd visit Africa, and then through the Suez Canal and into the Indian Ocean, India, Indonesia and down to Australia, up along China, Japan Russia and over to Alaska, and back down to the start.<br />
<br />
The thing is I have already proven that I am likely to do crazy trips, and so that is why biking to work is dangerous.<br />
<br />
Hmm, I think I need to go read <i>Call of the Wild</i>.<br />
<br /></div>
</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-4927762842025310352016-05-21T08:16:00.001-06:002016-05-21T09:01:49.076-06:00Serving Pages and Mustache with Perfect<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="https://www.youtube.com/channel/UCtZwizxPnNE0462A4vET_Rg" target="_blank">Ryan Collins</a> has some great videos on how to use <a href="http://perfect.org/" target="_blank">Perfect</a> to serve <a href="https://www.youtube.com/watch?v=J441eJ40PH4" target="_blank">web pages</a> and how to use <a href="https://www.youtube.com/watch?v=SX9aX2aYzpw" target="_blank">Mustache</a>. These were great for helping me get things going, but I prefer a written format to video, so I am going to repeat a bit of what Ryan has done. <a href="http://www.chrismanahan.com/creating-a-web-service-swift-perfect" target="_blank">Chris Manahan</a> has a good writes up on getting a Perfect project running on how to use MySQL with Perfect so I won't repeat that.<br />
<br />
So here we go: <br />
<br />
My previous <a href="http://blog.dan.burton.name/2016/05/working-with-swift-subclasses.html" target="_blank">blog post</a> shows how I created classes to serve my MySQL tables as JSON. Here is my<br />
<span style="color: #333333; font-family: "menlo"; font-size: 11px;">PerfectServerModuleInit </span>Where I add one route to return JSON from my auto_make table.<br />
<div style="color: #333333; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">public</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> PerfectServerModuleInit() {</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Routing</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Handler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">registerGlobally</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span> </div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">// Create Routes</span></div>
<div style="color: #333333; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Routing</span><span style="font-variant-ligatures: no-common-ligatures;">.Routes</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">[</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"/auto_make"</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">]</span><span style="font-variant-ligatures: no-common-ligatures;"> = { </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">_</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">AutoMakeRecord</span><span style="font-variant-ligatures: no-common-ligatures;">() }</span></div>
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: Menlo; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<span style="color: #4f8187;">}</span></div>
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: Menlo; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<span style="color: #4f8187;"><br /></span></div>
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: Menlo; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="color: black; font-family: -webkit-standard;">
</div>
<div>
<br /></div>
</div>
I'm creating a web service for my app, but I also want to have a web interface that allows me to administer content for the app. So I need to serve some static pages like my stylesheet to give the look and feel of my service and then of course some dynamic pages. <br />
<br />
To get static pages I add a route and connect it to the StaticFileHandler that is part of the PerfectLib.<br />
<br />
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-family: "menlo";">public</span><span style="color: #333333; font-family: "menlo";"> </span><span style="color: #bb2ca2; font-family: "menlo";">func</span><span style="color: #333333; font-family: "menlo";"> PerfectServerModuleInit() {</span></div>
<div style="color: #008400; font-family: menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Routing</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Handler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">registerGlobally</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span> </div>
<div style="color: #008400; font-family: menlo; font-size: 11px; line-height: normal;">
</div>
<div style="color: #008400; font-family: menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">// Create Routes</span></div>
<div style="color: #333333; font-family: menlo; font-size: 11px; line-height: normal;">
<div style="color: #4f8187; font-family: Menlo; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">Routing</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.Routes</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">[</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"/*"</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">]</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> = { </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">_</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">StaticFileHandler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">() }</span></div>
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Routing</span><span style="font-variant-ligatures: no-common-ligatures;">.Routes</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">[</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"/auto_make"</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">]</span><span style="font-variant-ligatures: no-common-ligatures;"> = { </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">_</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">AutoMakeRecord</span><span style="font-variant-ligatures: no-common-ligatures;">() }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;"><span style="color: #4f8187; font-family: "menlo";">}</span></span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<br /></div>
Now I need to have a file in the webroot. So in my Xcode project I create a group called webroot and add my .css file and background image:<br />
<br />
<a href="http://1.bp.blogspot.com/-2qCzvg20ijQ/V0Bj5tO4mCI/AAAAAAAAPDA/cPHSSSeyw3YSKxrioU6rwzTZ8w6pZuoPgCK4B/s1600/webroot.png" imageanchor="1"><img border="0" src="https://1.bp.blogspot.com/-2qCzvg20ijQ/V0Bj5tO4mCI/AAAAAAAAPDA/cPHSSSeyw3YSKxrioU6rwzTZ8w6pZuoPgCK4B/s400/webroot.png" /></a><br />
<br />
This is great, but to get the server to find these files we need to have them copied into the webroot in the Products Directory. So I select my CarHealthServer project and the Build Phase. Then click on the "+" and add a "New Copy Files Phase"<br />
<br />
<a href="http://4.bp.blogspot.com/-z-aiyfAqhoY/V0Bmcj1_PkI/AAAAAAAAPDM/LMM73MBJuogTRnY7_ULtxV8lQKuusG33wCK4B/s1600/copy.png" imageanchor="1"><img border="0" height="138" src="https://4.bp.blogspot.com/-z-aiyfAqhoY/V0Bmcj1_PkI/AAAAAAAAPDM/LMM73MBJuogTRnY7_ULtxV8lQKuusG33wCK4B/s320/copy.png" width="320" /></a><br />
<br />
Then I will click on the "+" in the copy files phase and add the files that are in my webroot group. Here I have added a couple of extra files, a vehicles.html and a shop messages.mustache. I'll talk about the .mustache file later.<br />
<a href="http://2.bp.blogspot.com/-Hk2Cz4idabw/V0Bn30rcJFI/AAAAAAAAPDg/mjAyS54gS_QNGkZZCfXJrHSviSQsfbtiQCK4B/s1600/copy%2Bfiles.png" imageanchor="1"><img border="0" height="141" src="https://2.bp.blogspot.com/-Hk2Cz4idabw/V0Bn30rcJFI/AAAAAAAAPDg/mjAyS54gS_QNGkZZCfXJrHSviSQsfbtiQCK4B/s320/copy%2Bfiles.png" width="320" /></a><br />
<br />
So now when we run our server and go to http://localhost:8181/BackView.css in my browser I get the contents of my .css file.<br />
<br />
I want a page that will let me create an html document that will get saved in a MySQL table. So I create a file call shopmessage.mustache:<br />
<br />
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<div style="font-family: Menlo; line-height: normal;">
(Sorry blogger is having problems with this, and I am feeling lazy so you get a picture or this file)<br />
<a href="http://3.bp.blogspot.com/-lOElCWSYdCQ/V0ByaES4DKI/AAAAAAAAPEA/98ygyO-YZtgGeX9Y4dtANOaYaS07nBvkwCK4B/s1600/mustache.png" imageanchor="1"><img border="0" height="217" src="https://3.bp.blogspot.com/-lOElCWSYdCQ/V0ByaES4DKI/AAAAAAAAPEA/98ygyO-YZtgGeX9Y4dtANOaYaS07nBvkwCK4B/s400/mustache.png" width="400" /></a></div>
</div>
<div style="font-family: Menlo; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="font-family: Menlo; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"></span></div>
<br />
The important things here are "{{% handler:ShopMessageHandler}}" which specifies the class that will handle the dynamic content for the mustache file, and "{{doc}}" which is supplied by the handler. Here is my ShopMessageHandler.swift class:<br />
<div>
<br /></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">import</span><span style="font-variant-ligatures: no-common-ligatures;"> PerfectLib</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"></span><br /></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">class</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> ShopMessageHandler:</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">PageHandler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"></span><br /></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> valuesForResponse(context: </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">MustacheEvaluationContext</span><span style="font-variant-ligatures: no-common-ligatures;">, collector: </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">MustacheEvaluationOutputCollector</span><span style="font-variant-ligatures: no-common-ligatures;">) </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">throws</span><span style="font-variant-ligatures: no-common-ligatures;"> -> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">MustacheEvaluationContext</span><span style="font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">MapType</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> values = </span><span style="font-variant-ligatures: no-common-ligatures;">MustacheEvaluationContext</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="font-variant-ligatures: no-common-ligatures;">MapType</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> values[</span><span style="font-variant-ligatures: no-common-ligatures;">"doc"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">] = </span><span style="font-variant-ligatures: no-common-ligatures;">"my shop message"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="font-variant-ligatures: no-common-ligatures;"> values</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
}</div>
<br />
Now I need to modify the PerfectServerModuleInit to register the ShopMessageHandler.<br />
<br />
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">public</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> PerfectServerModuleInit() {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">PageHandlerRegistry</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">addPageHandler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"ShopMessageHandler"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">) { (r: </span><span style="font-variant-ligatures: no-common-ligatures;">WebResponse</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">) -> </span><span style="font-variant-ligatures: no-common-ligatures;">PageHandler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">ShopMessageHandler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">() }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="color: #31595d; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Routing</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Handler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="font-variant-ligatures: no-common-ligatures;">registerGlobally</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">// Create Routes</span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">Routing</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.Routes</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">[</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"/*"</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">]</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> = { </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">_</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">StaticFileHandler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">() }</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Routing</span><span style="font-variant-ligatures: no-common-ligatures;">.Routes</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">[</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"auto_make"</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">]</span><span style="font-variant-ligatures: no-common-ligatures;"> = { </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">_</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">AutoMakeRecord</span><span style="font-variant-ligatures: no-common-ligatures;">() }</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
}</div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span></div>
In the valuesForRespose I create a dictionary of the values to be used in the .mustache file. In this case there is just one value and it is hard coded to a static string. But this now gives me the framework to develop my service.<br />
<br />
Now when I go to http://localhost:8181/shopmessage.mustache I get this:<br />
<br />
<a href="http://4.bp.blogspot.com/-EjcUCdYNM2k/V0Bro7UClWI/AAAAAAAAPDw/kvqz8hDG9r4RP9gms7S6ePsjlo7menS6wCK4B/s1600/carhealth.png" imageanchor="1"><img border="0" height="237" src="https://4.bp.blogspot.com/-EjcUCdYNM2k/V0Bro7UClWI/AAAAAAAAPDw/kvqz8hDG9r4RP9gms7S6ePsjlo7menS6wCK4B/s320/carhealth.png" width="320" /></a></div>
</div>
</div>
</div>
</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-9956822636547079792016-05-20T10:47:00.002-06:002016-05-20T12:05:50.470-06:00Working with Swift subclasses<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
I decided to build the web service for my iOS and Android app using Perfect which is a Swift server implementation. I am using MySQL to host a database and wanted to a nice way to get the database tables written out as JSON. I had some problems but here is what I came up with:<br />
<br />
My first attempt was to create a base class that I could subclass for each table type and do the read/write database operations and the JSON operations in the base class. But I ran into a lot of problems getting the base class to access the overridden properties and methods of the subclasses. Then I discovered this. Fist I create a simple protocol that all the record classes will use:<br />
<br /></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">protocol</span><span style="font-variant-ligatures: no-common-ligatures;"> DatabaseRecord : </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">RequestHandler</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> sqlTableName: </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">get</span><span style="font-variant-ligatures: no-common-ligatures;">}</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> loaded: </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Bool</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">get</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">set</span><span style="font-variant-ligatures: no-common-ligatures;">}</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> loadRow(row: [</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">])</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> getDictionary() -> [</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;"> : </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">]</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> load(forName:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> load(forID:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span><span style="font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> getAll() -> [</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">AnyObject</span><span style="font-variant-ligatures: no-common-ligatures;">]</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">init</span><span style="font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;">}</span><br />
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span></div>
<div style="font-family: -webkit-standard; white-space: normal;">
</div>
<div style="font-family: -webkit-standard; white-space: normal;">
Then I create an extension to the protocol so all of this will get added to all of the classes that implement the DatabaseRecord protocol.</div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">extension</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">DatabaseRecord</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: -webkit-standard; white-space: normal;">
<br />
The methods here to load from the database don't seem like a big deal, but this just didn't work as a super class because despite all my google searching and efforts I couldn't get the base class to call the subclass methods or get the sqlTableName from the sub classes. But as an extension this jus works without any strange code.<br />
<br /></div>
<div style="font-family: -webkit-standard; white-space: normal;">
</div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> loadFromDatabase(query:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">) {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> mysql = </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">MySQLConnection</span><span style="font-variant-ligatures: no-common-ligatures;">.mysql;</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"></span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">MySQLConnection</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">connectToMySQL</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">defer</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> mysql.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">close</span><span style="font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> mysql.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">query</span><span style="font-variant-ligatures: no-common-ligatures;">(query) {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">let</span><span style="font-variant-ligatures: no-common-ligatures;"> results = mysql.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">storeResults</span><span style="font-variant-ligatures: no-common-ligatures;">() {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> results.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">numRows</span><span style="font-variant-ligatures: no-common-ligatures;">() >= </span><span style="color: #272ad8; font-variant-ligatures: no-common-ligatures;">1</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">let</span><span style="font-variant-ligatures: no-common-ligatures;"> row = results.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">next</span><span style="font-variant-ligatures: no-common-ligatures;">() {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">loadRow</span><span style="font-variant-ligatures: no-common-ligatures;">(row)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> load(forName:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">) {</span></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">self</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">loadFromDatabase</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="font-variant-ligatures: no-common-ligatures;">"SELECT * FROM </span><span style="color: black; font-variant-ligatures: no-common-ligatures;">\</span><span style="font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">sqlTableName</span><span style="font-variant-ligatures: no-common-ligatures;">) WHERE name = \"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">\</span><span style="font-variant-ligatures: no-common-ligatures;">(</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">forName</span><span style="font-variant-ligatures: no-common-ligatures;">)\""</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> load(forID:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span><span style="font-variant-ligatures: no-common-ligatures;">) {</span></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">self</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">loadFromDatabase</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="font-variant-ligatures: no-common-ligatures;">"SELECT * FROM </span><span style="color: black; font-variant-ligatures: no-common-ligatures;">\</span><span style="font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">sqlTableName</span><span style="font-variant-ligatures: no-common-ligatures;">) WHERE id = \"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">\</span><span style="font-variant-ligatures: no-common-ligatures;">(</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">forID</span><span style="font-variant-ligatures: no-common-ligatures;">)\""</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: -webkit-standard; white-space: normal;">
<br />
This next method was where I had the most problems. I tried using Self, dynamicType, and everything else I could think of to get the sqlTableName from the subclasses and got it going but the creating objects of my subclasses and adding them to an array that I would return seemed impossible. Now as an extension the sqlTableName just works, and I can create a new object of the correct class using self.dynamicType.init() and add it to the array. </div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> getAll() -> [</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">AnyObject</span><span style="font-variant-ligatures: no-common-ligatures;">] {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> records = [</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">AnyObject</span><span style="font-variant-ligatures: no-common-ligatures;">]()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> mysql = </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">MySQLConnection</span><span style="font-variant-ligatures: no-common-ligatures;">.mysql;</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">MySQLConnection</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">connectToMySQL</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">defer</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> mysql.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">close</span><span style="font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> mysql.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">query</span><span style="font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"SELECT * FROM </span><span style="font-variant-ligatures: no-common-ligatures;">\</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #4f8187;">sqlTableName</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">)"</span><span style="font-variant-ligatures: no-common-ligatures;">) {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">let</span><span style="font-variant-ligatures: no-common-ligatures;"> results = mysql.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">storeResults</span><span style="font-variant-ligatures: no-common-ligatures;">() {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> results.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">forEachRow</span><span style="font-variant-ligatures: no-common-ligatures;"> { row </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">let</span><span style="font-variant-ligatures: no-common-ligatures;"> obj = </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">self</span><span style="font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">dynamicType</span><span style="font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">init</span><span style="font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> obj.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">loadRow</span><span style="font-variant-ligatures: no-common-ligatures;">(row)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">let</span><span style="font-variant-ligatures: no-common-ligatures;"> o = obj </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">as</span><span style="font-variant-ligatures: no-common-ligatures;">? </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">AnyObject</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> records.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">append</span><span style="font-variant-ligatures: no-common-ligatures;">(o)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="font-variant-ligatures: no-common-ligatures;"> records</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<span style="font-family: -webkit-standard;"><span style="white-space: normal;"><br /></span></span>
<span style="font-family: -webkit-standard;"><span style="white-space: normal;">PerfectLib has a JSON encoder but when I tried to use it, it would crash. It was late and the JSON that I need to generate was simple so I just quickly wrote this to create the JSON for my table:</span></span>
<br />
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> encodeAsJSON(dicts:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Array</span><span style="font-variant-ligatures: no-common-ligatures;"><[</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">]>) -> </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> str: </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;"> = </span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"["</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">for</span><span style="font-variant-ligatures: no-common-ligatures;"> dict </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="font-variant-ligatures: no-common-ligatures;"> dicts {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> first = </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">true</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">for</span><span style="font-variant-ligatures: no-common-ligatures;"> (key, value) </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="font-variant-ligatures: no-common-ligatures;"> dict {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> !first {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> str.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">appendContentsOf</span><span style="font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">","</span><span style="font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> } </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">else</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> first = </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">false</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> str.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">appendContentsOf</span><span style="font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"{\"</span><span style="font-variant-ligatures: no-common-ligatures;">\</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">(</span><span style="font-variant-ligatures: no-common-ligatures;">key</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">)\":\"</span><span style="font-variant-ligatures: no-common-ligatures;">\</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">(</span><span style="font-variant-ligatures: no-common-ligatures;">value</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">)\"}"</span><span style="font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="color: #3d1d81; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> str.</span><span style="font-variant-ligatures: no-common-ligatures;">appendContentsOf</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"]"</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="font-variant-ligatures: no-common-ligatures;"> str</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<span style="font-family: -webkit-standard; white-space: normal;"><br /></span>
<span style="font-family: -webkit-standard; white-space: normal;">Now I can add a request handler to the extension and now all my database record classes have a easy way to take a http get request and turn it into JSON array.</span>
<br />
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> handleRequest(request: </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">WebRequest</span><span style="font-variant-ligatures: no-common-ligatures;">, response: </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">WebResponse</span><span style="font-variant-ligatures: no-common-ligatures;">) {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">let</span><span style="font-variant-ligatures: no-common-ligatures;"> records = </span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">getAll</span><span style="font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> dicts = </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Array</span><span style="font-variant-ligatures: no-common-ligatures;"><[</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">:</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">]>()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">for</span><span style="font-variant-ligatures: no-common-ligatures;"> rec </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="font-variant-ligatures: no-common-ligatures;"> records {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">if</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">let</span><span style="font-variant-ligatures: no-common-ligatures;"> r = rec </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">as</span><span style="font-variant-ligatures: no-common-ligatures;">? </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">DatabaseRecord</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">let</span><span style="font-variant-ligatures: no-common-ligatures;"> dict = r.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">getDictionary</span><span style="font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> dicts.</span><span style="color: #3d1d81; font-variant-ligatures: no-common-ligatures;">append</span><span style="font-variant-ligatures: no-common-ligatures;">(dict)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="color: #31595d; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> response.</span><span style="font-variant-ligatures: no-common-ligatures;">appendBodyString</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(</span><span style="font-variant-ligatures: no-common-ligatures;">encodeAsJSON</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">(dicts))</span></div>
<div style="color: #4f8187; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> response.</span><span style="font-variant-ligatures: no-common-ligatures;">requestCompletedCallback</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;">}</span></div>
<span style="font-family: -webkit-standard;"><span style="white-space: normal;"><br /></span></span>
<span style="font-family: -webkit-standard;"><span style="white-space: normal;">So then I have a simple Swift class representing a SQL database record. For example:</span></span><br />
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">
</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="font-variant-ligatures: no-common-ligatures;">/*</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;">auto_make SQL table</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> +-------------+------------------+------+-----+---------+----------------+</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> | Field | Type | Null | Key | Default | Extra |</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> +-------------+------------------+------+-----+---------+----------------+</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> | id | int(10) unsigned | NO | PRI | NULL | auto_increment |</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> | name | varchar(255) | YES | | NULL | |</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
+-------------+------------------+------+-----+---------+----------------+</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> */</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
</div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">class</span><span style="font-variant-ligatures: no-common-ligatures;"> AutoMakeRecord: </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">DatabaseRecord</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> id: </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span><span style="font-variant-ligatures: no-common-ligatures;">?</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> name: </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;"> = </span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">""</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> loaded: </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Bool</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
</div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> sqlTableName: </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="color: #d12f1b; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">"auto_make"</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> loadRow(row: [</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">])</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">id</span><span style="font-variant-ligatures: no-common-ligatures;"> = </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">Int</span><span style="font-variant-ligatures: no-common-ligatures;">(row[</span><span style="color: #272ad8; font-variant-ligatures: no-common-ligatures;">0</span><span style="font-variant-ligatures: no-common-ligatures;">]) ?? -</span><span style="color: #272ad8; font-variant-ligatures: no-common-ligatures;">1</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">name</span><span style="font-variant-ligatures: no-common-ligatures;"> = row[</span><span style="color: #272ad8; font-variant-ligatures: no-common-ligatures;">1</span><span style="font-variant-ligatures: no-common-ligatures;">]</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">loaded</span><span style="font-variant-ligatures: no-common-ligatures;"> = </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">true</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> getDictionary() -> [</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;"> : </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">] {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">var</span><span style="font-variant-ligatures: no-common-ligatures;"> dict = [</span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">: </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">]()</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> dict[</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"id"</span><span style="font-variant-ligatures: no-common-ligatures;">] = </span><span style="color: #703daa; font-variant-ligatures: no-common-ligatures;">String</span><span style="font-variant-ligatures: no-common-ligatures;">(</span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">id</span><span style="font-variant-ligatures: no-common-ligatures;">!)</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> dict[</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"name"</span><span style="font-variant-ligatures: no-common-ligatures;">] = </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">name</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="font-variant-ligatures: no-common-ligatures;"> dict</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span></div>
<div style="color: #bb2ca2; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">required</span><span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">init</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">() {</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">loaded</span><span style="font-variant-ligatures: no-common-ligatures;"> = </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">false</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;">}</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
</div>
<span style="font-family: -webkit-standard; white-space: normal;"><br /></span>
<span style="font-family: -webkit-standard; white-space: normal;">Now a public method that registers the routes.</span>
<span style="font-family: -webkit-standard; white-space: normal;"> </span>
<span style="font-family: -webkit-standard; white-space: normal;">
</span>
<br />
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">public</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">func</span><span style="font-variant-ligatures: no-common-ligatures;"> PerfectServerModuleInit() {</span></div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Routing</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Handler</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">.</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">registerGlobally</span><span style="color: black; font-variant-ligatures: no-common-ligatures;">()</span> </div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
</div>
<div style="color: #008400; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: black; font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">// Create Routes</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">Routing</span><span style="font-variant-ligatures: no-common-ligatures;">.Routes</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">[</span><span style="color: #d12f1b; font-variant-ligatures: no-common-ligatures;">"/auto_make"</span><span style="color: #31595d; font-variant-ligatures: no-common-ligatures;">]</span><span style="font-variant-ligatures: no-common-ligatures;"> = { </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">_</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">in</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #bb2ca2; font-variant-ligatures: no-common-ligatures;">return</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #4f8187; font-variant-ligatures: no-common-ligatures;">AutoMakeRecord</span><span style="font-variant-ligatures: no-common-ligatures;">() }</span></div>
<div style="font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="color: #4f8187;">}</span></div>
<span style="font-family: -webkit-standard; white-space: normal;"><br /></span>
<span style="font-family: -webkit-standard; white-space: normal;">And it is easy to create additional classes for database tables and add them to the routes. </span><span style="font-family: -webkit-standard; white-space: normal;">
</span>
<span style="font-family: -webkit-standard;"><span style="white-space: normal;">Of course I will want to create http handlers that will allow to more than just dump out tables to JSON, but this now gives me the base I need to create the rest of my web service.</span></span><span style="font-family: -webkit-standard;"><span style="white-space: normal;">
</span></span>
</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com1tag:blogger.com,1999:blog-7190548.post-64827635283319702852016-01-29T11:41:00.001-07:002016-01-29T11:41:10.674-07:00Land of Opportunity <div dir="ltr" style="text-align: left;" trbidi="on">
I used to work with a woman from India. One day we were talking and she referred to the USA as "loo". I had no idea what she ment. Yeah, I have heard the phrase Land of Opportunity, but hadn't given it much thought.<br />
<br />
Wikipedia entry for Land of Opportunity says, "<span style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px;">The</span><span style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px;"> </span><b style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px;">land of opportunity</b><span style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px;"> </span><span style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px;">is a phrase used to suggest that a place presents many possibilities for people to earn a prosperous living, and succeed in their economic or social objectives.</span><br />
<div style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 0.5em; margin-top: 0.5em;">
It is often used with reference to the <a class="mw-redirect" href="https://en.wikipedia.org/wiki/United_States_of_America" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #0b0080; text-decoration: none;" title="United States of America">United States of America</a>, and is similar to the concept of the "<a class="mw-redirect" href="https://en.wikipedia.org/wiki/American_dream" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #0b0080; text-decoration: none;" title="American dream">American dream</a>". It became popular among immigrant populations who left the "<a class="mw-redirect" href="https://en.wikipedia.org/wiki/Old_world" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #0b0080; text-decoration: none;" title="Old world">old world</a>" in search of a better life in the "<a class="mw-redirect" href="https://en.wikipedia.org/wiki/New_world" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #0b0080; text-decoration: none;" title="New world">new world</a>".</div>
<div style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 0.5em; margin-top: 0.5em;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 0.5em; margin-top: 0.5em;">
<span style="-webkit-text-size-adjust: none; color: black; font-family: -webkit-standard; font-size: small;">Politicians talk about making America great again. I think we sometimes loose sight of the fact that America is great. I don't mean that in a prideful way. I have no desire to argue if America is greater than somewhere else. There are a lot of great places in this world, and America is a great place. </span></div>
<div style="-webkit-text-size-adjust: auto; color: #252525; font-family: sans-serif; font-size: 14px; line-height: inherit; margin-bottom: 0.5em; margin-top: 0.5em;">
<br /></div>
<div style="line-height: inherit; margin-bottom: 0.5em; margin-top: 0.5em;">
This is definitely a land of opportunity. We will see how this goes but I am thinking of writing a few political posts talking about the blessings we enjoy. Next post will be more on LOO. </div>
</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com1tag:blogger.com,1999:blog-7190548.post-41223241272712174602015-12-03T06:29:00.002-07:002015-12-03T06:29:58.374-07:00Antarctica Weather: extremely difficult <div dir="ltr" style="text-align: left;" trbidi="on">
One hundred years ago Ernest Shackleton and his team attempted to cross Antarctica. They didn't make it to the South Pole but their expedition became one of the greatest adventure stories ever written.<br />
<br />
Two expeditions are commemorating Shackleton's expedition.<a href="http://shackletonsolo.org/" target="_blank">Shackleton Solo</a> has been going for 20 days. Henry is battling fierce winds and demoralizing whiteous. Meanwhile <a href="http://www.shackleton2015live.com/blog" target="_blank">Shackleton 2015</a> is waiting at Union glacier for a freak in the weather so they can fly to their starting point.<br />
<br />
A lot of things have changed over the last 100 years, but the unrepentant weather in Antarctica remains just as challenging as ever.<br />
<br />
I wish the best for the two expeditions trying to make a trans Antarctic crossing. </div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com1tag:blogger.com,1999:blog-7190548.post-21851026166422688182015-11-06T08:58:00.000-07:002015-11-06T08:58:14.764-07:00I got lazy<div dir="ltr" style="text-align: left;" trbidi="on">
The shuffle mode on the iPhone doesn't do a good job of randomizing. It likes to play the same songs over and over and then some songs never get played. This morning on the way to work the phone started playing an audio recording from the day I was at the South Pole, something the phone hasn't selected to play for nearly two years.<br />
<br />
It was interesting to hear what I had to say that day. A few weeks ago I was looking at my journal and noticed that it stopped the day before I got to the South Pole. I had gotten lazy and did the final journaling using audio recordings instead of writing.<br />
<br />
I think it is interesting that the story I tell has not changed from what I said in that audio recording. We all know of stories that grow in the retelling. My story however seems to be staying true to the actual events.<br />
<br />
Anyway, hearing this has made me want to get the movie made. Now that I have a job I can actually put some money towards getting the movie made and so I can feel good about starting up a Kickstarter to get the movie done.<br />
<br />
One of the first things I need to do with a new job, and thus a new computer is to set the desktop picture. So I took this picture from a bike ride a couple of months ago and divided it into thirds so it could span all three monitors.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-6MR3j80WPag/VjzNcYzg-eI/AAAAAAAAOkk/juzdl1A-hMA/s1600/left.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="222" src="http://2.bp.blogspot.com/-6MR3j80WPag/VjzNcYzg-eI/AAAAAAAAOkk/juzdl1A-hMA/s320/left.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-7I88xKqyZkc/VjzKtxT3c0I/AAAAAAAAOkU/CFj3uNTR1Gk/s1600/middle.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="222" src="http://4.bp.blogspot.com/-7I88xKqyZkc/VjzKtxT3c0I/AAAAAAAAOkU/CFj3uNTR1Gk/s320/middle.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-MiQ2ayEQEGw/VjzNcz1zHKI/AAAAAAAAOko/FU0SouD7j9Y/s1600/right.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="http://1.bp.blogspot.com/-MiQ2ayEQEGw/VjzNcz1zHKI/AAAAAAAAOko/FU0SouD7j9Y/s320/right.png" width="320" /></a></div>
<br />
<br />
<br />
<div>
<br /></div>
</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-57312139663165240832015-11-03T09:27:00.001-07:002015-11-03T09:34:09.494-07:00I'm Committed<div dir="ltr" style="text-align: left;" trbidi="on">
Or maybe the title should be "I should be committed!" <div>
<br></div>
<div>
I just started a new job as a software developer for Xactware. It is about 25 miles round trip from my home. I committed to myself that I would bike every day to work. Yesterday was getting set up. Getting access to the showers etc. So today is the first day of the biking to work commitment.</div>
<div>
<br></div>
<div>
From the vantage point of Xactware looking across Utah Valley it looks nice. A mix of clouds and blue sky. Looks like the prefect day to bike to work. But that is not what it was like while I was biking.</div>
<div>
<div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/--LgyCxS-n_s/Vjjh_7d8_VI/AAAAAAAAOjY/WxRvqy9Bvic/s640/blogger-image--215754793.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/--LgyCxS-n_s/Vjjh_7d8_VI/AAAAAAAAOjY/WxRvqy9Bvic/s640/blogger-image--215754793.jpg"></a></div><br></div>
<div>
I decided to use my aero road bike (Giant Propel) today. Bad choice. It was windy all night, and this morning there was a bit of rain mixed into the high winds. Oh well, I'm committed. </div>
<div>
<br></div>
<div>
As I started the rain started to pick up, by the time I was headed down the highway towards Saratoga Springs the road was a flow of water and the winds were threatening to push the little bike right out from under me, or worse toss me into the rush hour traffic. </div>
<div>
<br></div>
<div>
I try to obey the laws, like stop signs and stop lights. I failed this morning. First in the driving rain the light turned red right before I got there the icy rain pelting the side of my face was bad enough that I slipped through the light. Then when stopped at the next light I tried to time it so I would start across the intersection the moment it turned green. Sitting still in that rain was no fun. However there was a turn signal at that light so my timing was off and I went through the intersection before the light turned green. </div>
<div>
<br></div>
<div>
So I guess I gave the bike haters out there more things to complain about. I'm sorry, but man that was bad weather!</div>
<div>
<br></div>
<div>
<br></div>
</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-50421701642616936362015-08-31T17:23:00.002-06:002015-08-31T17:23:45.169-06:00Why Do I Like My Miata So Much?<div dir="ltr" style="text-align: left;" trbidi="on">
I think I'm slowly figuring things out.<br />
<br />
A few months ago I rode my bike from Utah to the Oregon coast to go buy back my old Miata. But my old Miata came with a bonus, a not quite as old Miata to use as parts. So for that last few months I have needed to make a second trip to Oregon to get the parts is parts car. Last week I finally got in my old truck and headed out to get the car.<br />
<br />
Not long after getting into the truck I am reminded that driving is a <b>boring</b> activity. I'm not sure what all is involved, a creative mind that likes to be active, and a body that likes to be active, or what but I can't drive for long before I get bored and have troubles staying awake. So a little Red Bull, a little more Red Bull, and even more Red Bull and I am able to endure the 14+ hours it takes to get from my home to Astoria Oregon. First thing I notice when I get out of the truck is how jittery I am.<br />
<br />
Then a couple of nice days riding my bike and it is back to the truck. Even the couple of hours of driving down to Newport is way to long to be sitting in a truck. Then comes the true test, driving back home. With the car on a trailer behind the truck I have to drive slower, and with the nap somewhere in the middle of Oregon it ends up taking about 24 hours to get back home.<br />
<br />
Shortly after getting my Miata back the convertible top broke, making it hard to put the top up or down. Now with the spare parts car I got to work and swapped doors, fixed seatbelts, and fixed my convertible top.<br />
<br />
So today I had to go for a short drive. Putting the top down it starts out as a fun ride, but then I realized why I like don't really like driving and why the Miata is so much better.<br />
<br />
I like to be creative, I don't like to be caged in, I like freedom, freedom of expression, freedom of movement, just basically the feeling that I can do what I need to do. But in a car (or truck) your freedom is severely limited. First of all you are boxed into a little cage. Then you must stay between the lines. There are speed limits that if you get caught breaking then you have to sit around while some cop that has been trapped in his own cage takes his time to give you a fine for your attempt to enjoy the ride. But then even without the speed limits there are stop lights, stop signs, and all kinds of rules that you have to conform to. And if that was not limiting enough you are always surrounded by other cars that limit you freedom of motion.<br />
<br />
So I think the reason I like the Miata so much is that when I put the top down, to some degree I escape the cage of being in a car. It gives me a sense of freedom. I find myself swerving back and forth in-between the lines of my lane. My little bit of freedom makes me want more. And so I like the Miata.<br />
<br />
But mountain biking is even better. I am not in any kind of cage. I feel free to roam and explore. I love mountain biking. But maybe all of this factors into why I hate the rule that mountain bikes are not allowed in the Wilderness areas. Wilderness areas are set apart so that we can escape the confines of our modern world. What I love about mountain biking is also what I love about being in the Wilderness. Too bad I am not allowed to combine the two.<br />
<br />
I just love to ride my bike.</div>
Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0tag:blogger.com,1999:blog-7190548.post-69603091513072318162015-08-27T01:01:00.001-06:002015-08-27T01:01:44.815-06:00Fat bike Oregon coast day 2Today I retraced back form Nehalem back to Astoria. Only this time I knew not to do the trail through Ecola. <div><div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-JIKj1-61h4Y/Vd61vbkha-I/AAAAAAAAOc4/---DJU_qvo8/s640/blogger-image-801941796.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-JIKj1-61h4Y/Vd61vbkha-I/AAAAAAAAOc4/---DJU_qvo8/s640/blogger-image-801941796.jpg"></a></div><br></div><div>I knew high tide would be in the morning and I might end up waiting at Arch point. I took my time riding up the beach taking pictures and getting some video. Still when I got near arch point the tide was too high. So I hung around eating and enjoying the view. Then I decided to make my attempt. Timing in between the surges I worked my bike through the rocks. When a surge would come in I climbed up rocks to keep my feet dry. It worked well until I was about 10 feet from clearing the rocks when a big surge got me. Wet feet for the rest of the day. </div><div><div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-SF02Adc13SE/Vd611NFuqFI/AAAAAAAAOdQ/K1aN1PwbAqg/s640/blogger-image-597910595.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-SF02Adc13SE/Vd611NFuqFI/AAAAAAAAOdQ/K1aN1PwbAqg/s640/blogger-image-597910595.jpg"></a></div><br></div><div>When I got to Hug point the waves had just gotten low enough to make it passable, but the wet rocks made it evident that not long before it would have not been passable. Other than the people not paying any attention getting through was not a problem. </div><div><div class="separator" style="clear: both;"><div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-txVafOhac-k/Vd61xR-8AxI/AAAAAAAAOdA/JqJpda3QEmU/s640/blogger-image--221025280.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-txVafOhac-k/Vd61xR-8AxI/AAAAAAAAOdA/JqJpda3QEmU/s640/blogger-image--221025280.jpg"></a></div><br></div><br></div><div>The return trip was easier and faster since I knew the problem areas. It was a great day that ended with a dense fog coming in off the ocean. </div><div><div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-Rmgt0u2fksg/Vd61zoy_B8I/AAAAAAAAOdI/PNC25kx3SJA/s640/blogger-image--819320952.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-Rmgt0u2fksg/Vd61zoy_B8I/AAAAAAAAOdI/PNC25kx3SJA/s640/blogger-image--819320952.jpg"></a></div><br></div>Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com1tag:blogger.com,1999:blog-7190548.post-47408681690916433922015-08-26T09:03:00.001-06:002015-08-26T12:27:05.378-06:00Even wool socks get wet. Oregon coast fat bike<div><span style="font-family: 'Helvetica Neue Light', HelveticaNeue-Light, helvetica, arial, sans-serif;"><div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-M7igSNh_9-Y/Vd3WxB0oa8I/AAAAAAAAOcE/0_VonsOdlYI/s640/blogger-image--617170656.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-M7igSNh_9-Y/Vd3WxB0oa8I/AAAAAAAAOcE/0_VonsOdlYI/s640/blogger-image--617170656.jpg"></a></div><br></span></div><div>I<span style="font-family: 'Helvetica Neue Light', HelveticaNeue-Light, helvetica, arial, sans-serif;"> had an incredible day of biking. I talked to a state park beach patrol guy before I headed out. After I left he figured out who I was. He then tracked me down on the beach. Kind of cool, a guy from New York, working on the Oregon coast and had heard about my South Pole expedition so we took some pictures at the north end of the park which my starting point for riding south. </span></div><div><div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-_jF8B8zykHI/Vd3XVvpAn8I/AAAAAAAAOcU/4EQUJI1ptJA/s640/blogger-image--1877508369.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-_jF8B8zykHI/Vd3XVvpAn8I/AAAAAAAAOcU/4EQUJI1ptJA/s640/blogger-image--1877508369.jpg"></a></div><br></div><div>The beach riding was incredible. The beach is littered with dead jelly fish, crab legs and shells and sand dollars. The winds come off the ocean from the north west. So traveling south is generally fast and relatively easy. </div><div><br></div><div>First obstacle? A military range. They were going to be firing something so they had check points at the north and south ends of the firing range. I was told I could go through, but no stopping and get through fast so you don't get shot. I guess I'm still alive so it must have worked.</div><div><div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-0tzrwxlvQnA/Vd3XDJAdaZI/AAAAAAAAOcM/cT7POjt9DkY/s640/blogger-image-1093880391.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-0tzrwxlvQnA/Vd3XDJAdaZI/AAAAAAAAOcM/cT7POjt9DkY/s640/blogger-image-1093880391.jpg"></a></div><br></div><div>After about 17 miles, at Seaside, there is a river that enters the ocean. The Oregon coast trail map says to get off the beach and explains how to get around the river. I missed the exit. </div><div><br></div><div>When I got to the river there was a nice sand bar with seagulls wandering around. The water between didn't look too deep. Can I get to the island and then to the other side? The beach patrol guy thought it might be possible. I headed out into the river. A nice splash splash rhythm followed. Fun, but now my feet are wet and I probably got salty water into the bottom bracket. Arriving on the island and assessing the situation. Yeah, I probably could wade across, but I would be very wet and I would have to float the bike. Finally my senses kick in and I retrace the route back towards the exit I was suppose to take. But wait, a path goes through the weeds up there. It turned out to be a great fun shortcut. </div><div><br></div><div>Back to the beach for a few miles. Again the map says to leave the beach, but this time it goes on a trail over the point. Cool! I climb the hill to the Ecola? state park and find the trailhead. There is a sign there that has a hiker, a horse rider, and a bike. A faint line goes through the horse and bike. I think two options, bikes are not allowed or it looks like it could be the work of a vandal I pick the second interpretation. The trail is steep, has a lot of root step ups and is nasty for a bike. I meat people that say, all the other bikers give up and turn around. I'm not that smart and keep going. It is a hard climb to work a bike up. A lot of dead fall on the trail makes it even worse. Finally I get to the top. Yes it levels out for a couple of miles, and a mountain bike that is not loaded with gear could ride it, that is assuming the rider isn't hammered from getting up the trail. So after 4 miles of nasty hike a bike I finally get to the hikers camp, and a narrow service road that goes to the trailhead at the south end. I jump on the road. Fast fun downhill in a rainforest. Awesome. Looking back there is a third possibility for the sign. Some biker made the line to warn other bikers that it isn't worth it. </div><div><div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-MycEBqSgSM0/Vd39wHe00PI/AAAAAAAAOck/NBkWKpyl2FQ/s640/blogger-image--1607993378.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-MycEBqSgSM0/Vd39wHe00PI/AAAAAAAAOck/NBkWKpyl2FQ/s640/blogger-image--1607993378.jpg"></a></div><br></div><div>At the bottom the trail continues on. This trail does not say anything about bikes and it looks decent. I start on it. It may have been rideable but I'm beat up from the last trail and running low on water so I turn around and use the road to get back to the beach. A lot of climbing on that road for a beat up cyclist. </div><div><br></div><div>Some more great beach riding. The map says that you need a low tide to get around the next point. It is about mid tide and rising, but a hiker says that it is doable, and it was. At one point Oregon cut through some of the rocks to make it possible to travel down the beach. I guess this was before highway 101. It is kind of a cool little passage followed by some caves and se areas where the water was surging into the rocks. If I times it well I could go between waves and work my way through the rocks and sand. Next is arch way point. The map says to leave the beach here. I go through the arch, and down the beach until I get to falcon point area. Here there is no way to continue on the beach and I have to climb up a steep trail to get to the road. Then the road goes very steep up to 101.</div><div><br></div><div>The climb up to the top of falcon point was hard and near the top I drank a Coke. It don't even freeze while I was opening it. </div><div><br></div><div>The road down to Nahem? Beach, sorry no internet connection here to get the right spelling, is steep and fast. I passed the of road trails for the Oregon coast route. Again not designed for biking. Going down the road I hit the highest speeds I think I have ever done in a fat bike. This flatish tires don't handle well at those speeds. </div><div><br></div><div>I got to the hiker biker camp just as it was getting dark. It was a great day. However it is a lot different than I hoped. I have come to the conclusion that you need to think of this as a beach and road ride, not the beach and mountain biking trip I was thinking of. So I think I should get back to the truck so I can get the trailer sold as soon as possible. The experiment is done time to be a little responsible. </div>Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com1tag:blogger.com,1999:blog-7190548.post-50330706627840757792015-08-24T23:43:00.001-06:002015-08-24T23:43:20.471-06:00Heaven on Earth-- Oregon coast fat bike day 0<div class="separator" style="clear: both;"><a href="https://lh3.googleusercontent.com/-LubUQL6y2Nw/VdwAdgx2lhI/AAAAAAAAObg/F39n3wR_U_k/s640/blogger-image-1317174913.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://lh3.googleusercontent.com/-LubUQL6y2Nw/VdwAdgx2lhI/AAAAAAAAObg/F39n3wR_U_k/s640/blogger-image-1317174913.jpg"></a></div><div class="separator" style="clear: both;"><div class="separator" style="clear: both;"><br></div><div class="separator" style="clear: both;">I woke up early this morning so that I could drive from Eagle Mountain Utah to Astoria Oregon where I will begin the my ride. There are so many fires in the western states that it was very smoky all the way until Portland. The final fire was in the wilamina area just outside of Portland. Finally after over 800 miles and 13 hours I was out of the smoke. </div><div class="separator" style="clear: both;"><br></div><div class="separator" style="clear: both;">I don't know what it is about the Oregon coast range mountains. When I reached the Coast Range a smile so large, as Carissa would say, it was so large it would make me have to close my eyes. I think I Oregon just runs in my blood. I was born in Corvallis on the east side of the mountains, but it is more than that. George Luther Boone and Alphonzo (sp?) Boone, my great great something grand parent and father, were some of the original Trailblazers in Oregon and settled in Toledo. George's place is still known as Boone island to this day. They say you can't shake a tree without Boone relatives falling out. I know I have a lot of Boone relatives in this area. </div><div class="separator" style="clear: both;"><br></div><div class="separator" style="clear: both;">I also have some Czech relatives in the area. In particular, Oswego Oregon. I don't know many of my relatives that live here in Oregon. However when my grandma Helen and grandpa Daniel Boone's ashes were sent out to sea I met my Czech relatives. They look just like my Grandma. </div><div class="separator" style="clear: both;"><br></div><div class="separator" style="clear: both;">As I drove through the "rain forest" tears flowed as I remembered sending my grandparents off to their final resting place. But not just for them, but for my mother too. I remember her telling me how much she loved the Oregon rain forest. And when she needed peace she left Utah and moved to the Oregon coast. She was so anxious to move out here that she bought a house that seemed to be falling off the hill and into the ocean. The floor sloped more than any camping spot I have ever placed a tent. I am sure that some day that house will fall off the hill if it isn't torn down first. But my mom loved the house. She loved the forest and the beaches. She would often talk of Cannon Beach, and she loved to go down to Agate Beach to collect agates. I could rarely find an agate but she was a master of finding the agates and other rocks that would be great for polishing. </div><div class="separator" style="clear: both;"><br></div><div class="separator" style="clear: both;">It is hard to imagine that heaven could be as lovely as the Oregon coast. But I am imagine that my mom's heaven is a lot like Oregon, and maybe her home in heaven seems as if it is about to fall into the ocean. </div></div>Dpburtonhttp://www.blogger.com/profile/04244073357994457266noreply@blogger.com0