I've been exploring the CodeCanyon marketplace for a little while now and I am pretty impressed. It's an opportunity to monetize some ideas I've had and to gain some portfolio work and possibly more customers. I've been a proponent of free software (I provide some on my development site) so I won't be selling everything I make, but I think it's nice to put some product out there as a web designer.
I've just released my Web Application Template package for .NET web applications (and it's only $12). It's basically what I would prefer to start with every time I work on a new web site… in effect, a "Web App in a Box."
It supports .NET 3.5 and .NET 4 and offers a slew of features (ELMAH integration, compression/minification of CSS and JS, etc), the to-do list ever growing. You can be sure I'll keep it updated because I will be using it myself! I'm already using it for a new version of Intrepid Studios (not a total redesign, more enhancement-like).
I was sick and tired of all my projects using different file/folder/solution layouts and having to duplicate code across them all the time. I wanted a way to easily get started without spending time configuring everything. While I was working on it, I thought it would be useful for other developers. Will it really save you six hours? Well, it took me a solid 6+ hours of development time to set it up… and then some. Six is a safe bet, possibly more if you aren't that familiar with some of the components I integrated.
As always, let me know if there are bugs and improvements you think of.
You can also check out my previous CodeCanyon release, Google Picasa Gallery + API.
I just finished a new web site today, BeReasonableNow.com, for a lifestyle guide. The web site was created for a friend of mine. I've seen the guide, there's nothing magical about it, it's totally practical and pretty funny. Check it out!
I decided since this was a one page deal that I'd try out a few design ideas I've seen lately including subtle radial gradients and larger text. I like how it turned out.
All the effects except the gradient and title image are CSS: border-radius, box-shadow, background gradient, and text-shadow primarily. I was also thinking of using the new @font-face but Arial didn't look that bad so I just left it.
I have to say, it's a pretty catchy title for a lifestyle guide.
Along with a new sample section on my Intrepid Studios web site, I've also added a simple BlackJack implementation written in VB.NET. It was written for my programming class last semester and I'm just now posting it.
This is not the uber-awesome BlackJack I've mentioned before. That is still not ready for packaging. However, keep tabs on this blog or my business blog to find out when it hits.
The term "slug" was first coined, I believe, by Wordpress to mean a URL-friendly version of a post title. You see them on blogs all the time. How do you go about converting an unfriendly title into a friendly one?
Learn how on my Intrepid Studios blog where I give you code in C# and PHP.
I am working on a custom blog implementation for Intrepid Studios and I am using a ListView to display posts on the front page. It's just a very nice control…
Anyway, paging for a ListView is done by adding a DataPager control to the page and customizing its behavior.
I was interested in seeing how efficient it was, expecting it to properly utilize my LinqDataSource's ability to grab only the actual number of rows needed from my SQL database.
The articles I read on 4GuysFromRolla and other sites mentioned that it does not, but they were referencing an SqlDataSource.
It turns out, the DataPager does use efficient paging with a LinqDataSource and you do not need to put it within a <form runat="server"> tag to use (just use the QueryStringField property!).
How come? From what I understand, the LinqDataSource uses automatic paging to only get a certain number of rows. That's why it is the only DataSource control with an "AutoPage" property.
I am exceedingly happy with this.
Thank you to Batiste Bieler for the original script, jQuery Rich Text Editor Lightweight.
I heavily modified it to support ASP.NET forms (and their funny client IDs) and to work a bit more efficiently. It’s tested with PHP and .NET both. It should work with any kind of form.
Visit the jQuery Rich Text Editor project page for details.
The Web.sitemap file stores only static URLs, so if you have a page like this:
http://yoursite.com/news.aspx?view=4
Your sitemap breadcrumb will not reflect the fact that you are viewing a an actual news item. If you're like me, you also reflect the breadcrumb in the title of your page. So instead of seeing:
Breadcrumb: Home > News > A headline!
Title: A headline! : News : My Site
You see:
Home > News
News : My Site
Read on for how to solve it.
Thanks to Dimitar over at Frag on how to create a wrapper for Firebug's console, I was able to implement better debugging in my jQuery plugin. The one quip I had was that I needed to directly pass everything to the log function. The way Dimitar did it, it wrote a log line for each argument. I was passing formatted strings.
Here are the offending lines:
for (var i = 0, l = arguments.length; i < l; i++) console.log(arguments[i]);
And here's what you replace it with:
console.log.apply(this, arguments);
BAM! Works like a charm.
Thanks Dimitar!
I am working on my new Intrepid Studios website and I came up against a CSS wall. I needed a sidebar that had a "main image" for a design and then list extra images or extra information. However, I wanted it to look cool, so I wanted the image to overlap the header and always appear in the same place.
I needed the design to follow these guidelines:
Read on fair reader, to see how I solved my problem
Continue reading "Use CSS to Create a Dynamic Sidebar, with a Fixed Element [Tips & Tricks]" »
I am currently working a WPF BlackJack implementation to further develop my object-oriented and .NET skills. I have a great book called VB 2008 Recipes. It’s all sorts of useful and I recently came across a super great way to manage my annoying collections of cards, players, etc. in the game.
Instead of implementing interfaces like IList or IEnumerator for, say, a Hand of cards, you can create a variable/property called Cards with a type List(Of Card). This creates a generic list of objects of type Card (your card class, or any other type of class you want a collection of).
Then, as in my case, you can perform some powerful functions that would otherwise take more lines of code to do. For example, in BlackJack an Ace can be valued as either 1 or 11, depending on whether or not it will make the Hand total over 21 (a bust).
The way I calculate the total value for a hand, I calculate the total of all non-ace cards and then calculate the total of the Aces based on that other total.
Here was the original code I used before implementing LINQ:
Dim Cards() As Card
Dim hasAces as Boolean = False
' Calculate total for non-Ace cards
For Each myCard As Card In Cards
Select Case myCard.Rank
Case Card.RankType.Ace
' Aces
hasAces = True
Case Else
intTotal += myCard.Value
End Select
Next
If hasAces Then
' Do the same thing as above, only select case Ace
' and figure out the total
End If
That is a simplified version. Now, witness the power of LINQ combining that Select statement into a single line!
Imports System.LINQ.Enumerable [...] Dim Cards As List(Of Card) ' Calculate total for non-Ace cards ' PS. I <3 LINQ intTotal = Cards.Where(Function(c) c.Rank <> Card.RankType.Ace).Sum(Function(c) c.Value) ' Any Aces? If Cards.Any(Function(c) c.Rank = Card.RankType.Ace) Then End If
As you can see, WAY more manageable! The reason LINQ can do this is because the System.Linq.Enumerable namespace has Extension methods like Sum, Where, Average, Max, Min, etc. that work with any kind of collection.
Previously, I was aware of LINQ to SQL and how great that was, but I didn't realize LINQ also worked with Objects (hence, LINQ to Objects).
Like I said earlier, instead of making my Hand class implement an IList, etc. I can just make Cards a property so that when I need to add a card, retrieve a card, etc from an external class, all I need to do is:
MyHand.Cards.Add(new Card) or MyHand.Cards(0)
If you want more information about LINQ to Objects, check it out on MSDN!
From my IDSC 3102: Intermediate Programming class, here is the second program we had to complete. It was a simple Database connection project, but I used and played with a strongly typed dataset.
A grading program that allows you to input grades for a select number of students, save changes to the DB, and view a semester report. The report should show a list of students and their cumulative semester average calculated using a specific formula. It should also display a "printable list" for your students to view their grades, showing only the last 4 digits of their SSN.
Download zip (165KB)