Irrsinn.net: taking joy in human unreason

C# tag

SqlBulkCopy Matching Columns

If you’re trying to do a SqlBulkCopy using a DataTable and getting lots of column type (integer, string) mismatches, it’s probably because you haven’t mapped not only the column types, but also the column names.

SqlBulkCopy assumes that your DataTable is going to have its columns in the same order as the database table, which will cause mismatches when it tries to send your (string) Name field into your (int) Age column.

Just having your DataTable column names match the table isn’t enough, either. There must be a manual mapping.

But if your DataTable column names are the same as the table column names, a simple method can take care of that mapping for any DataTable you send it.

Keep reading >>

The Contortions of a Spell List

So I’ve been working on the next major release of the D20 Spell Lists app, and have found myself in a code and UI reorganization/refactoring jungle as I’ve refined my feature set and how I want to handle things.

One of the common-enough cases that the current version doesn’t handle well that I think needs to be is multiple spellcaster classes. If I’m a Druid 5/Bard 6, I’m going to want to keep separate spell lists, and will have different DCs, spells known, and spells per day to contend with. With the current version, the best solution is probably to have two different character files, each with its own spell lists.

My attempts to smooth that out have resulted in a lot of UI revisions as I tried to find good ways for displaying and updating all this info without slowing down the UI to uselessness (buh-bye, Table Layout Panel). Here’s what I’m sitting with now:

It’s not pretty, and there are more tweaks in the queue (like just putting the DCs/per days right with each class, probably), although for the moment it works well enough (read: stuff doesn’t end up hidden and inaccessible) that I can get functionality working again.

Like that 0 modifier for a Wisdom of 15. >_>

Keep reading >>

Minor bug fix release of d20 Spell Lists – v0.1.4293

Downloadable from The Charon Sheet. (Also, I’m currently reading The Principles of Beautiful Web Design so’s I can make TCS less sucky and more purdy. Expect design changes there as I learn how to do this crap from scratch.)

Only two issues fixed, but they were kinda show-stoppers for the affected folks. Details on the issues fixed.

d20 3.5 SRD Spell Lists: First Beta

So I’m in a D&D 3.5 campaign now. And I’m playing a Druid, which is kinda exciting–it’s the first time I’ve played a Druid at a high enough level that I can shapeshift, and I just tipped 5th level on Sunday. (Campaigns always fizzle out early…)

Anyway, the campaign is a hodgepodge of standard D&D and Sandstorm, and summoning restrictions by the GM mean that my spell list involves a fair bit of swapping out that’s a little annoying to manage. For instance, I’m using Sandstorm’s “Desiccate” instead of “Summon Nature’s Ally II”, since I can’t summon.

Since Druids are the type to prepare a few spells per day from a large list of available spells, I needed a quick way to see all of my available options without flipping through two sourcebooks and my swap list at the table. Then I wanted to avoid having the jotted down short-hand description of the spell that I refresh every “day” as I try out new spells.

Pain in the ass.

A bit of Googling lead me to conclude that with the advent of D&D 4e, many of the 3.5e resources… disappeared. And by disappeared, I mean:

All files withdrawn at the request of Wizards of the Coast.

Keep reading >>

Lower-casing URIs in .NET

A few months ago, a client asked that their .NET site have all its URIs lower-cased for search-engine optimization purposes.

This was an existing site with a lot of files, already in SVN. SVN in Windows is wonky (by which I mean, terribly broken) when it comes to changing the case of filenames, so I decided to go for a programmatic solution to the renaming.

I ended up with the following:


void Application_BeginRequest(object sender, EventArgs e)
{
    string currentURL = Request.RawUrl.ToLower();
    if 1currentURL != Request.RawUrl) && (!currentURL.Contains(".axd")
    {
        Response.Status = "301 Moved Permanently";
        Response.AddHeader("Location", currentURL);
    }
}

Keep reading >>

Footnotes   [ + ]

