Saturday, December 31, 2011
New Years
Happy New Years all.
Tuesday, December 27, 2011
Missed Weekend
I woke up Saturday at 4:30. No idea why, I just woke up. Then by the time I put the pup to bed, I was pretty useless and fell back asleep. Then we went out to lunch and Christmas eve with the inlaws. Then Sunday was Christmas day at my folks. I had a feeling it wouldn't happen, but I could hope for the best, yes?
Well, this weekend will be leading into a five day PTO request where I will be off of work from the 31st to the 8th. With that much time off and no goals/plans/need to be anywhere I'm hoping I can find an hour a day to spend P90ing...
Tray 13, Day 18
Now it's been 18 days with tray 13, feeling pretty normal and not painful or anything. But now I get to swap trays in the morning to number 14. Then 2 weeks and I get to go to my dentist to get the last 5 trays.
Saturday, December 24, 2011
Advent Day 24
Friday, December 23, 2011
Missing it...
Didn't think I'd say that, but I miss it. This will be Christmas weekend coming up. Dinner with the in-laws Saturday, probably all day Sunday with my family. Don't know if it'll work well for starting a fitness regime, but I think I'm going to try.
I have said that before, but it usually doesn't happen (one of my problems, I know), but here's to hoping.
Thursday, December 22, 2011
Advent Day 22
This has always been my favorite ship from the star wars universe. No idea why...
Wednesday, December 21, 2011
Tuesday, December 20, 2011
Monday, December 19, 2011
Sunday, December 18, 2011
Saturday, December 17, 2011
Advent Day 17
Woohoo...
At least we get a light saber for the Rebel Pilot/Luke now.
Friday, December 16, 2011
Thursday, December 15, 2011
Wednesday, December 14, 2011
Advent Day 14
[Edit] Mouse droid.
Tuesday, December 13, 2011
Monday, December 12, 2011
Advent Day 12
Sunday, December 11, 2011
Saturday, December 10, 2011
Friday, December 9, 2011
Trays 13, Day 1
So we had a snow storm yesterday, and driving home I remembered that I took out my invisalign trays at lunch, got swamped when I got back and never got them back in. They were also sitting in their case on my desk back at work, and I certainly wasn't turning around to go get them.
When I got home, I realized that Wednesday the 7th was the halfway point for trays 12. So instead of going back to 11, I decided to go forward, and I'm not on trays 13. I'll be here for almost three weeks, then tray 14. Then I have an appointment for a check up with my dentist, and will be receiving trays 15-19 (the final stretch).
Hopefully this doesn't mess things up too badly. Last night was pretty painful, but I did manage to make it through the night only waking up a few times. Teeth felt way off, but in the mirror they aligned in the trays much better than when I first put them in last night.
Slight uncomfort today, no more than when I do a normal tray swap. Should be all good in a couple days, then just the routine of having plastic teeth for two week.s
Thursday, December 8, 2011
Wednesday, December 7, 2011
Tuesday, December 6, 2011
Advent Day 6
Monday, December 5, 2011
Sunday, December 4, 2011
Saturday, December 3, 2011
iPod Touch
It rebooted to a clean state (somewhere it hasn't been in the two years I've had it, and I believe it started somewhere on iOS version 3). When I did a clean reinstall on my Motorola Droid it made a difference, hopefully it will clean up whatever little kinks there are in my iPod Touch (3rd Generation).
So here I sit. It restored from backup, rebooted because the settings got copied back over, and is now doing a resync. Waiting on step 5 of 5, Syncing Apps.
[Edit]
Wow, 10 minutes later, still step 5/5, syncing app 31/70. This may take a while...
Friday, December 2, 2011
Advent Day 2
[Edit]
Confirmed, name is Nute Gunray
Thursday, December 1, 2011
Wednesday, November 30, 2011
Lego Star Wars Advent Calendar
I'm not sure how this will work on my phone, but the box image should be included.
Sunday, November 27, 2011
Dog Treats
Yup, that's right. Neither my wife or I like them, but I currently have 6 large sweet potatoes, or 7 trays worth, sliced, blanched and drying on the counter at home. Washed briefly in the sync, sliced in half to have clean edges and used a mandolin slicer to cut them in approx 1/4 inch slices.
Then dropped them into boiling water for five minutes. After boiling for five minutes dumped into an ice bath for five minutes to stop all cooking.
Then drained, laid them out on the dehydrator trays, stacked the trays and dehydrated for 10 hours. Not exactly exciting, but we now have a whole OXO container of dehydrated sweet potato chips. No preservatives, no additives, fresh, natural and loved by the pup.
Makes me want to get some ground beef and make some jerky...
Thursday, November 24, 2011
Holidaze (how original, I know)
Well, thanksgiving is upon us. The wife hung some lights outside this morning, I played some Call of Duty: MW3.
Now we are on our way to Underwood, IA to celebrate with family. Will try not to do the normal (gorge), and stick more to protein and veggies than carbs.
Here's to good intentions.
Wednesday, November 16, 2011
Tray 11, Day 1
Thursday, November 3, 2011
Tray 10, Day 2
Wednesday, November 2, 2011
December 17th, 2011
Someone said "Arg" in response to having a report formatted incorrectly which lead to the thought it was pulling wrong data (it was displaying 0, which was rounded down from 0.14). My manager made a reference to talk like a pirate day being last month. There was a bit of hearing issue when he said it because I was focusing on something else, and I thought he said "Talk like a Pilot" day. Well, did a little research and the Wright Flyer had it's first flight on December 17th, 1903.
Unfortunately with a little Googling I found there is already a reference to Talk like a Pilot day, and it is May 19th.
I hate thinking I have an awesome idea, and come to find out it's already been done, as far back as to 2007 at least (site I found was listing 2009 as the third annual talk like a pilot day). Guess I'll just bring this idea back into the hanger.
Sunday, October 30, 2011
P90X - Starting over
Yesterday (Saturday the 29th) I started day one over again. I have noticed that I am still sore afterwards, but the exercises didn't seem quite so difficult and I'm not as sore as my original day 1. So here's to me thinking I've built up some muscle strength which is making it easier. The second round I did have the attempt a push up and just collapse on my face into the carpet, so that's something. When I weighed myself on Friday it was 242.2. Here's hoping to get that down to the 220 range.
Also, I signed up for an account on Fitocracy ( www.fitocracy.com ). An interesting site that you log your workouts, and it gives you points. Having done some bench presses this week (trying to build up a bit of strength before the chin/pull up & push up routine that was yesterday) I managed to hit level 2. Logging the P90X routine jumped me straight from a level 2 to a level 4. I'll be ready to stop grinding on these sewer rats pretty quickly if I'm able to keep this up.
Almost to tray 10
I have noticed with tray 8 and 9 though that instead of being in pain for a day after they are first put in, I'm in pain for about 3 days. Like I mentioned, I think that's due to more of the angle positioning.
This pain isn't just related to the front teeth either, I'm feeling it more in my molars as well. O well, 20 more weeks and some change, then I'll be able to have these attachments taken off, stop speaking with a slight lisp, and be able to feel my teeth again. Yipee!
Thursday, October 20, 2011
Submit Button Double Click
Trying to think if a good way to disable the button on click, but still do the post back, I Googled around, found a solution, then modified it just a bit to work for my situation.
So on the page I have in the page directive, AutoEventWireup="true", and the element:
The OnClick event is defined as normal with:
protected void btnSubmit_Click(object o, EventArgs e)
{
//Code here
}
So I just added the method:
protected override void OnInit(EventArgs e)
{
this.btnSubmit.Attributes.Add("onclick", "javascript:" +
"document.getElementById('" + this.btnSubmit.ClientID + "').disabled=true;" +
this.GetPostBackEventReference(this.btnSubmit));
base.OnInit(e);
}
This add's the javascript to disable the button on click, and still causes the postback element to happen. Thus submitting the payment information to the third party payment processor, and prevents the user from multiclicking the button.
Well, I guess they can still multiclick it, it's just not going to do anything after the first click.
Wednesday, October 19, 2011
Enabling CAPTCHA for SiteFinity blog posts
Enabling CAPTCHA on a SiteFinity Blog
Thank you Gabe!
Tray 9
\\ //
// \\
they come together more like
|| ||
|| ||
I'm definitely ready for this process to be over. 19 trays total, I'm about half way through.
Monday, October 3, 2011
Apathy
Have a shirt that says that, and I'm kinda feeling it. In regards to P90X at least.
I started out super awesome. On a program that is designed to run for 13 weeks with activities 7 days a week, the 7th day being a rest or stretch program, I was hitting 6 of those days activities. Got that for 3 weeks straight. The fourth week is a recovery week, and the schedule changes a bit. I hit 4 workouts that week. Then the routine flips back to a steady workout. Hit 6 workouts the first week, 3 the next, and I think I only got one workout in this past week. I think if I follow the original schedule, this puts me back into a recovery week.
I'm not sure where I'm going with this, but I feel the need to post it. I originally started this with the hopes that by putting it on the internet, I would feel some liability or responsibility to keep to the program. Right now, I'm not feeling it...
Friday, September 23, 2011
Friday the 23rd
Last night I did the Back and Biceps P90X routine. Not too bad. Feel like it blasted my arms and was useless last night. This morning is a bit different and don't feel as destroyed. Shortly after working out though my right knee just exploded in pain. Being that my day started at 4:20/4:30 with a barking puppy, and was pretty long the day before, I don't know if I just needed a good nights sleep or what.
This morning it still hurts, but it's thankfully only about half as bad as it was last night. Had a good breakfast, made a fruit smoothie and left my invisalign at home today (could kick myself over that one).
Hopefully today's a quick one.
Tuesday, September 20, 2011
Another Day
Let's see...
Today is day 14 of tray 6, that means I get to change my Invisalign tomorrow. The day should be full of pain and unease, followed by thirteen days of meh and then a repeat.
Last night was day one of week 6 of P90X. That means Chest, Shoulder & Tricep exercise. Got about half way through before my arms completely gave out and I collapsed into a push up. Ended the hour finishing the exercises with lighter weight and modified reps. Feel beat this morning still. Tonight is Plyometrics, so that should be fun.
Programatically, I'm still just working away. Plugging away at code and database stuff at work. Don't have much free time to improve my trade, since I'm using my free time to improve me.
Personally, I'm enjoying watching the end of season 6 of Doctor Who on Amazon Instant. Have also borrowed an Asus Eee Transformer Android 3.x based tablet from a co-worker. He's letting me borrow it for a couple days to get a feel for it. I like the device, and think I could use it as a laptop replacement. It has a full keyboard that transforms it into a netbook style device as well as adds to the battery life. I like it, but wish it had a user profile feature since my wife wants to use it as well. Also not sure if I want to pay for one. Might have to be a "get so much paid on credit cards reward thing." But that even sounds like a bad idea because then I would owe more on credit cards. I wonder how much my existing laptop would be for a tax write off as a goodwill donation. Might have to look that up.
Wednesday, August 3, 2011
Week 2, Day 4
Holy hell that makes a burn sensation. Reminds me a lot of the pilates routines with your legs up in the air.
Speaking of which, I might try and dust off the Windsor routine and swap that in for some of the days just to mix it up. Who knows.
Tray 3, Day 8
But I miss gum.
I really miss gum. I used to chew A LOT of gum. It was my distraction to get through my day without clenching my jaw or snacking a lot.
Sunday, July 31, 2011
Tray 3, Day 4
Nothing major going on. Discomfort the first day, but it didn't seem to carry through the next three days the way that trays 1 and 2 did. Must have gotten the teeth all loose and shifty and they're not resisting it as much.
My only issue is these attachments. With the trays on, no issues. Getting the trays off has become a little more difficult, due to the shape of some of the attachments. And when the trays are off, they have some sharper edges so they rub the inside of my cheeks, and I also seem to bit my cheeks more when I chew now. I don't know if it's subconscious or not, but I'm blaming the attachments.
Week 2, Day 1
From the legs and back routine I am finding myself a little sore in the calf and gluts. Now that I've done shoulders and arms I'm finding my arms and shoulders a bit sore/worn out too.
Should make for a great day. Have plans to mow, and potentially do some yard work as well. I wonder how that will affect everything. Should make me ravenous too. Must remember to not start gorging on food.
Saturday, July 30, 2011
Week 1, Day 7
All went well. The wall sits were the worst part overall. The only other problem I had was when I needed to support my weight on my right leg. It wasn't a very good knee day, and my right knee is the worse of the two. I do know that loosing the weight and building the muscle will help my knees, so I wasn't able to dip as far, and teetered a bit, but I kept with it. Hopefully the next Legs/Back day will go better.
Wednesday, July 27, 2011
Tray 2, Day 21
Went in today, got my attachments attached. Was a bit like having a filling put in with bonding it to my tooth, then using that blue light thing to cure it. Four on the top, two on each side, six on the bottom, three on either side.
About an hour and a half after getting them, I clicked out my trays to eat lunch, and one of them popped off. So now I have an appointment with my dentist tomorrow to get it reattached. Regardless, it's now another new tray day, so a bit of uncomfortableness. Hopefully I can sleep tonight, and it doesn't bother me.
Week 1, Day 4
Yesterday was Day 3, so that was Shoulders and Arms. This wasn't nearly as bad as I thought it would be. I managed to lower the reps to something I could handle and repeat without killing myself (8-12 rather than the 20 or so they did for some exercises). And got through it. My arms feel a little sore, but nothing as bad as my lats still hurt from Chest and Back on day 1.
Today was Day 4. That was Yoga X. I had some issues because I didn't watch this one prior. So I waited for a bit in cat pose and would watch them do the routine, then I would repeat. So I was always 5-10 seconds behind, but I did what I could and tried to keep up. It was a very long video, and a lot of Warriors and Downward Dogs.
Tuesday, July 26, 2011
Sore...
So its noon, and i believe im still sore from the chest & back work out on Sunday. The part that hurts most, and i google it to make sure it was right, are the lat, right in the back part of my arm pits. My delts hurt a bit too, but anything that requires the arms to go chest height or higher is pain.
But its a sore/worked pain, not an injured pain. Tonight should be interesting.
Plyo Morning After
My legs aren't as sore as I thought they would be, but the muscles on the sides, right over the ribs and under about where your elbows are when your arms are by your sides are SORE. I looked in the mirror this morning and full on expected to see some big ole bruises, that's what it felt like.
I see Shoulders & Arms are on the schedule for tonight... That should be fun when it hurts to lift my arms anywhere above my shoulders. I'll give the video a watch today before doing it, see how bad it is, and go through it at my own pace like I have been. It's more than I've been doing, he said we could in the video, and at least I'm building up to the speed they go in the video.
O, I almost forgot. In the plyo routine he made a comment about hitting pause on the DVD or VHS. Do people still buy VHS's?
Monday, July 25, 2011
Week 1, Day 2
The warm up didn't wear me out as much as yesterday's warm up, and I was almost able to keep up. I wasn't able to keep pace with Tony and the crew, but I went a little slower and was able to keep up with the exercises.
Then about half way through my quads were ON FIRE. I wasn't able to keep up with all the exercises, but I did manage to start out and do half of each exercise then needed a bit of personal rest time. It was pretty rough, and I was a sweaty mess.
Between the sore muscles from yesterday, and now the sore muscles from today, I should be a real mess in the morning. I have a feeling I'll definitely be sleeping until the alarm goes off.
Week 1, Day 2
All I know is the alarm went off at six to get ready for work, and for the first time in a long time I was asleep when that happened, and felt like I could have kept sleeping for a long time. Hopefully it doesn't make a long day at work.
Sunday, July 24, 2011
Week 1, Day 1
Well, in my natural out of shape shape, it was hell. I stuck with it, went through the entire Chest and Back, and decided that the Ab Ripper can wait until week two. I did no where near the amount of exercise that the people in the video did, but as Tony mentioned, I showed up, and I stuck with it.
About 3/4 of the way through it, there was a point to do push ups. I got in the push up position, went down, and instead of coming back up like I planned in my head, I collapsed and was face down in the carpet. Got up and was able to finish 4 push ups, then there was a break/stretch section and after that it wasn't as bad.
It's currently 10PM, so 14hours after I completed the Chest and Back section and my arms, chest still feel like mush. If I had to pick myself up right now with my arms, I don't think I'd be able to do it. It's a good feeling though. I have a feeling I'll be sleeping really well tonight.
No idea what Plyometrics means, but that's on my schedule for tomorrow. We'll see how that goes. If you P90X, do you do it in the morning, afternoon or evening?
Also, did you invest in a Chin-Up Bar
Friday, July 22, 2011
Tray 2, Day 16
Still feels weird not having my bite guard at night, but I've been sleeping with that for 3+ years now, so I've been pretty used to it.
First Post
In high school, and through college I maintained a 200 to 210 weight. Then I got a desk job, stopped moving, and had work instead of school. Like I stated, I'm now 250, and by BMI standards that puts me into the obese category. My father has developed Type 2 diabetes, and I want to loose the weight to put less stress on my body, and hopefully avoid that, as well as other things.
I recently got P90X from a co-worker who it was too tough for. I'm going to give it a try, as a friend dropped a bunch of weight with it and was happy with it. I've heard it will kick my ass, and be painful, but my current path won't get me where I need to be.
We currently have a treadmill and a weight bench. I have been using the treadmill for 20 minutes and then 20 or 30 of different arm based weight lifting a couple nights a week, but I want to step up my game. I'm planning on getting things setup, watching the first video without doing it so I know more about what's coming, and aren't constantly watching the TV while trying to do the routines. Then the process is setup for 7 days a week (7th day being rest or stretch) for 13 weeks, or 91 days. Hopefully I can keep up with it.
Tuesday, July 12, 2011
Tray 2, Day 6
I noticed something interesting this morning, that actually went a few days with out recognition. I can now pop my top tray in with my tongue alone, and my bottom one only needs a little help in the front. This is almost exactly where I left off with tray 1 before switching. The pain/discomfort also stopped after 2 or 3 three days and the sensitivity when eating has gone away as well. My teeth/jaw/bite feels weird when they are out, but I assume that too shall pass.
So either good sign, my teeth are moving to where they should be in this tray (ya!) or I've forced the tray to conform to my bite (boo!). I'm hoping it's the former.
Saturday, July 9, 2011
Tray 2, Day 3
Friday, July 8, 2011
Tray 2, Day 2
Thursday, July 7, 2011
Tray 2, Day 1
I can definitely feel a difference. They don't fit into my teeth as smoothly as my old trays did, but then again, my teeth were in that position, and now they need to fit into the new position. Strangely enough now, the top tray feels like it's moving my teeth more than the bottom tray does. No pain yet, just feels off. Tomorrow morning might bring pain after they've been in for several hours though. We'll see.
Wednesday, July 6, 2011
Tray 1, Day 14
Tuesday, July 5, 2011
Tray 1, Day 13
Monday, July 4, 2011
Tray 1, Day 12
My teeth though, I still haven't noticed any difference. The trays snap in very easily. I don't know if that means my teeth are moving to where they are supposed to, and the trays are fitting better, or if I'm wearing the edges of the trays and they just go on easier. I put it on my calendar on my phone to remember to swap my trays this Thursday, just so I won't forget. My mother in laws advice is that after dinner, or before bed, swap to the next set and that way they can be on for a longer period of time to do their thing. I was thinking before bed, but after dinner might work too. Get through the initial discomfort of new trays while awake, then hopefully sleep better with them. We'll just have to see how it goes.
Tray 1, Day 11
It's getting to the point that my teeth don't hurt with my trays on, but start to hurt when I take them off. Almost like without the trays my teeth are trying to move back to the position they were in.
Tray 1, Day 10
Tray 1, Day 8
Day 8 would be Thursday the 30th. I did whitening in my trays this morning. Still nothing memorable happening with my invisalign.
I keep thinking that I need to swap my trays because I have it set in my head that it happens on Thursday. Well, not on this Thursday, but it will happen on Thursdays. Hard to stop thinking that way though once it's in my head.
Tray 1, Day 9
Tray 1, Day 7
Regardless, it should be Wednesday the 29th, and nothing exciting.
Wednesday, June 29, 2011
Tray 1, Day 6
Got to use the treadmill and weights in the basement last night. Always makes me feel a little better about myself. That, and with less snacks, and trying to eat a bit healthier, I got on the scale today and it said 248.2. I had been averaging 250.x, so that's about a 2 pound drop in almost a week. Hopefully it's a trend and not a fluke, but I'll keep checking in the future and see where it goes. Hopefully it goes to 250 - (2*19) = 212lbs. Although I think 212lbs would be rather skinny, but according to an online BMI chart that still puts me a little bit in the "Overweight" category (considering right now I'm classified as obese). Hell, even 200 pounds puts me at 25, which is the starter for overweight. Stupid BMI.
Tray 1, Day 5
Still no weird pains with my teeth. A little bit of a sore jaw in the morning, probably from my teeth grinding at night (don't wear my bite guard at night anymore, just the invisalign trays).
I don't have much else to add except that I'm starting to get a weird ridge on the insides of my cheeks. Almost a straight line from back to front. I have noticed that it's about where the tray's rub. Hopefully it's just an irritation and I'll get used to it. I'd have to imagine traditional braces would do something similar, hence all my school age friends with little containers of wax to rub on their brackets.
Tuesday, June 28, 2011
Tray 1, Day 4
Was a little stressful for a work morning, which I have a tendency to clench my jaw. And since I can't chew gum now, I think I ended up causing a little too much force and my molars were hurting. That hasn't been normal, usually it is my front teeth that hurt. We'll see where this goes.
Before I left for work I put some of the whitening gel in the first half dozen teeth slots for my trays and snapped them in. I'm realizing I should have tried to do some before and after shots, but my dentist took a bunch of photos of my bite/smile/teeth when submitting to Invisalign. I wonder if I can get a copy of those shots...
Sunday, June 26, 2011
Day Three
I also noticed it was easier to pop out my bottom tray this morning. Not as easy as the top tray, but easier than it has been. My teeth also didnt hurt when they took a breather. It was also much easier to get my bottom tray back in. Again, i am hoping this trend will continue until the point of changing trays. Im hoping it means things are getting shifted to where they need to be.
Lastly, i got a complimentary tooth whitening kit from my dentist. Its three syringes of a binary compound (two liquids that twist through the tip to combine when dispensed), and i was told a little bit will be enough. Ive never used a teeth whitening product in the past, but i gave it a whirl this morning. Squeezed a little in the front 6 to 8 teeth spots in both the top and bottom tray about 30 minutes before brushing this morning. I dont know how long i need to do this to start seeing results, but should be an interesting experiment.
Saturday, June 25, 2011
Day Two
Teeth didn't hurt this morning like they did yesterday. Also don't have any problems with my top tray. It pops in and out easily. The bottom tray, which will be doing the most work in my treatment, clicks into my molars fine, but it's a bit painful to click onto or off of my incisors.
I notice I'm drinking more water because I get a bit cotton mouthy. I've also noticed I'm no snacking between meals, but I feel I'm eating a bit more at meal time. I should really start tracking my calorie intake.
So, if I'm not snacking, and drinking more water, I wonder if I'll loose any weight. I'm 6'3" and 250lbs. My BMI says I should be about 200, but I'd be happy with 220 or 230. I guess I can only weight myself regularly and see what happens.
Friday, June 24, 2011
First Day
No issues yesterday while wearing the trays, until I went to go to bed. I snapped them out, and my teeth felt like they could breath (not sure how else to describe it). Brushed, and put them back in. It's currently Friday the 24th, and my teeth were a bit sore this morning. That has since subsided a bit, and they do say new trays will cause pain/soreness for the first couple days because of the way they are pushing/moving/aligning.
Hopefully this will all go away in a couple days and then I'll just be wearing some trays/liners/retainers for a week and a half and then start some new trays.
Greetings
I made an appointment, went in and had my teeth and bite molded, and now it's 4 weeks later, all the information has come in, and I will have 19 trays (two weeks a tray) to a better bite.
Sunday, May 8, 2011
Tumblr Account
Yea 20th century, here I come. What's that, it's the 21st century? Crap, I'm late.
Thursday, April 28, 2011
My Distractions
So I'm a bit of a gamer
For Gears 1
Gears 2
Now I'm playing the Gears 3
Hit me up if you see me online, I'm willing to die by lancer. GamerTag: Zaaneek
Friday, April 22, 2011
Sql IsNull Usage
WHERE ColumnName IS NOT NULL AND ColumnName <> ''
Well, then I looked at some other code I wrote utilizing the ISNULL function, and realized I could write my SQL as:
WHERE ISNULL( ColumnName, '' ) <> ''
This took care of both options, because if it's null, it returns an empty string, the filters it out with the <> ''
Noted for future use!
Friday, April 15, 2011
LINQ goodness
Recently I had an List of events that had been loaded from a CSV file. I then needed to filter this list of 5000 events down to anything happening in a single month, lets say April.
In the past I would have written (and I started to this time as well) a foreach loop that would loop through each event in the List, check the event dates to be occuring between April 1st and April 30th. If it does, add the event to a new List, if not move to the next. Then return that new List of Aprils events.
When I started to write this, I thought to myself, this would be easy if I could query it in SQL. Then the light bulb went off and I remembered this LINQ thing I'd been laying with. I created a var named qry, and selected from my event List all those whose event dates where between April 1st and April 30th. And ta-da, i just need to return qry.ToList() and I had my result set.
This also, in my opinion, resulted in cleaner and easier to read code. Unfortunately it will also probably have me trying to put LINQ style queries everywhere...
Facebook Fangate Page
So, to follow up on my previous Facebook post, I wanted to share our solution.
The goal was a fangate page. A user goes to the page. If they are a fan, they see one page, if they are not a fan they see a page asking them to like it to view the other content.
Nothing I was finding online was working, especially since FB is moving away from FBML and towards iFrames and we needed to implement their PHP SDK. Everything we found online, and subsequently tried would prompt the user for permissions to access their account. We didn't need that, nor did we even want any of it.
Long story short, we had four files and that solved the problem (five if you count the facebook.php file from GITHUB). Assuming you already have a Facebook page setup and have created an app to mess around with-
The structure went like this/index.php
/config.php
/fanpage.php
/becomeafan.php
/library/facebook.php
/config.php looks like this
/index.php looks like this
/fanpage.php can look like whatever you want to display. For testing I made it just
/becomeafan.php can also look like whatever you want to display. For testing I made it just
On a gotcha, this only worked within a Facebook page. When running the .php files directly from the server getSignedRequest didn't return anything, and thus $like_status was always null, and the user was always sent to the becomeafan.php page.
But that's all it took. After all the searching and digging and testing and page updating and refreshing and asking others in the office to click on things.
Thursday, April 14, 2011
New Book Tirade
The Pragmatic Programmer: From Journeyman to Master
I've got a lot of reading to do...
Wednesday, April 13, 2011
Facebook PHP
To summarize briefly:
If (user likes page) Then
Display Fan Page
Else
Display become a fan page
End If
Yup. Two days, 2 developers, maybe 4 hours each and I got a five line logic structure figured out.
Thanks Facebook. Thank you for having sucked.
Tuesday, April 12, 2011
Change of direction
Also, trying to do some PHP testing I've installed IIS 7 and the PHP functionality on my Windows 7 laptop. So this should get a bit interesting.
Monday, April 11, 2011
New Book
Professional ASP.Net Design Patterns
I'm kinda exciting. Hoping it will teach some of the design stuff I didn't pick up from learning .Net on my own.
Reading Material
Sunday, April 10, 2011
F# Seconds
Difficult
So this blogging thing has become a little more diffiicult than i originally thought it would be. I don't know what I thought this journey would be, but I'm finding a real lack of time to do it.
When I get home I have two options, i could spend some time doing something like this, or I can spend it with my wife and puppy. I end up choosing the second option.
So if there's anyone that reads this and blogs themselves, how do you keep your motivation going?
Thursday, February 24, 2011
SubSonic, LINQ and Datalayers
When that company was purchased and I was repurposed to being a VB6 supporter, .Net supporter and part time Java developer, I was introduced vaguely to Hibernate. I didn't have any knowledge of it other than it was there, but knew it created the classes used for data access and provided the data persistence. Everything of the workings was nestled inside some Ant functionality that was all Greek to me. I just learned how to work in the system and did such.
After I left there and started my current job I was introduced to SubSonic. At the time it was SubSonic 2.x, and we utilized a Visual Studio integration where we could setup the web.config, run a tool, and boom, it generated all the classes needed to interface with the database. Now SubSonic 3.x is out, it requires .Net 3.5 and takes advantage of LINQ and T4 templates. This shit is now getting fun.
As an example, if a table was:
Person
{
Integer: Id
String: FirstName
String: LastName
}
In SubSonic 2.x we would have been given a class named Person with three attributes of Id, FirstName and LastName that had built in Save methods as well as a PersonCollection class to represent a group of people. To query this and get a list, we would have a method similar to:
public PersonCollection GetPeople()
{
PersonCollection toReturn = new PersonCollection();
toReturn.Load();
return toReturn;
}
If we wanted to filter we could add a line of:
toReturn.Where("FirstName", "David");
to get all people with the first name of David.
Now in SubSonic 3.0 we get to use LINQ, so the same method would look like..
public List
{
var qry = from p in Person.All()
select p;
return qry.ToList();
}
and to add the filter we can add a line to the LINQ select of:
where p.FirstName == "David"
I'm loving it!