Categories
Geeky/Programming Life

Dell Dies, And In Its Place..

A MacBook Pro. Yes, and it is awesome.

So the story, my Dell laptop was humming along fine, but then recently I heard some clicking, and was like WTF? Asked Emily “Did this fall on the ground or something”… “No… but I dropped a glass on it”… Oh man, and you know, one month after the warranty expires, as usual.

So this weekend I went to the Apple store and spec’d out a sweet MacBook Pro. 4 GB ram, High Res, everything. Picked up .Mac cheaper since I was getting a machine (soon to be MobileMe).

Right now I am running Vista in a virtual machine, giving it 2 GB, and it flys. This is probably the sweetest machine I have ever used 🙂 I am using VMWare Fusion instead of Parallels like by MacBook, figured Fransen said it was good, so I would try it. I like it.

I really like the light up keyboard. What else? Like they say, everything just works. Take for example my Verizon EVDO card. In XP or Vista, you have to install the connection manager, hope it works, hope all the drivers install, and then hope it launches. You run into admin issues, and just a ton of other stuff. In the MacBook? I plugged in the card, 2 seconds later, connected. No install, nothing. Just worked. God send.

So I think I am an Apple Guy now. iPhone, MacBook, MacBook Pro. Mighty Mouse (wired and bluetooth) and a bluetooth Keyboard. And on the 11th, I will get the 3G iPhone. When I think about it, all I need Windows for is Visual Studio 2005, 2008 and SQL Server stuff. Everything else I can do on the Mac, and with Virtualization, it is almost seamless. I like it.

What’s next? AirPort Extreme, AppleTV, Time Capsule…

I don’t think I will go back, unless something totally changes with the machines and the OS…

Categories
Random

4 Stages of Karaoke Songs

We have all been there. At some bar, karaoke bar, whatever, and just watched people sing. There are really good people, really bad people, weird songs, good songs, and everything in between. But over time, I have come to pick up the 4 stages of Karaoke Songs.

Why am I even thinking about this? Well I need to pick 4-5 songs for the band, as we are going to learn some new songs, I think my first pick is Piano Man, we will see.

Anyways, here are the 4 Karaoke “songs” that you can do

1) You really suck, and you pick a no-name, horrible song

Everyone knows these ones, someone who can’t sing, or someone who is trying to be stupid, and they pick some song that even the KJ doesn’t know

2) You are really awesome, you pick a no-name horrible song

This is ok, if you really rock. Someone singing some “Little Shop Of Horrors” b-side that no one knows, but rocks it, is usually ok, but boring

3) You really suck, you pick an awesome song

Don’t go here. You take a song everyone wants to hear, dance even, and you sing to soft, or just bad. Please don’t do this!

4) You are really awesome, you pick an awesome song.

The best choice, you can rock out and you pick a song everyone knows, they feel like they are at a concert, with PBR and Tator Tots!!

Now get out there and sing, or at least make fun of someone else singing!

Categories
Geeky/Programming Life Ramblings Random

More Boring Tech..Atari, Brats, iPhones, Rock Band (fake and real!)

Well, new job is going OK. Not much to report really, as you can see from the lack of posting. No new tech or anything interesting leads to… well, boring posts like this. Basically I am knee deep in an older ERP system, and doing report mods and small .NET applications to automate some things, but nothing really exciting. A couple of weeks ago though I went through some online MSFT trainings for .NET 3.5 and SQL 2008 (free clinics on microsoftlearning.com) and that was some good info, now only if I could use it. 🙂

In other news, I picked up an SNES and TWO Atario 2600’s for like 55 bucks, with like 30 games, which is pretty cool. Went to “Bratfest 2008” and helped set the new world record for brat’s consumed.

Picked up Rock Band, so have been hitting that a little bit, but even better news is that I have been playing keyboards more now, and if everything goes right, will be playing with a local band here in Madison in a little while. I am learning the songs now and have some down and ready to go already.. fun stuff.

The iPhone 2.0 Firmware is going ok. Kind of slow at times. I am kind of mad, I lost all my pix of BratFest and other things from Memorial Day weekend, when the new Beta6 firmware came out, I updated, but dummy me forgot to download my pics to my computer first. I tried the Paraben Device Seizure tool that has been used to forensically get data off refurbed iPhones, but it didn’t work, didn’t find anything. oh well, I won’t forget to get the pics from now on 🙂

There is a lot of hoop jumping to get the new firmware loading. Creating certs, importing their certs, creating appid, provisioning profiles, blah blah blah. I do really like the exchange push email, and with my fetch Google Apps email, its like everything right there. That coupled with Google Reader and the Facebook iPhone site, I don’t even need a laptop to browse around anymore…

Also waiting for this Democratic Primary to be over, so things can move on to the General Election. This year needs to be different, if the last 8 years are any indication of what could be, things just need to change.

Last year on this day, my first day in PDX. Time flies.

Categories
Geeky/Programming

Windows Update Crazy Error (on XP)? This Might Fix It

