admin has submitted 94 links
CSS Star Rating System
in CSS added by admin, 5 days ago examples intermediate style
Recently I had to create a Star Rating system for a client so I thought I'd share with you the techniques I used to accomplish this. If you are not familiar with a Star Rating System, it's simply a method of voting using (usually) 5 stars in a row, which will change colour as you hover over them indicating the level at which to rate something.
comment save reportA Lightweight Approach to Aspect-Oriented Programming in Python
in Python added by admin, 3 weeks ago aspect-oriented intermediate
aspects.py library provides means to intercept function calls. Functions and methods (also in Python standard library and third party code) can be wrapped so that when they are called, the wrap is invoked first. Depending on the wrap, the execution of the original function can be omitted, or the function can be called arbitrarily many times. Wraps are able to modify the arguments and the return value of the original function. In the terminology of aspect-oriented programming, the library allows applying advices (wraps) to call join points of methods and functions in around fashion.
comment save reportBehavior-driven Testing with RSpec
in Ruby added by admin, on 31/3/2008 intermediate rspec testing
Testing fever has infected the Ruby programming community, and the infection is spreading. One of the most promising innovations in testing in the past year is the introduction and rapid growth of RSpec, a behavior-driven testing tool. Learn how RSpec can change the way you think about testing.
comment save reportUsing Pyke, the Python knowledge engine
in Python added by admin, on 22/3/2008 intermediate knowledge engine
This describes how to use pyke from within your python program.
comment save reportStoring User Profiles
in .NET added by admin, on 9/3/2008 examples intermediate user
User Profiles - The profile feature in ASP.NET 2.0 allows you to define and store per-user settings to be used throughout your application. Settings can also be stored in an anonymous profile while users are not logged in, and then migrated to a logged-in user profile at a later time.
comment save reportLearning Python Programming Language Through Video Lectures
in Python added by admin, on 8/3/2008 beginner tutorials video lectures
One of the upcoming projects I am doing (I will reveal it in one of the next blog post) is going to be written entirely in Python. I have a good understanding of Python but, same as I had with JavaScript, I have little experience doing projects from the ground up in it. Before diving into the project I decided to take a look at a few Python video lectures to learn language idioms and features which I might have not heard of.
comment save reportThe state of Python profilers in two words. Use cProfile.
in Python added by admin, on 1/3/2008 intermediate profiling
This is for people who still wonder what they should use every time. cProfile was added in Python 2.5 after much discussion about the downsides of existing profilers.
comment save reportRails Messaging Tutorial
in Ruby added by admin, on 26/2/2008 examples intermediate messaging
This guide aims to be a simple, logical tutorial showing how to develop a simple Rails messaging system with all of the trimmings with Ruby on Rails (v2.0.2). This tutorial is intended for beginner to intermediate Rails users. If you've never used Rails before, I suggest you check out any of the excellent introductions out there.
comment save reportPython - 15 Line HTTP Server - Web Interface For Your Tools
in Python added by admin, on 14/2/2008 intermediate oo programming web server
I write a lot of command line tools and scripts in Python. Sometimes I need to kick them off remotely. A simple way to do this is to launch a tiny web server that listens for a specific request to start the script.
comment save reportAdding Type Checking to Ruby
in Ruby added by admin, on 6/2/2008 intermediate type
What’s the first thing you think of when you consider the Ruby Language? Dynamic types, right? Ruby is famous (infamous?) for its extremely flexible type system, and as a so-called “scripting language”, the core of this mechanism is a lack of type checking. This feature allows for some very concise expressions and a great deal of flexibility, but sometimes makes your code quite a bit harder to understand.
comment save reportRuby Spin-up: Where Did That Method Come From?
in Ruby added by admin, on 28/1/2008 beginner tutorials examples oo programming
A tutorial that gives a nice background on some object-oriented thinking in Ruby, including classes, superclasses, modules, and singleton methods. It's a straightforward tutorial aimed at those who have gotten their feet wet in Ruby, but not the object-oriented aspects of Ruby.
comment save reportPython as Config Language -- Forget XML and INI files
in Python added by admin, on 12/1/2008 configuration-file
A programming language has all the advantages as a language for encoding parameters. I see why it's rare -- too many programmers have spent too much time with MS's abominable INI files and think it's "normal".
comment save reportSorting Data with List and Table Widgets [pdf]
in Ruby added by admin, on 9/1/2008 FXRuby beginner tutorials desktop app framework gui
The simple widgets that we learned about in the previous chapter primarily deal with a single value (if they have any real "value" associated with them at all). FXRuby also provides a number of more complicated widgets for dealing with collections of values.
comment save reportCreating Multiple Choice Exam Application Part I
in .NET added by admin, on 7/1/2008 database intermediate xml
This is the first part of a multi-part series. In this series we will cover the scenario of creating a multiple choice exam for the user. In the first part I will cover the design of the application. This will include unit tests, domain objects and NHibernate mapping files
comment save reportUsing RPC-Style Web Services with J2EE
in Java added by admin, on 6/1/2008 intermediate j2ee rpc webservice
Web Services provide functionality to the Internet, and are seen as the wave of the future. In this article, Martin Bond explains how to use Web Services protocols to join J2EE application components with any other software that supports those protocols. This excerpt is from Chapter (Day) 20, from Teach Yourself J2EE in 21 Days, second edition, by Martin Bond, et. al. (Sams, 2003, ISBN: 0672325586)
comment save reportRuby blocks gotchas
in Ruby added by admin, on 31/12/2007 blocks intermediate metaprogramming
There's this thing they say about Ruby - everything is an object. It's true, with very few exceptions, one of them being the block. Well guess what, this little gem of an inconsistency came back to bite me when I was trying to do something involving dynamic redefinition of methods.
comment save reportUsing raw SQL in django
in Python added by admin, on 3/1/2008 django framework intermediate sql
For a django project I'm working on, I need to run a simple query with COUNT and GROUP BY statements to collect some summary data. I tried working with the model API, and eventually fell back to using raw SQL instead.
comment save reportHands on with Blueprint, a CSS Framework
in CSS added by admin, on 2/1/2008 blueprint design framework
Blueprint is both a CSS Framework and an album by the legendary hip-hop artist Jay-Z. In this article, I am going to be writing about the Blueprint CSS Framework, which provides designers with a solid CSS foundation, including an easy-to-use grid, sensible typography, and a stylesheet for printing.
comment save reportHuman-Readable Encryption Keys
in Python added by admin, on 29/12/2007 cryptography intermediate
Somehow, we have to present these random 128-bit keys to the user, and I think I've found a pretty good way. We use RFC 1751, which defines a 'Convention for Human-Readable 128-bit Keys' - basically just a mapping of blocks of bits to strings of English words.
comment save reportGlobalization and Localization
in .NET added by admin, on 27/12/2007 intermediate localization
Explains how to make international applications customizable to users belonging to different nations, cultures, or regions.
comment save reportPython: Some Concurrency Tricks
in Python added by admin, on 27/12/2007 concurrency intermediate
Here are a few concurrency tricks if you're stuck using threads. I used these tricks years ago to write a Swing application in Jython, and I found them to be helpful enough to warrant a blog post, albeit a few years delayed.
comment save reportReal World Performance On Boxing Day
in Python added by admin, on 26/12/2007 benchmark jruby
Well, Ruby 1.9.0 landed yesterday, as expected. I’d be remiss if I didn’t start out by thanking matz, ko1, and all the other hackers involved in getting this milestone release out the door. It’s a great step for Ruby, and one that we’ve been waiting a long time for.
comment save reportDamn Cool Algorithms, Part 3: Anagram Trees
in Python added by admin, on 24/12/2007 algorithm general intermediate search tree
When it comes to finding anagrams of words, a frequent approach is to use an anagram dictionary - simply put, sort the letters in your word to provide a unique key that all anagrams of a word have in common. Another approach is to generate a letter-frequency histogram for each letter in your word. (Both these approaches are more or less equivalent, in fact.) These approaches make the problem of finding exact single-word anagrams for strings very efficient - O(1) if you use a hashtable.
comment save report