Browse All Questions (2)



Reliable Timer in a Console Application

I am aware in .net there are three timer types (see http://msdn.microsoft.com/en-us/magazine/cc164015.aspx ). I have chosen a the threaded timer as the other types can drift if the main thread is busy and I need this to be reliable. The way this timer works in the control of the timer is put on…

Best way to allow plugins for a PHP application

I am starting a new web application in PHP and this time around I want to create something that people can extend by using a plugin interface. I am a very confident PHP developer however I have never done this before so I'm not really sure where to start. How does one go about writing 'hooks' into…

Multiple submit buttons in an HTML form

Let's say you create a Wizard in an HTML form. One button goes back and one goes forward. Since the "back" button appears first in the markup, when you press Enter it will use that button to submit the form. Ex: <form> <input type="text" name="field1" /> <!-- put your cursor in this fie…

How do I get a distinct, ordered list of names from a DataTable using LINQ?

Let's say I have a DataTable with a Name column. I want to have a collection of the unique names ordered alphabetically. The following query ignores the order by clause. var names = (from DataRow dr in dataTable.Rows orderby (string)dr["Name"] select (string)dr["Name"]).Distinct()…

Office 2007 File Type, Mime Types and Identifying Characters

Where could I find a list of mime types and identifying characters for office 2007 files. I have an upload form that is restricting uploads based on extension and identifying characters but I cannot seem to find the Office 2007 mime types.

How do you page a collection with LINQ?

How do you page through a collection in LINQ given that you have a startIndex and a count?

How do I add existing comments to RDoc in Ruby?

I've got all these comments that I want to make into 'RDoc comments' so they can be formatted appropriately and viewed using 'Ri.' Can anyone get me started on understanding how to use RDoc?

How can you get Subclipse in Aptana to work with the newest release of Subversion?

The version of Subclipse (1.2.4) currently available through Aptana's automagic Plugins Manager does not work with the newest version of Subversion. I see on the Subclipse website however that they have 1.4.2 out for Eclipse. So I added a new remote update site to my Update manager. When I trie…

Adobe air - SQLStatement.execute() - Multiple queries in one statement

I've written a database generation script in sql, and want to execute it in my Adobe air application: Create Table tRole ( roleID integer Primary Key ,roleName varchar(40) ); Create Table tFile ( fileID integer Primary Key ,fileName varchar(50) ,fileDescription varchar(500) ,thum…

Flat File Databases in PHP

What are your best practices around creating flat file database structures in PHP? A lot of the more mature PHP flat file frameworks I see out there attempt to implement SQL-like query syntax, which is over the top for my purposes in most cases (I would just use a database at that point). Are…

Is gettimeofday() guaranteed to be of microsecond resolution?

So I find myself porting a game that was originally written for the Win32 API to Linux (well, porting the OS X port of the Win32 port to Linux), and have implemented QueryPerformanceCounter by giving the uSeconds since the process start up: BOOL QueryPerformanceCounter(LARGE_INTEGER* performa…

Good branch/merge tutorials for Tortoise SVN?

Anyone know of any really good tutorials explaining branching and merging with Subversion? All the better if it's specific to Tortoise SVN

Anatomy of a "Memory Leak"

In .NET perspective: What is a Memory Leak ? How to understand whether your application leaks? What are the effects? How to prevent a memory leak? If your application has memory leak, does it go away when the process exits or killed? Or do memory leaks in your application affects other …

Best Subversion clients for Windows Vista (64bit)

I've been using TortoiseSVN in a Windows environment for quite some time. It seems very feature-complete and nicely integrated into the Windows shell, and more importantly, it's fairly painless to teach to colleagues with little or no experience with source control. However , since we have moved…

Decoding T-SQL CAST in C#/VB.net

Recently our site has been deluged with the resurgence of the ASPRox bot SQL Injection attack. Without going into details, the attack attempts to execute SQL code by encoding the T-SQL commands in an ASCII encoded BINARY string. It looks something like this: DECLARE%20@S%20NVARCHAR(4000);SET%20…

< Previous Page   Next Page >
<< First Page   Last Page >>