This weekend I decided to put XP on my laptop for a day to see how it ran. I hated it. Yeah it was fast. But it just seems… old..

Anyways, Vista is back on now (I still might go back to Win2k8). But.. while I had XP installed for 4 hours, I tried to do Windows Update and it kept failing and failing. I went and found the WindowsUpdate log file, and at the bottom,

AUClnt FATAL: Error: 0x80004002. wuauclt handler: failed to spawn COM server
Handler FATAL: 0x80004002: ERROR: Remote update handler container process created (PID: 2912), but exited before signaling event
Agent * WARNING: Exit code = 0x80004002

Well, after some digging, found you need to re-register the Windows Update dll’s (you can put these cmd’s in a batch file and run it)

regsvr32.exe c:windowssystem32wuweb.dll
regsvr32.exe c:windowssystem32wups2.dll
regsvr32.exe c:windowssystem32wups.dll
regsvr32.exe c:windowssystem32wucltui.dll
regsvr32.exe c:windowssystem32wuaueng1.dll
regsvr32.exe c:windowssystem32wuaueng.dll
regsvr32.exe c:windowssystem32wuapi.dll

I also restarted the Automatic Updates service. Tried it again, and it worked. Weird, but it works 🙂

Categories
Geeky/Programming

Firefox 3 and Google Apps Email – Default mailto Handling

Firefox 3 has a cool new feature to allow you set default mailto handlers from the preferences. Here is how you can use Google Apps (GAFYD) as the default mailto handler.

1. In Firefox’s address bar, copy and paste the following and hit enter:
about:config

2. Click “I’ll be careful, I promise!� when the warning appears

3. In the “Filter:� field, copy and paste:
gecko.handlerService.allowRegisterFromDifferentHost

4. Double click the found result to change the boolean value from false to true

