Newest Questions

Filter by
Sorted by
Tagged with
94 votes
6 answers
32k views

When is it appropriate to use an unsigned variable over a signed one? What about in a for loop? I hear a lot of opinions about this and I wanted to see if there was anything resembling a consensus. ...
Bernard's user avatar
  • 45.6k
59 votes
10 answers
5k views

I am working on a collection of classes used for video playback and recording. I have one main class which acts like the public interface, with methods like play(), stop(), pause(), record() etc... ...
JimDaniel's user avatar
  • 12.8k
125 votes
13 answers
86k views

What are some guidelines for maintaining responsible session security with PHP? There's information all over the web and it's about time it all landed in one place!
saint_groceon's user avatar
135 votes
22 answers
40k views

I often run into the following problem. I work on some changes to a project that require new tables or columns in the database. I make the database modifications and continue my work. Usually, I ...
EndangeredMassa's user avatar
971 votes
21 answers
864k views

I often have to sort a dictionary (consisting of keys & values) by value. For example, I have a hash of words and respective frequencies that I want to order by frequency. There is a SortedList ...
Kalid's user avatar
  • 22.8k
37 votes
5 answers
3k views

What are the best practices for checking in BIN directories in a collaborative development environment using SVN? Should project level references be excluded from checkin? Is it easier to just add ...
Ryan Eastabrook's user avatar
37 votes
5 answers
3k views

What's the optimal level of concurrency that the C++ implementation of BerkeleyDB can reasonably support? How many threads can I have hammering away at the DB before throughput starts to suffer ...
Ted Dziuba's user avatar
  • 2,583
42 votes
3 answers
12k views

I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL, so this isn't a GTK app. I handle the initialization (gtk_init) sort of stuff inside the MessageBox function as ...
Bernard's user avatar
  • 45.6k
83 votes
10 answers
24k views

I have a little game written in C#. It uses a database as back-end. It's a trading card game, and I wanted to implement the function of the cards as a script. What I mean is that I essentially have ...
Michael Stum's user avatar
44 votes
3 answers
4k views

Does anybody know if there is a way to create an SQLite database based on an XSD DataSet? In the past, I've just used a basic SQLite manager, but I want to fuse things a bit more with my .NET ...
Dillie-O's user avatar
  • 29.9k
88 votes
4 answers
53k views

MySQL has this incredibly useful yet proprietary REPLACE INTO SQL Command. Can this easily be emulated in SQL Server 2005? Starting a new Transaction, doing a Select() and then either UPDATE or ...
Michael Stum's user avatar
44 votes
2 answers
32k views

How do I make it so mailto: links will be registered with my program? How would I then handle that event in my program? Most of the solutions I found from a quick Google search are how to do this ...
Liron Yahdav's user avatar
  • 10.9k
79 votes
9 answers
10k views

I have the following arrays: $artist = ["the roots", "michael jackson", "billy idol", "more", "and more", "and_YET_MORE"]; $count = [5, 3, 9,...
w-ll's user avatar
  • 3,925
40 votes
4 answers
5k views

Yes, I know. The existence of a running copy of SQL Server 6.5 in 2008 is absurd. That stipulated, what is the best way to migrate from 6.5 to 2005? Is there any direct path? Most of the ...
Dave Ward's user avatar
  • 60.7k
72 votes
4 answers
4k views

One of the fun parts of multi-cultural programming is number formats. Americans use 10,000.50 Germans use 10.000,50 French use 10 000,50 My first approach would be to take the string, parse it ...
Michael Stum's user avatar
72 votes
8 answers
20k views

This is something I've pseudo-solved many times and have never quite found a solution for. The problem is to come up with a way to generate N colors, that are as distinguishable as possible where N ...
Louis Brandy's user avatar
  • 20.1k
125 votes
11 answers
124k views

On one Linux Server running Apache and PHP 5, we have multiple Virtual Hosts with separate log files. We cannot seem to separate the php error_log between virtual hosts. Overriding this setting in ...
Michael Stum's user avatar
53 votes
3 answers
8k views

I want to be able to display a normal YouTube video with overlaid annotations, consisting of coloured rectangles for each frame. The only requirement is that this should be done programmatically. ...
Louis Brandy's user avatar
  • 20.1k
86 votes
6 answers
18k views

I want to print HTML from a C# web service. The web browser control is overkill, and does not function well in a service environment, nor does it function well on a system with very tight security ...
Chris Marasti-Georg's user avatar
346 votes
22 answers
135k views

I want to get my databases under version control. I'll always want to have at least some data in there (as alumb mentions: user types and administrators). I'll also often want a large collection of ...
Zack Peterson's user avatar
64 votes
10 answers
178k views

Edit: This question was written in 2008, which was like 3 internet ages ago. If this question is still relevant to your environment, please accept my condolences. Everyone else should convert into a ...
Michael Stum's user avatar
102 votes
7 answers
10k views

Stack Overflow has a subversion version number at the bottom: svn revision: 679 I want to use such automatic versioning with my .NET Web Site/Application, Windows Forms, WPD projects/solutions. How ...
Zack Peterson's user avatar
90 votes
8 answers
22k views

I have a website that plays mp3s in a flash player. If a user clicks 'play' the flash player automatically downloads an mp3 and starts playing it. Is there an easy way to track how many times a ...
Grant's user avatar
  • 12.1k
60 votes
9 answers
6k views

Does anyone know of a good way to compress or decompress files and folders in C# quickly? Handling large files might be necessary.
40 votes
1 answer
2k views

I have a pretty standard table set-up in a current application using the .NET XSD DataSet and TableAdapter features. My contracts table consists of some standard contract information, with a column ...
Dillie-O's user avatar
  • 29.9k
89 votes
5 answers
97k views

I've been banging my head against SQL Server 2005 trying to get a lot of data out. I've been given a database with nearly 300 tables in it and I need to turn this into a MySQL database. My first ...
Mat's user avatar
  • 6,735
105 votes
18 answers
29k views

What is the "purist" or "correct" way to access an object's properties from within an object method that is not a getter/setter method? I know that from outside of the object you should use a getter/...
cmcculloh's user avatar
  • 48.8k
120 votes
16 answers
82k views

Is there an existing application or library in Java which will allow me to convert a CSV data file to XML file? The XML tags would be provided through possibly the first row containing column ...
A Salim's user avatar
  • 1,315
45 votes
1 answer
2k views

Does anyone have experience creating SQL-based ASP.NET site-map providers? I have the default XML file web.sitemap working properly with my Menu and SiteMapPath controls, but I'll need a way for the ...
Zack Peterson's user avatar
68 votes
2 answers
6k views

Recently our site has been deluged with the resurgence of the Asprox botnet SQL injection attack. Without going into details, the attack attempts to execute SQL code by encoding the T-SQL commands in ...
Dillie-O's user avatar
  • 29.9k
52 votes
8 answers
17k views

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 ...
pix0r's user avatar
  • 31.3k
182 votes
15 answers
16k views

In .NET perspective: What is a memory leak? How can you determine whether your application leaks? What are the effects? How can you prevent a memory leak? If your application has memory leak, does it ...
huseyint's user avatar
  • 15.1k
163 votes
3 answers
57k views

How do you branch and merge with Apache Subversion using the TortoiseSVN client?
cmcculloh's user avatar
  • 48.8k
107 votes
10 answers
46k views

I am 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). I have implemented QueryPerformanceCounter by giving the uSeconds ...
Bernard's user avatar
  • 45.6k
