SQL Domain Error Occurred? Hu?

by Jesse 6. June 2008 09:57

Working with some good ole Sql today, get slapped in the face with this

Msg 3623, Level 16, State 1, Procedure FindLocations, Line 9
A domain error occurred.

Gah! Considering I copied this from an in-line sql statement, I figured I was golden, wrong.  So what's going on?  The procedure that did this is doing a little calculation to determine miles away based on a lat/long value lookup.  Where's the problem?  Lat/Long values can be negative and if you know anything about math, the square root of a negative number is (!) imaginary, something sql has NO CLUE how to handle (but matlab does!). 

So, to fix this problem, and since no results will ever be negative miles away (relativity?), I pulled the calculation result into the magical "ABS" (absolute) function to give me a positive number, no matter what.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Tech | Weird | Sql

Sitefinity

by Jesse 25. April 2008 03:07

I'm starting to like these types of research projects -- I learn a ton of stuff, sometimes painfully, but its never time wasted.  Now I'm playing with SiteFinity by telerik -- which is why I needed the virtual PC.  Install is easy, download it from their site BUT there's a slight process involved.

Upon completion of my VPC, you have to install IIS (duh)

So I do.  I install sql server express with advanced services (I want the management studio) -- done and done.  Set the network service account to have write permissions to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files (you'll get an error later).  Next, install the exe and away you go.

From here, it's stupid simple.  Click create project and you'll end up with a nice CMS template site to start playing with.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

.Net | Tech

Codeplex and SilverSurvey

by Jesse 24. April 2008 16:31
Based on some feedback I got -- I've decided "why not?" and tossed the survey engine I started up to CodePlex.  I'm not going to allow anyone to join in just yet, not until I get the basic stuff setup and there's going to be a nasty learning curve that I feel coming.  So far, I've got the db project up, along with the core project itself (its kinda nice having TFS again!) -- as soon as that's done and rollin', feel free to join in.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Visual Studio | Silverlight | C# | Coding | Tech | Linq

Setting up a virtual, make life easy!

by Jesse 24. April 2008 03:30

I've loved virtual machines since hardware became cheap (stupid amounts of ram for 100$) -- I love 'em, been using them for a while now and today, I've been tasked with creating one.  Yay!  As with anything, there's a couple tricks I've found, kind of best practice thing, but not quite.  You can get a lot of this good stuff for free, so pick your favorite and go with it.  I use virtual PC since its easy to move them around from desktop to desktop.

First, let's be elementry, make sure you have enough RAM/CPU to run these things -- 1gb of ram is do-able, 2gb+ is best.  Most OS apps will run nicely with 512+ of ram (I run desktops with 512-1gb and servers with 1gb+).  Dual Core or at least hyperthreaded helps me keep sane, and the drive's got to have space as well -- sta-ndard installs take up 2-15gb.  On to the virtual PC!

  1. Have a clear-ish idea of what machine you want to make.  If you want a 2k3 web, don't install 2k3 server or 2k3 enterprise.  Know what you need, stick with it.
  2. Have your CDs in ISO style.  This'll make your life easy and the installs stupid fast.
  3. Have your keys available -- I know this is a duh but I get pissed every time I don't.  Having the -right- key is even better.
  4. Don't over do it.  Base installs, no configuring unless absolutely necessary.  Leave a text doc on the desktop with this info.
  5. If you're using virtual pc, install the VM Additions (action, install or update within a virtual machine) -- this will allow drag/drop file copy and it won't hijack your mouse.
  6. For the love of god, ACTIVATE YOUR COPY if you're using something that needs it.
  7. Use a standard admin password.  If it's "Password", so be it -- document it so someone else can find it easily.

When you're done, if you plan on dropping this out on the network for others to enjoy, remove write permissions on the files so that no one can accidently torch your nicely created core install.  Every once in a while its a good idea to update the core with the latest updates as necessary.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Tech

Legal mumbo-jumbo

by Jesse 20. February 2008 06:25

One often overlooked aspect of programming is that evil legal side.  Case in point, you are keeping user records of some kind.  Now, I'm not talking about SSN, Health Records (HIPPA) or bank info.  No, I'm speaking of retaining a users home phone, address, first name, last name, etc.  At what point does this fall into the legal consideration category?  The answer is "check your local codes".  Yea, it sucks, but there's hope.

Within 5 minutes I was able to find the state of Ohio's code regarding (legalese warning!) Private disclosure of security breach of computerized personal information data which is a fancy way of saying if someone steals enough stuff to grant the ability to steal someones ID or other non-public records.  The Federal govt has a law(s) for it, but local laws usually reach further and are more clear (as clear as a law can be) as to the actions necessary for this (typically notification and credit monitoring).  In this case, here's what the Ohio Law says "Private" information would be... Article 1349.19 section 7 chapter B items 1-4 (I don't make this stuff up)

(b) “Personal information” does not include publicly available information that is lawfully made available to the general public from federal, state, or local government records or any of the following media that are widely distributed:

(i) Any news, editorial, or advertising statement published in any bona fide newspaper, journal, or magazine, or broadcast over radio or television;

(ii) Any gathering or furnishing of information or news by any bona fide reporter, correspondent, or news bureau to news media described in division (A)(7)(b)(i) of this section;

(iii) Any publication designed for and distributed to members of any bona fide association or charitable or fraternal nonprofit corporation;

(iv) Any type of media similar in nature to any item, entity, or activity identified in division (A)(7)(b)(i), (ii), or (iii) of this section.

If you can't get it though normal means (public records, mass media or publication), its considered private information.  Still leaves room for "what is public" but something to consider.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Misc | Tech | Security | Law

Chapters in tandom

by Jesse 8. February 2008 03:23

I've been reading a chapter a night for the most part, except last night where I discovered one of them was 50+ pages and heavy on tech so I had to pay attention and it's covering good stuff that I -really- do want to know about.  Today however, I'm inbetween projects so I'm looking into a WCF book I have yet to really get into (I'm more interested in the security aspect of the book really) so, good time to do so -- learn some stuff, become a WCF ninja.  I'm all over it.

The WCF book I mentioned uses the all-mighty AdventureWorksDB as a backend.  Recently, one of the guys here at the office sent out a link for some downloads of other microsoft books for free, direct from microsoft, which I downloaded all 3 of them (why not?!) and then it hit me -- why not try to mesh the Linq book and the WCF book?  They're different and "unrelated" so this is crazy enough to work.  Kill two birds with one stone eh?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | C# | Coding | Tech

Zune

by Jesse 28. January 2008 15:32

Been thinking about it for a while now and I finally bit it and bought a Zune (4g, black) and I was mildly irritated right off the bat.  Let me back up -- I have a sandisk 1gb that has the mega-idiot feature.  You plug it in, its a mass storage device, copy paste, copy paste, unplug it, it rebuilds its own index, done.  Sigh, I guess I have to graduate to using someone else's interface and I'm FORCED to use it.  Not so happy about that, but oh well, I'll get over it.

I download the software from the zune website and ! I've got a ...firmware update available?  Really now??  Ok, I'll play along so update away.  Sure enough, a process that I am very familiar with commences and within a couple minutes I've updated to 2.1 -- cool.  It activates my zune (which again, I'm fundamentally against, why should I have to activate? ...agh, anyway) and now I'm met with the zune software.  It's bad, I kind of like it until I try to copy over my playlists ...which are in media player -- both made my MS so they'll work nicely!  Bernt!  Wrong.  The correct answer is to open up my current playlists and changed them over to m3u(?).  Grr.  Ok, great, fine, dandy, now I got music and away it goes.

I'll confess -- I had never bothered to look into pod-anythings.  At all.  Ever.  Why? I'm not a fan of apple and the crap they sell.  Luckily, on the zune is a (shameless) plug for msnbc that you can download the evening news ...I happen to missed yesterdays news so off I go.  I see I can subscribe so I get everyone of 'em from, cool.  "So what else does this thing have?" and it was all down hill from there.  I find strongbad has a feed, ask a ninjabbc radio, discovery, cnn, a bunch of places and I subscribed to 'em all.  I configured it to take some more so than others (keep 3 vs 10 etc). 

Alright, I got some musica and some podcasts downloading, awesome...soooo how do you make this wireless sync work?  Long story short, I gave up on Vista and it worked perfectly on XP (I got a spare PC that has all my junk on it) -- and its nothin short of freakin awesome.  I come in, tell it to sync, sit it down and a few minutes later, done -- even connects @ 802.11g!  Now, just a week later ...I've got about 500m free and thinking I should've bought the 8gb at LEAST.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Misc | Tech | Zune

HTML v5 on draft

by Jesse 24. January 2008 02:43

A draft of html 5 has been posted up on w3.  Might want to take a look, namely the new elements and attributes.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Coding | Tech | Design

Vista, IIS7, Windows Authentication and you

by Jesse 21. January 2008 08:14

I've been tasked with enabling Windows Authen to the current project I'm working on which "back in the old days" of IIS6 was uber easy -- tell it to use windows for the authentication, set your allow/deny groups, done, move along.  With IIS7 you get this really nasty rude surprise...

Server Error in '/someAppImWorkingOn' Application.

Access is denied.

Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.


Version Information: Microsoft .NET Framework Version:2.0.50727.312; ASP.NET Version:2.0.50727.833

Woah, ok, fine cousin Vinnie I'll just ...um, go over here for a while.  Jesh.

So I go bouncing around the net and I keep seeing posts about going into vista and enabling various stuff for IIS ...I go take a look and well well well, what do we have here?  Windows Authen, thank you very much ...along with all the other useful stuff.

Ooook, now let me guess, you have to go turn it on (yep!) so into the Inetmgr.msc, click on authentication, and no surprise...

Right click, enable, annnnddd back to the page.  But how do you know its working?  Here's a test I came up with on the fly to verify the stuff is doing its thing.  Just as a note, you have windows authen enabled and anonymous enabled for the following tests.

Go into your root page, whatever that may be (default.aspx?) and drop in a LoginName control onto the page (look under Login in your toolbox), drop it on the page somewhere obvious, the top works great.  Dump this into your web.config somewhere under <system.web>, you've probably seen this before...

<authentication mode="Windows"/>
<
authorization>
     <
deny users="?"/>
</
authorization>

so you've seen this, the ? disables all anonymous users.  Load your page up and you'll see <domainName>\<userName> on the screen (assuming you are on a domain).  Great, it works, now change <deny users="?"/>  to <deny users="*"/> (This'll disable ALL users) -- You'll get a prompt (!) and a nasty 401.2 error when you click cancel.  Switch back to the ? and go back into inetmgr and disable windows authen.  Refresh the page and you'll get the same 401.2 error.

I almost forgot, if you take away the <deny users="?"/> you'll see NO username at the top (its anonymous after all!)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

.Net | Coding | Tech | Security | Design

New Gear

by Jesse 17. December 2007 09:17

After thinking, complaining, considering and debating buying a new laptop, I've finally bit the bullet.  I have now a nice new Asus F3SV with a duo T7500 (2.2ghz), a 15.4 display (1680x1050 native), a geforce 8600gs (plays games great, dx10 no less), 160g hd, 1gb of mem (upgraded to 2 already) and a slew of other stuff (bluetooth, wireless 802.11everything, built in 1.3m camera, dvd burner with light scribe, etc) but I am really geeked by the uber cool fingerprint reader -- my laptop now requires two factor authentication!  Sweet.  And all for under 1300.  No really!  Did I mention it came with a laptop bag and a mobile mouse?  Yea, no kiddin!  Comes with a 2 year warranty -- I priced the same thing out over @ dell's website ...came in at over 1800.  I love my old dell, it's been good to me but ...500$?  No.

First thing I did was nuke the OS and resintall the barebones OS -- which required a phone call to microsoft.  After the -no crapware- install, although Asus didn't REALLY add a lot of it (norton being the ONLY annoying guilty party) it was time to re-do the drivers.  They send you this sweetness driver CD with EVERYTHING on it -- all the way down to the touchpad drivers, thank you very much, so that was easy.  The vista performance assesment came in at 4.5 (mem being the lowest) until I added the 2nd gig, now the video is the lowest at 4.6.  I've installed thea lot of my dev stuff and a variety of other necessities and -damn- this thing is fast.  The comp on my desk at work is a 2.6ghz with 3 gigs of mem (stupid 32bit limit) and I think this could keep up nicely, and if it wasn't for the pair of raptor drives on my home desktop, it would leave it in the dust.

I transfered over my music over to it - something I couldn't do with my old one (40g total), that took a while.  Nice thing about big data transfers is the "fire and forget" methodology.  Copy, paste or click install, don't bother looking at it for hours because it won't be done.  Just listen for the drive to shut up a bit.  Anyway, I think I'm going to like this new laptop.  It's a nice upgrade over my 2ghz p4M cpu with 512m of ram and 40g drive Cool

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Misc | Coding | Tech

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Like the description says, at my core, I'm a scientist and engineer.  I came from humble beginnings on a 486DX2 Packard Hell playing doom2 on IPX to in a small time retail shop and got into hardware (ISO layers FTW!) and it was all downhill from there.  I'm infinitely curious about almost everything and always wanting to know.

Some of the stuff I'm currently into/researching...

Sitefinity

Ninject

Subsonic

Java

Currently working on ...
i did the hundred 
and some extra stuff

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's, their brother nor their dog's view in anyway.  At all.  Ever.

© Copyright 2007-2008