All Questions

Filter by
Sorted by
Tagged with
86 votes
6 answers
18k views

How do I print an HTML document from a web service?

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
343 votes
21 answers
128k views

How to do version control for SQL Server database?

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

Embedding Windows Media Player for all browsers

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
101 votes
7 answers
10k views

How do I sync the SVN revision number with my ASP.NET web site?

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. ...
Zack Peterson's user avatar
90 votes
8 answers
22k views

How do I track file downloads

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
  • 11.9k
60 votes
9 answers
5k views

Compressing / Decompressing Folders & Files

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

XSD DataSets and ignoring foreign keys

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.6k
89 votes
5 answers
97k views

How to export data from SQL Server 2005 to MySQL [closed]

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,695
105 votes
18 answers
27k views

How would you access Object properties from within an object method? [closed]

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.3k
121 votes
16 answers
81k views

Java lib or app to convert CSV to XML file? [closed]

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,325
45 votes
1 answer
2k views

ASP.NET Site Maps

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

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

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.6k
52 votes
8 answers
17k views

Best Subversion clients for Windows Vista (64bit) [closed]

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.2k
181 votes
15 answers
15k views

Anatomy of a "Memory Leak"

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
  • 15k
163 votes
3 answers
56k views

How do you branch and merge with TortoiseSVN? [closed]

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

Is gettimeofday() guaranteed to be of microsecond resolution?

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.4k
132 votes
11 answers
70k views

Flat file databases [closed]

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

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

Getting Subclipse in Aptana to work with the newest release of Subversion

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.3k
48 votes
2 answers
2k views

How do I add existing comments to RDoc in Ruby? [closed]

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

Paging a collection with LINQ

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

Microsoft Office 2007 file type, Mime types and identifying characters

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
27k views

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

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
  • 99k
292 votes
28 answers
258k views

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

Best way to allow plugins for a PHP application [closed]

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
114 votes
3 answers
8k views

Reliable timer in a console application

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.3k
153 votes
9 answers
80k views

Check for changes to an SQL Server table?

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,885
97 votes
8 answers
12k views

How to unload a ByteArray using Actionscript 3?

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
176 votes
9 answers
17k views

How to use the C socket API in C++ on z/OS

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,050
197 votes
7 answers
106k views

Throw an error preventing a table update in a MySQL trigger

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.6k
353 votes
23 answers
71k views

What is the fastest way to get the value of π?

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
199 votes
9 answers
88k views

Binary Data in MySQL [closed]

How do I store binary data in MySQL?
Geoff Dalgas's user avatar
  • 6,146
158 votes
7 answers
89k views

Filling a DataSet or a DataTable from a LINQ query result set

How do you expose a LINQ query as an ASMX web service? Usually, from the business tier, I can return a typed DataSet or a DataTable which can be serialized for transport over ASMX. How can I do the ...
Geoff Dalgas's user avatar
  • 6,146
506 votes
14 answers
188k views

Difference between Math.Floor() and Math.Truncate()

What is the difference between Math.Floor() and Math.Truncate() in .NET?
Anonymous User's user avatar
720 votes
27 answers
311k views

Determine a user's timezone

Is there a standard way for a web server to be able to determine a user's timezone within a web page? Perhaps from an HTTP header or part of the user-agent string?
Kevin Dente's user avatar
  • 25.6k
1656 votes
42 answers
204k views

Calculate relative time in C#

Given a specific DateTime value, how do I display relative time, like: 2 hours ago 3 days ago a month ago
2255 votes
75 answers
835k views

How do I calculate someone's age based on a DateTime type birthday?

Given a DateTime representing a person's birthday, how do I calculate their age in years?
320 votes
7 answers
25k views

Why did the width collapse in the percentage width child element in an absolutely positioned parent on Internet Explorer 7?

I have an absolutely positioned div containing several children, one of which is a relatively positioned div. When I use a percentage-based width on the child div, it collapses to 0 width on IE7, but ...
Kevin Dente's user avatar
  • 25.6k
809 votes
13 answers
78k views

How to convert Decimal to Double in C#?

I want to assign the decimal variable "trans" to the double variable "this.Opacity". decimal trans = trackBar1.Value / 5000; this.Opacity = trans; When I build the app it gives ...

15 30 50 per page