/browse/posts

All Posts

» most recent recently popular most popular
score: 0  posted by: mkaz in: php  tags: object, array

A quick easy way to convert a PHP object to an array by using the (array) cast.

1 comment
score: 1  posted by: mkaz in: php  tags: timer, performance, benchmarking

Use this class to measure how long it takes for a script or function to execute

0 comments
score: 1  posted by: seansitter in: javascript  tags: popup, window

This function will create a new popup window of a given dimension with the url specified.

0 comments
score: 0  posted by: seansitter in: rails  tags: rubyactiverecordsession

Describes how to use activerecord as session store

0 comments
score: 1  posted by: seansitter in: javascript  tags: element, pixel, position, page, coordinates

Cross-browser function which finds the pixel coordinates of an element within a page

0 comments
score: 1  posted by: ccheever in: php  tags: xml, xmlentities

Many people don't realize that the escaping for XML and HTML is subtly different. In PHP, people often use htmlentities when they want to escape XML, but that doesn't handle some of the substitutions correctly. Here is some code found in some comments...

0 comments
score: 1  posted by: gregspurrier in: ruby 

Rate limiter class for Ruby that ensures that a minimum time elapses between invocations of blocks of code. More detail available at http://www.gregspurrier.com/2006/09/rate_limiting_r.html

0 comments
score: 0  posted by: mkaz in: regex, php 

A couple of quick examples of how to do a regular expression match in PHP.

0 comments
score: 1  posted by: mkaz in: php  tags: string, validate, email, e-mail

Check a passed string is a valid e-mail format, does not truly check if it is a valid e-mail, just that it looks right.

0 comments
score: 1  posted by: mkaz in: php  tags: string, escape

Similar to htmlspecialchars but escapes a string for use in javascript, for example being passed as a variable.

0 comments
score: 1  posted by: mkaz in: php  tags: httpstatuscode

How to send the appropriate HTTP status code programattically using PHP. There are a few scenarios you may want to do this. I'm using this for a 301 redirect code, for an RSS feed to let the bot know that the RSS feed is in a new location and to fetch fro...

0 comments
score: 1  posted by: traveloneous in: .net  tags: developmenttools

I recently discovered Microsoft's Visual Studio! Yummm.....

4 comments
score: 0  posted by: seansitter in: c#  tags: excel

All this code should belong to a class

0 comments
score: 0  posted by: seansitter in: python  tags: image, yahoo

Create a simple directory of yahoo.

0 comments
score: 0  posted by: seansitter in: linux  tags: ubuntu

Fixes the default locale in ubuntu.

0 comments
pages: 1 2