5. In the address bar, copy and paste the following:
javascript:window.navigator.registerProtocolHandler(“mailto”,”https://mail.google.com/a/yourdomain.com/mail/?extsrc=mailto&url=%s”,”Google Apps”)

6. Replace “yourdomain.com” with your own Google Apps hosted domain and hit enter

7. Click “Add Application� when it asks you a question

8. go to Edit > Preferences > Applications > mailto

9. Choose “Use Google Apps�

Categories
Life Ramblings

An Update about Jobs, Games and Phones, Car Radios, Oh, and Who Moved My Cheese?

Just an update and some rambling. I haven’t blogged much lately because, well the blog material is in low quantity. Why? Because I just changed jobs! Previously I was a Independent Contractor (for W3i) and now I am a consultant with a new company (Stratagem) here in Madison. As always when you wind down a job you are leaving, there isn’t much “work”, more training in people or just finishing up things. Also, in the new role, I just started today, so once things get rolling there the wheels in my head will be going again.

In other news? I picked up GTA IV and Guitar Hero III for Xbox 360. I am liking them both so far. If you want to play, hit me up, my gamertag is ScaleOvenStove.

Also, I had to bite the bullet and actually subscribe to at&t. I probably didn’t have to, but I have been reading reports and blogs of people in Madison getting their T-Mobile shut off. Why? Well T-Mobile doesn’t cover Madison. Einstein PCS and at&t cover Madison (for GSM coverage). Now, with T-Mobile, my main market was the St. Cloud MN market, and I had a St. Cloud npa-nxx (read: area code and first 3 digits). My plan was nationwide roaming, so basically as long as I was on T-Mobile, it was ok. Even when I was in PDX, it was probably OK since I was on T-Mobile’s towers.

Now, in Madison, there are NO T-Mobile towers. So that means I was constantly roaming on at&t (oh the irony) or Einstein PCS. T-Mobile probably has some program on their backend that looks for patterns like this (constant roaming in a different market) and they then shut you down because you are costing them way to much money and really you aren’t in your correct market.

Next step? Register with at&t – but I had to get a new number as well. Why? You can change your number – but only within the same markets. WLNP stands for Wireless LOCAL Number Portability. The “local” part is key 🙂 – so since I had a St. Cloud number there is no way I could port it over. I still have both numbers, and once the 3G iPhone comes out, I will get that, give my original iPhone to Emily and then change my T-Mobile St. Cloud number to a pre-paid T-mobile account.

Whew, what a debacle huh? 🙂

What else? I want a new car radio for my Vibe. Thing is, I cannot find the one that I want. I want everything 🙂 Bluetooth, USB, Aux, GPS, Double Dinn, etc, etc. Just not out there. And Best Buy, Circuit City, and even Local shops (Radio Doctor), just seem … well, lacking. You go in and half the spots where radios are supposed to be are empty, or they don’t work, it just seems very amateurish, maybe its just me.

So, for now, my feet are rooted in MSN (that has to be the worst airport code – since it is the same as Microsoft’s MSN).

Categories
Business Intelligence Geeky/Programming SQLServerPedia Syndication

SQL Server Reporting Services: Quick way to get 10 digit year (all the zero's) using String.Format

Dates are fun. See, by default most dates come out like 5/6/2008. But computers, and programs like them formatted as 05/06/2008. That way, all the dates, no matter what month or day, are all the same length, cool huh?

Well, in Reporting Services, if you have a date field coming back in a dataset, and you want to format it as a 10 digit string, there are about 50 different ways to do it. You can use old VBA Left and Mid etc, or you can use String.Format like..

=String.Format(“{0:MM}/{0:dd}/{0:yyyy}”,CDate(Fields!CalendarDate.Value))

Categories
Geeky/Programming Ramblings

Hacking Microsoft Pro Photo Tools – Using Reflector to use MapPoint Lat Long Lookup (for free!) in C#

The other day, Microsoft came out with “Microsoft Pro Photo Tools” which allows you to geocode your photos. It is a pretty cool app, but there are some things that I wonder, like why didn’t they just build this functionality into Windows Live Photo Gallery?

Anyway’s, with any new thing I download and play around with, I started digging into stuff. I looked in the install directory, C:Program FilesMicrosoft Pro Photo Tools and noticed that there are some Interop assemblies and other assemblies, etc. I fired up Reflector and started disassembling the assemblies and exe. Pretty cool stuff, you can see what they are doing. Using xaml forms, etc. The cool stuff is the Location based stuff.

Microsoft has MapPoint web services which you can use/sign up for, but they cost a pretty penny. I have used some of these web services in the past and they have a ton of functionality.

Like I said, digging through the disassembled stuff in Reflector, I saw a method “GetLatitudeLongitude()” which takes in country, state, city, address, zip and returns a lat long object. But, you need a “MapPointWrapper” object to use it.

I fired up Visual Studio 2008, and then referenced the assemblies in the Pro Photo Tools directory so I could use them in code. I created a test WinForms app, and started hacking away.

Looking at the MapPointWrapper class constructor in Reflector, I noticed that it needs a username, password, URL, and timeout, the first three I don’t have – but I bet I could find!!

Here you can see the constructor as it looks in Reflector. The thing I noticed right away is that they have the username and password embedded in the function, although its all “encoded”, then blend the strings together to create default credentials. Their blend method is using some bitwise operators, etc, if you are interested, you can just click on the Blend method and it browses to that (did I mention Reflector is cool??) – anyway’s, I still need a URL…

image

Reflector lets you click on a class and “analyze” it, which gives you what classed depend on it, which classes use it etc. Just going through the list for MapPointWrapper, I found one that showed how they call the constructor.

image

That’s the ticket! You can see they are passing in empty strings for user/pass (which then gets converted to the correct user/pass by the constructor) and then the URL is right there!!! nice! We can use this!!

Now, on to using this functionality in our own app!!

image

Now, this will give you the lat/long back from MapPoint! Sweet. Now we can start digging into everything else – what else do these assemblies expose?? Can I get routes? directions? Maps? etc, etc, etc. There is a plethora of things to dig into. It looks like they are just using Virtual Earth though to get maps, not MapPoint (from what I can tell anyways).

I know there are a ton of other ways to get this info, but this was basically a test to reverse engineer their assemblies and use the functionality. I don’t recommend or condone hacking/reverse engineering assemblies like this for profit, more for fun , in other words – don’t use this in a production app as Microsoft would probably find out and come hunt you down.

This post is also just an example of how .NET code can be disassembled easily and re-used, for good, or evil 🙂

There are some basic things that every developer should do with .NET desktop apps – use Dotfuscator (which just obfuscates your code, making it harder/not feasible to reverse engineer, and also encrypt any strings/values you don’t want anyone else using or reading. That being said, Reflector is a great way to see how other applications are coded, and learn how they work. Happy Coding Hacking!

Categories
Uncategorized

links for 2008-05-01

Categories
Geeky/Programming

Auto Submit Form in ASP.NET With Javascript

Not sure if this is the best way to do this, but this is what I do. Say you want to auto submit a form on an aspx page. You can call document.formname.submit(); from the body onLoad event and it will submit, but ASP.net will automatically post it back to itself.

I tried added buttons with different postbackUrl’s, clicking the submit button in javascript, etc to no avail.

First, what I had to do was put on my ASP Classic hat. Look at your <form> and remove the runat=”server”

Then, you can say document.formname.submit(); and it will submit your form.

How do you pass data though?

Well, you have to created input fields, probably hidden like

<input type=”hidden” name=”blah” id=”blah” value=”<%= Request.QueryString[“myvalue”] %>” />

Then you can pass data from another page or whatever and auto submit your form.

It would be nice if you could say in your Page_Load() something like

 

btnSubmit.Click(); and it would automatically click it and submit your form, but that doesn’t seem to be available at all.

Like I said, there is probably a better way to do this, and it shouldn’t be this complicated, but a few minutes googling for answers left me up in the air. Funny how something that is so easy in ASP Classic turns out to be harder in ASP.NET. ASP.NET wants you to really post back to the same page by default. It hijacks the “action” attribute on the form no matter what with runat=”server on there.