FlyPaper

Things that tend to stick

Archive for the 'Code and Code Related Accessories' Category


   Mar 17

Staying in the Base Path.

It’s not all about baseball but base paths can be a pain.  Here’s a simple way to mange the base paths and help to keep code simple and document relative.  Especially helpful when using Server.Transfer to move people to different pages in your site.
//This goes in the <head> section of your Master Page
<base [...]

Read the rest of this entry »

   Mar 17

Down and dirty jQuery birthdate tester.

I have been working on eliminating the need for error handling and messages for a project I’m doing.  The project is for an alcohol company so I had to create a birthday checker.  In doing so I came across many reasons to raise error messages,  thinking about how much I hate writing them, I decided [...]

Read the rest of this entry »

   Feb 19

Damn you Firefox for steppin on my loveley JQuery

So,  jquery is awesome.   But it has it’s setbacks.  Like say you randomly want to position a div off screen for a swoop in from the right,  pretty simple animate call to get it back to the stage $(‘#obj”).animate({“right”: “+=1000px”}, 800);
But now lets say you want to make the nifty animation be invisible and [...]

Read the rest of this entry »

   Feb 19

Parsing Hashtags in Flash

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: [...]

Read the rest of this entry »

   Feb 09

Flash Notes: Importing and displaying images via Binary ByteArray

After weeks of sickening trial and error, I have finally figured out a method of importing and displaying ByteArrays as images.
 
To do this, you’ll need the base64 converter library created by the folks at Dynamic Flash available here.
We will continue this under the assumption that you are familiar with class paths and importing external classes.
On [...]

Read the rest of this entry »

   Feb 09

Workin’ the AddThis

Sites like to be shared lately. Since its so cool, they also like to have a thumbnail, title and description.  All this can be controlled (when using AddThis) by adding a link and some meta tags.
Here’s an example.
Paste the following in the <head>
<meta name="title" content="U.S. Cellular Snowman Game" /> <meta name="description" content="U.S. Cellular snowman [...]

Read the rest of this entry »

   Feb 09

.ASHX uploads: The end to file size limitation

So you’ve got a great app that uses an ASP Handler to upload images via a HTTPContext Request.  It’s great, it’s fast but it’s limited by .NET’s assumption that all files on the internet should be less than 4 Mb.  Well the answer lies in the web.config.  A short entry will change the world.
Add this [...]

Read the rest of this entry »