1. currentURL != Request.RawUrl) && (!currentURL.Contains(".axd"

Recent Posts

Exploit: Zero Day “Headless Swarm” Landing December 1

So we’ve been working on Exploit: Zero Day for a couple of years now, but I haven’t talked nearly enough about it here. It’s a web-based cyberthriller puzzle game where you play as a hacktivist, uncovering and battling against oppression and exploitation.

*innocent whistle* Totally not the sort of game I’d want to make or play, no…

It’s been in closed alpha for a while, but we’re ready to offer a prelude season of paid story: “Headless Swarm”. For details on the plotline and how it relates to the continued free alpha access, check out the announcement blog post over at FPG.

Keep reading >>

Attending a Charlottean Protest

I visited uptown Charlotte tonight, amidst the current protests and unrest after Keith Scott’s death. My friend and I had a few tidbits of info on where people were meeting, but nothing concrete, so we wandered along several streets.

In areas where people weren’t protesting, businesses were closed, and the streets were unusually silent for 20:30 on a Friday night. Troops stood in clumps of three on corners, waving or saying hello when you passed them. The occasional humvee or police SUV drove by.

Things were more lively at the Omni Hotel, where folks had covered the sidewalk in chalk. There were lots of media there: it was clearly an “allowed”, acceptable, media-consumable gathering. I’d maybe characterize it as a space for quieter expression of grief, although it was criticized by another gathering as essentially being for the white people. The writings were names of people killed and sayings that many of us are familiar with: “hands up don’t shoot”, “when will we have justice?”, etc. Religious figures were around, praying with people.

Further down Trade St., past the bus station, a group had gathered in front of some government building. My friend and I stayed there for a while. They were chanting “I am my brother’s’ keeper!” and folks were stepping up to share their perspectives. Four National Guards and a cop stood between the crowd and the building (with the aid of crowd control barriers), utterly stoic when the crowd shouted questions at them.

Keep reading >>

Remastering “The Majesty of Colors”

Folks probably know that I make video games as part of Future Proof Games, but maybe not what we’re doing at the moment. Many, many (many) years ago, Gregory made “(I Fell in Love With) The Majesty of Colors”, a very sweet Flash game about balloons and drowning.

As the site stats geek for FPG, I can tell you “Majesty” remains pretty damned popular. (Hell, it just got linked by Buzzfeed a few days ago.) It’s an evocative game that continues to appeal to folks wanting to explore the soft feelings of a big, weird, sessile alien. Problem is, Flash is finally actually dying — no phone/tablet can run it, and some browser configurations require user action before it’ll run Flash.

So we’re bringing “Majesty” to modern devices: Android, iOS, and Windows/OSX/Linux. And holy crap, this game feels great on a phone; moving the tentacle with your finger just feels real in a way that the tiny, mouse-controlled Flash version doesn’t. I’m excited to test it on tablets.

Keep reading >>

July 3rd 2016
Tags: On Life and Love, , No Comments

First Hair Highlights

The first time I dyed my locs.

One of the first pictures taken of my newly-dyed locs.

I did it! I’ve had locs twice now, for a total of almost five years, and each time I’ve gone, “I should be bold and dye my hair!”

But it’s very permanent, especially since my natural hair color likely needs to be lightened for color to show much. Plus, lightening hair can be damaging. Last thing I want is to have my locs falling out. I’ve literally spent years growing these things; I’m not ashamed to say I’m a little attached to them, even if I don’t name them or count them.

But finally, with the aid of recommendations from friends and family on a beautician, I got my hair did.

Keep reading >>

Ossuary 25% Off on Steam!

Steam Summer Sale 2016 Offer

Ossuary—Future Proof’s first commercial game release—is part of the Steam Summer Sale and will be 25% off until July 4. If you haven’t had a chance to play yet, it’s only $7.50 (USD). If you’re on the fence, the demo, “The Hodge-Podge Transformer,” is also on Steam.

It’s been on Steam for a year and a month now, and it’s been a fascinating experience. After watching a few Let’s Plays of Ossuary and “Hodge-Podge,” we released an update in December to improve the tutorial experience and solve some colorblindness issues.

EZD Logo Color Our current work in progress is Exploit: Zero Day, a cyberthriller where you roleplay a hacktivist by making and solving puzzles. It’s pretty cool, and our alpha players are making really friggin’ awesome puzzles and stories. If you want in, hop on the monthly mailing list and you’ll get a key in the next newsletter.

When a Nasal Polyp Isn’t a Nasal Polyp

I had a pretty gross thing happen to me today.

It started with a long, thin scope being poked into my nose — deep into my nose. They need to see where this mass in my nose was attached before they removed it.
Keep reading >>

Questionable Decisions: Hot Yoga

I made a questionable decision this afternoon.

After coffee with a yogi friend, I was inspired to start climbing back on the yoga horse. Most yoga studios in my area only have Saturday morning classes, so I had very few options for something in the afternoon.

Whatever. I was feeling brave. I signed up for an all-levels Vinyasa hot class at a studio I’d never been to. Ninety minutes.

Keep reading >>