133 votes
11 answers
71k views

What are the best practices around creating flat file database structures in PHP? A lot of more matured PHP flat file frameworks out there which I attempt to implement SQL-like query syntax which is ...
saint_groceon's user avatar
54 votes
3 answers
7k views

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 ...
Shawn's user avatar
  • 19.9k
50 votes
4 answers
12k views

The version of Subclipse (1.2.4) currently available through Aptana's automatic Plugins Manager does not work with the newest version of Subversion. I see on the Subclipse website however that they ...
cmcculloh's user avatar
  • 48.8k
48 votes
2 answers
2k views

I want to format my existing comments as 'RDoc comments' so they can be viewed using ri. What are some recommended resources for starting out using RDoc?
CodingWithoutComments's user avatar
89 votes
4 answers
6k views

How do you page through a collection in LINQ given that you have a startIndex and a count?
Nick Berardi's user avatar
53 votes
1 answer
5k views

Where can I find a list of all of the MIME types and the identifying characters for Microsoft Office 2007 files? I have an upload form that is restricting uploads based on the extensions and ...
117 votes
7 answers
28k views

I have a DataTable with a Name column. I want to generate a collection of the unique names ordered alphabetically. The following query ignores the order by clause. var names = (from DataRow dr in ...
Bob's user avatar
  • 100k
293 votes
29 answers
260k views

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 ...
Kevin's user avatar
  • 13.1k
294 votes
8 answers
42k views

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. How does one go about writing 'hooks' into their code ...
Wally Lawless's user avatar
115 votes
3 answers
9k views

I am aware that in .NET there are three timer types (see Comparing the Timer Classes in the .NET Framework Class Library). I have chosen a threaded timer as the other types can drift if the main ...
John's user avatar
  • 30.7k
154 votes
9 answers
84k views

How can I monitor an SQL Server database for changes to a table without using triggers or modifying the structure of the database in any way? My preferred programming environment is .NET and C#. I'd ...
TimM's user avatar
  • 1,895
97 votes
8 answers
12k views

How do I forcefully unload a ByteArray from memory using ActionScript 3? I have tried the following: // First non-working solution byteArray.length = 0; byteArray = new ByteArray(); // Second non-...
user avatar
178 votes
9 answers
17k views

I'm having issues getting the C sockets API to work properly in C++ on z/OS. Although I am including sys/socket.h, I still get compile time errors telling me that AF_INET is not defined. Am I missing ...
Jax's user avatar
  • 7,240
199 votes
7 answers
108k views

If I have a trigger before the update on a table, how can I throw an error that prevents the update on that table?
Matt MacLean's user avatar
  • 19.7k
357 votes
23 answers
74k views

I'm looking for the fastest way to obtain the value of π, as a personal challenge. More specifically, I'm using ways that don't involve using #define constants like M_PI, or hard-coding the number in. ...
C. K. Young's user avatar
200 votes
9 answers
89k views

How do I store binary data in MySQL?
Geoff Dalgas's user avatar
  • 6,206

15 30 50 per page