smithvoice.com
Pages by tag

110 pages are tagged with Coding


To check more tags, click here  click to open


The Gravity of Big Data


Summary:

They keep calling the Silicon Valley mega projects "moon shots"... why? 

"We can lick gravity, but sometimes the paperwork is overwhelming." - von Braun

'You promised me Mars Colonies, instead we got facebook' - Buzz Aldrin

If the paperwork was the big hurdle in the paper days of the Moon program and now we have cell phones that make the super computers of that day seems silly... why is it that all of the "big data" processing isn't actually working on licking gravity? I'm as big a lover of analytics for apps as everyone, but, umm,  why are we not pointing our money-making 'puter power at the stuff that can make 8 billion lives actually free-er?



Redirected Downloads


Summary:

We have files for download on a NAS.  We don't want to expose them directly to everyone hitting the site and the idea of just mapping the drives makes people go nutty so, got a fast idea?  We know that by this time it's got to be so simple that we're missing the obvious but we're going in circles and a vendor wants too much money for a bridge product.

Huh.  Does the file server run IIS or Apache/Mono?

It's a Windows server so IIS is ok but we don't want to expose it to the internet.

You don't have to, if it's on your company network just expose it internally so the web servers can hit it.  That possible?

The answer is going to slay you... open up notepad and copy this in:



Regex Ajax Jquery UserControl


Summary:

This universe is fun.  Last week I was having a conversation with a budd about a validation regex and just a few days later I had the need to dig it out for myself ... lucky I put it on the sitelett (thanks Universe!).

In my case I needed to make a double listbox picker for Keywords.  Over the years I've just used Telerik controls but this is a lean webapp and I didn't want the extra baggage so I rolled my own.  ASCX with serverside needs plus Jquery/JS Ajax hitting an ASMX web service for adding new keywords on the fly without page reloads.

Demo here.  Code and some notes ...[more]



Simple person name regex


Summary:

"Do you have a good regex to test a person name part entry?"

Yep.  ^[A-Za-z]+((-[A-Za-z]+)|('[A-Za-z]+)|(\040[A-Za-z]+))*$



Hack the Profile Provider


Summary:

So you don't want to reinvent the wheel on an ASP.Net profile system but you need to support some perfectly understandable business rules for the profile data that the precooked Profile Provider doesn't handle well?

You just create a custom Profile Provider to hold your props in a custom table instead of that silly serial format, right? 

Yeah... but what if one of those rules requires a lookup validation and message to the user?  Your custom implemented Save() has to return void,  a status code won't work and a custom exception from SetPropertyValues will choke your web site.

Well, there's a hack for that.



ASP.Net Membership mdf setup without ASPNETDB.mdf


Summary:

Microsoft's ASP.Net Membership system isn't world-class bulletproof and has quite a few limitations so you'd not want to use it as-is for projects where money is involved, but for a lot of projects it fits the bill fine.

The only problem is that most of us get it into a project by banging on it and swearing a lot... then we forget about the pain till the next time.

This last time when my brain started saying 'next time I won't have to use this thing'... I figured I'd be smarter and write it down.  Also, because I am getting sick and tired of simple yes/no questions being answered by showing a YouTube video, I decided that I won't even show a single darned image in these steps.

[more]



Abuse of Power (jquery)


Summary:

B> i need...

S> how bout...

B> a start

S>dont show a priest

B>efem ;)



Persisted Coalescence


Summary:

I knew PERSISTED.  I knew COALESCE.  Dang though, I hadn't thought to put them together!

ALTER TABLE myPersonTable
    ADD FullName AS  (
REPLACE(RTrim(Coalesce(Title + ' ','') 
+ Coalesce(FirstName + ' ','') 
+ Coalesce(MiddleName + ' ', '')
+ Coalesce(LastName + ' ', '')
+ Coalesce(Suffix, '')
+ Coalesce(NULL, '')), '  ', ' ') ) PERSISTED



Webforms Inherited Panel control


Summary:

Wasn't going to post this because some magic made the original problem go away, but just in case it comes back... my sitelett search makes it easier to find stuff than searching for commented out code :-).

Needed a container control for a Repeater's ItemTemplate so users could get the info from any collection of display controls (labels, images, whatever) and just click anywhere in the set for a serverside event instead of putting a button into the mix.

Easy enough, added an inherited Panel.  Worked fine as a drop-in on test pages but when added to the Repeater and was inline bound the doPostback javascript errored out on registration.  It was being rendered correctly in the html but when used in an ItemTemplate it didn't want to even get past page_load.

So I hand-wired the Render method to use the settimeout style and poof, it worked as a list item container.



ASP.Net limited textarea for Ajax


Summary:

Huh?  What?

Oh sorry, been heads down the past few ... months?  Sheesh.

Ok.  There is one thing I did the other day that I'll forget if I don't put it here.  I'm working on a few new sites and all of them at one place or another need a textarea with a character limit.

I know, we've all done these since before the beginning in one way or another.  It's no big deal to just check the length  in the postback or add a key event javascript method with an alert or whatever, and these days even adding a countdown span means just grabbing someone's freebie jquery sample. 

Those all work fine mostly.  But for this project there was a twist that threw me a fail...



<< 1 2 3 4 5 6 7 8 9 10  ... >> 
who is smith     contact smith     rss feed
Since 1997 a place for my stuff, and it if helps you too then all the better smithvoice.com