Id int64 4 8.51M | PostTypeId int64 1 7 | AcceptedAnswerId int64 7 75.5M ⌀ | ParentId int64 4 41.8M ⌀ | Score int64 -208 27.7k | ViewCount int64 11 12.4M ⌀ | Body stringlengths 0 45k | Title stringlengths 2 150 ⌀ | ContentLicense stringclasses 3
values | FavoriteCount int64 0 225 ⌀ | CreationDate stringdate 2008-07-31 21:42:52 2011-12-14 18:48:47 | LastActivityDate stringdate 2008-08-01 12:19:17 2023-03-05 04:40:26 | LastEditDate stringdate 2008-08-01 13:54:25 2023-03-05 03:12:45 ⌀ | LastEditorUserId int64 -1 21.3M ⌀ | OwnerUserId int64 -1 21.1M ⌀ | Tags listlengths 1 6 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16,714 | 2 | null | 16,611 | 5 | null | Whether you choose XSD and/or Schematron depends on what you are trying to validate. XSD is probably the most common validation strategy, but there are limits on what it can validate. If all you want to do is ensure that the right type of data is in each field, XSD should work for you. If you need to assert, for exampl... | null | CC BY-SA 2.5 | null | 2008-08-19T18:43:18.097 | 2008-08-19T18:43:18.097 | null | null | 765 | null |
16,720 | 2 | null | 16,638 | 1 | null | The google maps sample is using this code...
```
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
```
...which is putting the SouthWest/NorthEast bounds into a ... | null | CC BY-SA 2.5 | null | 2008-08-19T18:46:25.670 | 2008-08-19T18:46:25.670 | null | null | 71 | null |
16,724 | 2 | null | 16,716 | 4 | null | I'm considering the same thing. On the Open ID site, there's a link 'For Developers' @ [http://openid.net/developers/](http://openid.net/developers/) and from there is a link to 'Open Libraries' @ [http://wiki.openid.net/Libraries](http://wiki.openid.net/Libraries) and finally from there is one called 'DotNetOpenID' @ ... | null | CC BY-SA 2.5 | null | 2008-08-19T18:47:33.733 | 2008-08-19T18:47:33.733 | null | null | 1,953 | null |
16,728 | 2 | null | 16,716 | 1 | null | You should check out the [DotNetNuke](http://www.dotnetnuke.com) codebase as well, they have been using OpenID for the last several revisions, and you'll find working code for implementing it there.
| null | CC BY-SA 2.5 | null | 2008-08-19T18:49:13.870 | 2008-08-19T18:49:13.870 | null | null | 1,795 | null |
16,723 | 2 | null | 16,634 | 5 | null | You will have to mark the CLR as EXTERNAL_ACCESS in order to get access to the System.IO namespace, however as things go that is not a bad way to go about it.
> SAFE is the default permission set, but it’s highly restrictive. With the SAFE setting, you can access only data from a local database to perform computation... | null | CC BY-SA 2.5 | null | 2008-08-19T18:47:21.970 | 2008-08-19T18:47:21.970 | null | null | 805 | null |
16,608 | 2 | null | 16,568 | 7 | null | When we used to work in MSSQL 2000, we did what we called the "triple-flip":
```
DECLARE @InnerPageSize int
DECLARE @OuterPageSize int
DECLARE @Count int
SELECT @Count = COUNT(<column>) FROM <TABLE>
SET @InnerPageSize = @PageNum * @PageSize
SET @OuterPageSize = @Count - ((@PageNum - 1) * @PageSize)
IF (@OuterPageS... | null | CC BY-SA 3.0 | null | 2008-08-19T17:33:44.320 | 2011-12-30T15:31:24.060 | 2011-12-30T15:31:24.060 | 517 | 517 | null |
16,733 | 2 | null | 12,927 | 0 | null | For completeness sake: even though my company more or less standardizes on Eclipse we use Netbeans (6 and up) with its [included, free profiler](http://profiler.netbeans.org/) on a daily basis. It works better than the Eclipse TPTP plugin (last checked 3 months ago) and for us it removes any need for a commercial profi... | null | CC BY-SA 2.5 | null | 2008-08-19T18:50:40.873 | 2008-08-19T18:50:40.873 | null | null | 1,996 | null |
16,734 | 2 | null | 10,658 | 1 | null | Check out [http://www.codeproject.com/KB/vb/vcalendar.aspx](http://www.codeproject.com/KB/vb/vcalendar.aspx)
It doesn't handle the quoted-printable fields like you asked, but the rest of the code is there and can be modified.
| null | CC BY-SA 2.5 | null | 2008-08-19T18:51:07.673 | 2008-08-19T18:51:07.673 | null | null | 698 | null |
16,727 | 1 | null | null | 9 | 17,631 | In GWT I have to specify what locales are supported in my application. The code get compiled in various files, one for each locale (beside other versions), but I have to give my clients one only URL. This URL is supposed to be a page that should be displayed according to the locale preferred by the browser.
I dont't wa... | how to get locale information on a GWT application | CC BY-SA 2.5 | 0 | 2008-08-19T18:48:10.800 | 2013-03-01T06:22:41.780 | null | null | null | [
"url",
"gwt",
"locale"
] |
16,735 | 2 | null | 16,568 | 4 | null | Oracle:
```
select * from (select foo from bar order by foo) where ROWNUM = x
```
| null | CC BY-SA 2.5 | null | 2008-08-19T18:51:29.623 | 2008-08-19T18:51:29.623 | null | null | 116 | null |
16,729 | 2 | null | 15,310 | 3 | null | >
1. Does anyone know of anyway to reduce/optimize the PDF export phase and or the size of the PDF without lowering the total page count?
I have a few ideas and questions:
1. Is this a graphics-heavy report? If not, do you have tables that start out as text but are converted into a graphic by the SSRS PDF renderer... | null | CC BY-SA 2.5 | null | 2008-08-19T18:49:15.073 | 2008-08-19T18:49:15.073 | null | null | 1,818 | null |
16,737 | 2 | null | 15,190 | 1 | null | I am not sure I completely understand your question.
-
| null | CC BY-SA 2.5 | null | 2008-08-19T18:51:55.193 | 2008-08-29T19:29:02.673 | 2008-08-29T19:29:02.673 | 255 | 255 | null |
16,740 | 2 | null | 13,569 | 5 | null | Personally I use PDO, but I think that is mainly a question of preference.
PDO has some features that help agains SQL injection ([prepared statements](http://de.php.net/manual/de/pdo.prepared-statements.php)), but if you are careful with your SQL you can achieve that with mysqli, too.
Moving to another database is no... | null | CC BY-SA 2.5 | null | 2008-08-19T18:55:06.277 | 2008-08-19T18:55:06.277 | null | null | 999 | null |
16,746 | 2 | null | 16,164 | 4 | null | Some of my team's new systems generate RSS feeds that the developers syndicate.
These feeds push out events that interest the developers at certain times and the information is controlled using different loggers. Thus when debugging you can get the debugging feed, when you want to see completed transactions you go to t... | null | CC BY-SA 2.5 | null | 2008-08-19T19:02:29.133 | 2008-08-19T19:02:29.133 | null | null | 573 | null |
16,747 | 1 | 25,606 | null | 45 | 6,222 | I am building a public website using ASP.NET, as part of the deliverable I need to do an Admin Site for data entry of the stuff shown in the public site, I was wondering what techniques or procedures are people using to validate entries using ASP.NET MVC.
| What's the best way to implement field validation using ASP.NET MVC? | CC BY-SA 2.5 | 0 | 2008-08-19T19:02:55.637 | 2019-03-03T15:49:30.813 | 2012-07-13T06:38:32.433 | 727,208 | 1,549 | [
"c#",
"asp.net-mvc",
"validation"
] |
16,744 | 2 | null | 15,024 | 0 | null | For build automation and continuous integration take a look at [TeamCity](http://www.jetbrains.com/teamcity/) from [Jetbrains](http://www.jetbrains.com).
It has a lot of [features](http://www.jetbrains.com/teamcity/documentation/featureMatrix.html) and is really a breeze to set up and use.
If you use Visual Studio 20... | null | CC BY-SA 2.5 | null | 2008-08-19T19:00:58.917 | 2008-08-19T19:00:58.917 | null | null | 1,999 | null |
16,751 | 2 | null | 15,949 | 0 | null | I do not know whether the above answer does basically the same thing, but some of our systems use the DB connection about once a week and I've seen that we provide a -Otimeout flag or something of that sort to mysql to set the connection timeout.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:06:11.730 | 2008-08-19T19:06:11.730 | null | null | 573 | null |
16,752 | 2 | null | 16,568 | 2 | null | But really, isn't all this really just parlor tricks for good database design in the first place? The few times I needed functionality like this it was for a simple one off query to make a quick report. For any real work, using tricks like these is inviting trouble. If selecting a particular row is needed then just ... | null | CC BY-SA 2.5 | null | 2008-08-19T19:06:57.580 | 2008-08-19T19:06:57.580 | null | null | null | null |
16,750 | 2 | null | 16,716 | 6 | null | > Are there any good tutorials on how to integrate OpenId with an ASP.NET site?
[Andrew Arnott's post titled "How to add OpenID to your ASP.NET web site (in C# or VB.NET)"](http://blog.nerdbank.net/2008/04/how-to-add-openid-to-your-aspnet-web.html)
| null | CC BY-SA 2.5 | null | 2008-08-19T19:03:47.697 | 2008-08-19T19:03:47.697 | null | null | 1,790 | null |
16,753 | 2 | null | 16,568 | 1 | null | In Sybase SQL Anywhere:
```
SELECT TOP 1 START AT n * from table ORDER BY whatever
```
Don't forget the ORDER BY or it's meaningless.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:06:59.903 | 2008-08-19T19:06:59.903 | null | null | 1,821 | null |
16,756 | 2 | null | 16,406 | 1 | null | The above method calls for using the SavingChanges event which is called before the changes are persisted. If there is an error during the save, you have already cleared your dirty flag. I would think there would be a SavedChanges event exposed as well.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:08:07.157 | 2008-08-19T19:08:07.157 | null | null | 1,956 | null |
16,755 | 2 | null | 5,527 | 0 | null | Strongly agree that syntactically C# beats Java hands down, so there is really no reason to lament the demise of j#. Now trying to get c# compiling to Java bytecode might be an interesting move as Sun's hotspot jvm is great software.
Or, for a bit of fun with what might well become the next generation of Java, how ab... | null | CC BY-SA 2.5 | null | 2008-08-19T19:07:43.007 | 2008-08-19T19:07:43.007 | null | null | 1,853 | null |
16,749 | 2 | null | 12,936 | 13 | null | Note that Zend Optimizer and MMCache (or similar applications) are totally different things. While Zend Optimizer tries to optimize the program opcode MMCache will cache the scripts in memory and reuse the precompiled code.
I did some benchmarks some time ago and you can find the [results](http://blogs.interdose.com/d... | null | CC BY-SA 2.5 | null | 2008-08-19T19:03:26.540 | 2012-04-13T10:09:13.420 | 2012-04-13T10:09:13.420 | 999 | 999 | null |
16,757 | 2 | null | 8,472 | 2 | null | My solution was to put the form on a separate page and pass a timestamp to it. On that page I only display the form if the timestamp is valid (not too fast, not too old). I found that bots would always hit the submission page directly and only humans would navigate there correctly.
Won't work if you have the form on... | null | CC BY-SA 2.5 | null | 2008-08-19T19:08:35.830 | 2010-04-19T16:20:57.780 | 2010-04-19T16:20:57.780 | 63,550 | 744 | null |
16,760 | 2 | null | 16,317 | 3 | null | You can generate data plans with VSTS Database Edition (with the latest 2008 Power tools).
It includes a Data Generation Wizard which allows automated data generation by pointing to an existing database so you get something that is realistic but contains entirely different data
| null | CC BY-SA 2.5 | null | 2008-08-19T19:13:41.793 | 2008-08-19T19:13:41.793 | null | null | 224 | null |
16,730 | 2 | null | 16,716 | 25 | null | See [Scott Hanselman's post on using DotNetOpenID](http://www.hanselman.com/blog/TheWeeklySourceCode25OpenIDEdition.aspx) in ASP.NET. [Andrew Arnott's blog](http://blog.nerdbank.net/) is full of samples on using DotNetOpenID with ASP.NET, including ASP.NET MVC.
I recently hooked up DotNetOpenID for the Subtext 2.0 rel... | null | CC BY-SA 2.5 | null | 2008-08-19T18:49:27.537 | 2008-08-19T18:49:27.537 | null | null | 5 | null |
16,643 | 2 | null | 16,563 | 4 | null | Something like this might do the trick:
```
/Seat (\d+): ([^\(]+) \((\d+)in chips\)/
```
And some basic explanation on how Regex works:
- \d = digit.- \<character> = escapes character, if not part of any character class or subexpression. for example: `\t`
would render a tab, while `\\t` would render "\t" (since th... | null | CC BY-SA 2.5 | null | 2008-08-19T18:07:09.480 | 2008-08-19T18:13:53.723 | 2008-08-19T18:13:53.723 | 1,993 | 1,993 | null |
16,762 | 1 | null | null | 42 | 27,361 | I have a couple CSS files with overlapping CSS selectors that I'd like to programmatically merge (as in not just appending one file to the end of the other). Is there any tool to do this online? or a Firefox extension perhaps?
| Are there any tools for merging CSS? | CC BY-SA 2.5 | 0 | 2008-08-19T19:14:42.743 | 2012-06-12T21:37:42.410 | 2008-08-19T19:23:58.480 | 2,007 | 2,007 | [
"css"
] |
16,759 | 1 | 16,785 | null | 3 | 1,389 | I read this [PHP RegEx page](http://us.php.net/manual/en/regexp.reference.php), but either I'm missing something, misreading something, or it doesn't work the way they say. I'm guessing it's one of the first two.
```
$str = preg_replace("([|]\d*)", "\1;", $str);
```
| How do you use back-references to PCREs in PHP? | CC BY-SA 2.5 | 0 | 2008-08-19T19:11:32.860 | 2009-03-14T07:54:29.470 | 2009-03-14T07:54:29.470 | 20,938 | 572 | [
"php",
"regex"
] |
16,765 | 2 | null | 16,762 | 2 | null | No I wish there was but the programming effort seems too much since there are multiple ways to reference a single element. The best that you can do is use a runtime like FireBug to find duplicates.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:16:37.327 | 2008-08-19T19:16:37.327 | null | null | 17 | null |
16,766 | 2 | null | 16,432 | 1 | null | I've always gone the string.Format() route. Being able to store formats in variables like Nathan's example is a great advantage. In some cases I may append a variable but once more than 1 variable is being concatenated I refactor to use formatting.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:16:49.043 | 2008-08-19T19:16:49.043 | null | null | 1,894 | null |
16,761 | 2 | null | 16,660 | 5 | null | AS far as I know, there is no way to localize a report (meaning automating the translation of string litterals)...
Like you said,you basically have to use the User!Language global variable to catch the user's settings and then use that to retrieve the appropriate strings from the DB...
However, you can adapt the disp... | null | CC BY-SA 2.5 | null | 2008-08-19T19:14:04.303 | 2008-08-19T19:14:04.303 | null | null | 1,165,587 | null |
16,779 | 2 | null | 15,142 | 1 | null | I'd like to cast another vote for using stored procs (despite the hassle they can introduce when it comes to maintenance and versioning) as a way to restrict direct access to the underlying tables for better security.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:25:17.933 | 2008-08-19T19:25:17.933 | null | null | 2,006 | null |
16,770 | 1 | 16,810 | null | 63 | 17,059 | I'm trying to fully understand all of Haskell's concepts.
In what ways are algebraic data types similar to generic types, e.g., in C# and Java? And how are they different? What's so algebraic about them anyway?
I'm familiar with universal algebra and its rings and fields, but I only have a vague idea of how Haskell'... | Haskell's algebraic data types | CC BY-SA 2.5 | 0 | 2008-08-19T19:18:41.720 | 2017-06-10T23:13:40.770 | 2011-05-06T21:21:39.890 | 83,805 | 1,659 | [
"data-structures",
"haskell",
"types",
"functional-programming",
"algebraic-data-types"
] |
16,780 | 2 | null | 16,568 | 15 | null | 1 small change: n-1 instead of n.
```
select *
from thetable
limit n-1, 1
```
| null | CC BY-SA 3.0 | null | 2008-08-19T19:25:43.797 | 2012-12-03T23:35:02.057 | 2012-12-03T23:35:02.057 | 1,357,154 | 17 | null |
16,783 | 2 | null | 16,403 | 0 | null | There is a page regarding this topic on [webtypography.net](http://www.webtypography.net/Rhythm_and_Proportion/Horizontal_Motion/2.1.4/). That site has many other interesting things about creating text for the web from the point of view of typography, things that web page designers often don't even think about. It's wo... | null | CC BY-SA 2.5 | null | 2008-08-19T19:27:42.030 | 2008-08-19T19:27:42.030 | null | null | 893 | null |
16,784 | 2 | null | 15,674 | 0 | null | @Daniel Fone: The SVN docs recommend one project per repository, so that is definitely the way the creators intended it to go. As you can have one server (apache or svnserve) maintain multiple repositories, I've never run into a problem of too much overhead. With [VisualSVN Server](http://www.visualsvn.com/server/), in... | null | CC BY-SA 2.5 | null | 2008-08-19T19:28:45.727 | 2008-08-19T19:28:45.727 | null | null | 470 | null |
16,785 | 2 | null | 16,759 | 4 | null | Your regular expression should follow Perl syntax, meaning it has to start and end with the same character (with some exceptions). Also, the back reference should start with a double slash, to get around PHPs double escaping. This should work (with a quick test):
```
$str = "asdfasdf |123123 asdf iakds |302 asdf |11";... | null | CC BY-SA 2.5 | null | 2008-08-19T19:29:00.513 | 2008-08-19T19:29:00.513 | null | null | 1,606 | null |
16,777 | 2 | null | 16,568 | 395 | null | There are ways of doing this in optional parts of the standard, but a lot of databases support their own way of doing it.
A really good site that talks about this and other things is [http://troels.arvin.dk/db/rdbms/#select-limit](http://troels.arvin.dk/db/rdbms/#select-limit).
Basically, PostgreSQL and MySQL support... | null | CC BY-SA 4.0 | null | 2008-08-19T19:22:15.100 | 2019-02-27T15:52:24.877 | 2019-02-27T15:52:24.877 | 1,461,607 | 2,010 | null |
16,769 | 2 | null | 16,727 | 3 | null | Unless I am reading the documentation incorrectly I don't think you have to do anything.
[GWT and Locale](http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Internationalization.html#SpecifyingLocale)
> By making locale a client property, the standard startup process in gwt.js chooses ... | null | CC BY-SA 2.5 | null | 2008-08-19T19:18:40.690 | 2008-08-19T19:18:40.690 | null | null | 1,958 | null |
16,630 | 2 | null | 16,298 | 11 | null | I think several of the answers hit around the possible solution to your problem.
I agree the easiest (and best solution for SEO purposes) is the 301 redirect. In IIS this is fairly trivial, you'd create a site for subdomain.hostone.com, after creating the site, right-click on the site and go into properties. Click o... | null | CC BY-SA 2.5 | null | 2008-08-19T17:57:10.233 | 2008-08-19T17:57:10.233 | null | null | 1,795 | null |
16,790 | 2 | null | 16,689 | 4 | null | [Ice](http://www.zeroc.com/ice.html) from ZeroC is a really high performance "enterprisey" interop layer that supports Java and .net amongst others. I think of it as an updated Corba - it even has its own object oriented interface definition language called [Slice](http://www.zeroc.com/doc/Ice-3.3.0/reference/) (like ... | null | CC BY-SA 2.5 | null | 2008-08-19T19:32:30.057 | 2008-08-19T19:32:30.057 | null | null | 1,853 | null |
16,792 | 1 | 16,806 | null | 11 | 14,610 | Came across this error today. Wondering if anyone can tell me what it means:
> > Cannot sort a row of size 9522, which is greater than the allowable maximum of 8094.
Is that 8094 bytes? Characters? Fields? Is this a problem joining multiple tables that are exceeding some limit?
| SQL Server Maximum row size | CC BY-SA 2.5 | 0 | 2008-08-19T19:32:38.823 | 2010-03-30T19:00:15.797 | 2008-08-19T22:36:56.013 | 116 | 1,975,282 | [
"sql-server"
] |
16,794 | 2 | null | 16,792 | 0 | null | That used to be a problem in SQL 2000, but I thought that was fixed in 2005.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:35:17.867 | 2008-08-19T19:35:17.867 | null | null | 1,956 | null |
16,799 | 2 | null | 16,792 | 0 | null | 8094 bytes.
If you list some more information about what you are doing it might help us to figure out the actual cause.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:37:06.660 | 2008-08-19T19:37:06.660 | null | null | 41 | null |
16,793 | 2 | null | 8,398 | 0 | null | Usually you know where you are having problems, so you can set a breakpoint in your JavaScript code by placing the keyword "debugger;" on a line in your JavaScript code (obviously without the quotes) to set a breakpoint.
When you get to it in Internet Explorer, it will ask you if you want to debug and prompt you to c... | null | CC BY-SA 3.0 | null | 2008-08-19T19:33:32.020 | 2012-11-01T20:11:58.323 | 2012-11-01T20:11:58.323 | 63,550 | 1,790 | null |
16,801 | 2 | null | 16,795 | 10 | null | [System.Web.HttpUtility.HtmlEncode(string)](https://msdn.microsoft.com/en-us/library/system.web.httputility.htmlencode(v=vs.110).aspx)
| null | CC BY-SA 3.0 | null | 2008-08-19T19:37:19.687 | 2017-05-16T16:34:37.963 | 2017-05-16T16:34:37.963 | 782,911 | 1,960 | null |
16,802 | 2 | null | 16,795 | 11 | null | Try this.
```
var encodedHtml = HttpContext.Current.Server.HtmlEncode(...);
```
| null | CC BY-SA 2.5 | null | 2008-08-19T19:37:48.577 | 2008-08-19T19:37:48.577 | null | null | 17 | null |
16,806 | 2 | null | 16,792 | 10 | null | In SQL 2000, the row limit is 8K bytes, which is the same size as a page in memory.
[Edit]
In 2005, the page size is the same (8K), but the database uses pointers on the row in the page to point to other pages that contain larger fields. This allows 2005 to overcome the 8K row size limitation.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:39:20.510 | 2008-08-19T19:39:20.510 | null | null | 581 | null |
16,808 | 1 | 16,811 | null | 1 | 670 | When I goto view the property page for my CSharp test application I get the following error.
"An error occurred trying to load the page. COM object that has been seperated from its underlying RCW cannot be used."
The only thing that seems to fix it is rebooting my PC!
| Error viewing csproj property pages in VisualStudio2005 | CC BY-SA 2.5 | null | 2008-08-19T19:42:15.777 | 2013-01-22T13:48:21.677 | null | null | 1,624 | [
"visual-studio"
] |
16,809 | 2 | null | 15,774 | 1 | null | We use FinalBuilder to automate a bunch of post build / pre build tasks. There's also a web interface so you can kick off builds (or push websites) by logging in to the web site and clicking a button.
[http://www.finalbuilder.com/](http://www.finalbuilder.com/)
| null | CC BY-SA 2.5 | null | 2008-08-19T19:42:46.477 | 2008-08-19T19:42:46.477 | null | null | 245 | null |
16,807 | 2 | null | 16,795 | 4 | null | Don't know if there's an exact replacement, but there is a method `HtmlUtility.HtmlEncode` that replaces special characters with their HTML equivalents. A close cousin is `HtmlUtility.UrlEncode` for rendering URL's. You could also use validator controls like `RegularExpressionValidator`, `RangeValidator`, and `System.T... | null | CC BY-SA 3.0 | null | 2008-08-19T19:42:05.217 | 2016-01-15T14:54:13.207 | 2016-01-15T14:54:13.207 | 4,932,070 | 1,953 | null |
16,795 | 1 | 16,802 | null | 18 | 11,952 | PHP has a great function called [htmlspecialcharacters()](http://us2.php.net/manual/en/function.htmlspecialchars.php) where you pass it a string and it replaces all of HTML's special characters with their safe equivalents, it's a one stop shop for sanitizing input. Very nice right?
Well is there an equivalent in any ... | PHPs htmlspecialcharacters equivalent in .NET? | CC BY-SA 2.5 | 0 | 2008-08-19T19:35:30.080 | 2017-05-16T16:34:37.963 | null | null | 1,366 | [
"c#",
".net",
"php",
"asp.net"
] |
16,797 | 2 | null | 16,762 | 22 | null | I found [Factor CSS](http://zamez.org/factorcss) - complete with source code, but I think it does way more than I'd need. I really just want to combine CSS blocks that have the same selectors. I'll check out the source code and see if it can be converted to something usable as a TextMate bundle. That is, unless someone... | null | CC BY-SA 2.5 | null | 2008-08-19T19:36:44.603 | 2008-08-19T19:45:11.450 | 2008-08-19T19:45:11.450 | 2,007 | 2,007 | null |
16,804 | 1 | 297,256 | null | 38 | 7,584 | What options are there in the industry for enterprise reporting? I'm currently using SSRS 2005, and know that there is another version coming out with the new release of MSSQL.
But, it seems like it might also be a good time to investigate the market to see what else is out there.
What have you encountered? Do you ... | Enterprise Reporting Solutions | CC BY-SA 2.5 | 0 | 2008-08-19T19:38:38.640 | 2018-02-23T04:43:27.330 | null | null | 733 | [
"sql",
"reporting-services",
"reporting"
] |
16,811 | 2 | null | 16,808 | 1 | null | This is usually caused by a 'rogue' add-in.
Try disabling them all, and then re-enabling them checking for the error - so that you can narrow down the culprit.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:46:58.153 | 2008-08-19T19:46:58.153 | null | null | 770 | null |
16,813 | 2 | null | 15,774 | 1 | null | Can't you edit the Web Deployment project's MSBuild file for it to do what you want?
| null | CC BY-SA 2.5 | null | 2008-08-19T19:48:13.283 | 2008-08-19T19:48:13.283 | null | null | 1,659 | null |
16,810 | 2 | null | 16,770 | 23 | null | "Algebraic Data Types" in Haskell support , which is the more technically correct name for generics, as a simple example the list data type:
```
data List a = Cons a (List a) | Nil
```
Is equivalent (as much as is possible, and ignoring non-strict evaluation, etc) to
```
class List<a> {
class Cons : List<a> {
... | null | CC BY-SA 3.0 | null | 2008-08-19T19:46:24.647 | 2011-10-16T21:41:15.733 | 2011-10-16T21:41:15.733 | 683,710 | 784 | null |
16,815 | 1 | 16,818 | null | 1 | 1,212 | I'm trying to do a simple test php script for sessions. Basically it increments a counter (stored in `$_SESSION`) every time you refresh that page. That works, but I'm trying to have a link to destroy the session which reloads the page with the `?destroy=1` parameter. I've tried a couple of if statements to see if that... | Accessing html parameter in PHP | CC BY-SA 3.0 | null | 2008-08-19T19:49:54.577 | 2017-01-06T08:56:09.993 | 2017-01-06T08:56:09.993 | null | 1,912 | [
"php",
"session"
] |
16,824 | 2 | null | 16,804 | 2 | null | One of the most comprehensive solutions is Cognos.
Dislike: You wouldn't believe how many CDs it ships in... its huge.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:57:57.913 | 2008-08-19T20:04:08.307 | 2008-08-19T20:04:08.307 | 380 | 380 | null |
16,826 | 2 | null | 16,815 | 1 | null | Yeah, you're going to want to do
```
if( $_GET['destroy'] == 1 )
```
or
```
if( isset($_GET['destroy']) )
```
| null | CC BY-SA 2.5 | null | 2008-08-19T19:58:50.157 | 2008-08-19T19:58:50.157 | null | null | 2,016 | null |
16,818 | 2 | null | 16,815 | 7 | null | I think you put
```
$_POST['destroy']
```
Instead of
```
$_GET['destroy']
```
You need to use a form if you'd like to use a $_POST variable. $_GET variables are stored in the URL.
| null | CC BY-SA 2.5 | null | 2008-08-19T19:52:03.930 | 2008-08-19T19:52:03.930 | null | null | 428,190 | null |
16,787 | 2 | null | 16,656 | 28 | null | Added File.Exists check per comment (2012-Jun-19)
Here's what I've used in VB.NET. Essentially the same as presented, except I usually didn't want to create the folder immediately.
The advantage to use [GetRandomFilename](http://msdn.microsoft.com/en-us/library/system.io.path.getrandomfilename.aspx) is that it d... | null | CC BY-SA 3.0 | null | 2008-08-19T19:30:17.737 | 2012-06-20T04:13:54.410 | 2012-06-20T04:13:54.410 | 1,752 | 1,752 | null |
16,819 | 2 | null | 16,413 | 14 | null | After the advice here, I have devised the following function in VB which creates passable, although not always perfect (if a company name and a suite line are given, it combines the suite and city) usable data. Please feel free to comment/refactor/yell at me for breaking one of my own rules, etc.:
```
Public Function... | null | CC BY-SA 3.0 | null | 2008-08-19T19:52:34.210 | 2013-09-24T18:05:03.493 | 2013-09-24T18:05:03.493 | 1,441,014 | 149 | null |
16,816 | 2 | null | 16,557 | 0 | null | To be honest, in Java there is not really an argument against overriding . If you need to compare instances for equality, then that is what you do.
As mentioned above, you need to be aware of the contract with , and similarly, watch out for the gotchas around the [Comparable](http://java.sun.com/javase/6/docs/api/j... | null | CC BY-SA 2.5 | null | 2008-08-19T19:50:42.967 | 2008-08-19T21:12:50.773 | 2008-08-19T21:12:50.773 | 1,853 | 1,853 | null |
16,833 | 1 | 16,856 | null | 23 | 23,625 | I need to periodically download, extract and save the contents of [http://data.dot.state.mn.us/dds/det_sample.xml.gz](http://data.dot.state.mn.us/dds/det_sample.xml.gz) to disk. Anyone have experience downloading gzipped files with C#?
| How do you download and extract a gzipped file with C#? | CC BY-SA 2.5 | 0 | 2008-08-19T20:07:43.230 | 2022-01-06T09:21:17.857 | 2008-08-19T20:20:53.593 | 1,786 | 1,786 | [
"c#",
".net",
"gzip"
] |
16,832 | 1 | 16,870 | null | 18 | 6,318 | I am looking for a lightweight source control system for use on "hobby" projects with only one person (myself) working on the project. Does anyone have any suggestions? Ideally it should interface with Visual Studio either naively or through another plug-in, outside of that, anything that works would be nice to be repl... | Lightweight source control | CC BY-SA 2.5 | 0 | 2008-08-19T20:06:55.803 | 2012-03-31T11:00:25.147 | 2008-08-19T20:19:29.150 | 1,185 | 1,185 | [
"version-control"
] |
16,829 | 1 | null | null | 20 | 12,181 | I know there are at least 10 different ways to structure project in version control. I'm curious what some methods being used are and which ones work for you. I've worked with SVN, TFS, and currently/unfortunately VSS. I've seen version control implemented very poorly and just OK, but never great.
Just to get the ba... | Structure of Projects in Version Control | CC BY-SA 3.0 | 0 | 2008-08-19T20:01:30.403 | 2013-12-20T23:11:00.603 | 2013-08-21T09:20:16.967 | 1,523,648 | 2,017 | [
"svn",
"version-control",
"tfs",
"branch",
"project-structure"
] |
16,836 | 2 | null | 16,832 | 2 | null | SVN with SmartSVN or tortoiseSVN ? not really all that lightweight, but good practice for the big bad world.
| null | CC BY-SA 2.5 | null | 2008-08-19T20:09:05.893 | 2008-08-19T20:09:05.893 | null | null | 1,816 | null |
16,835 | 2 | null | 16,832 | 5 | null | Hobby or Serious project, [SVN 1-Click Setup](http://svn1clicksetup.tigris.org/) ([download Svn1ClickSetup-1.3.3.exe](http://svn1clicksetup.tigris.org/files/documents/3106/33794/Svn1ClickSetup-1.3.3.exe)) gives you all you need with ease :)
| null | CC BY-SA 2.5 | null | 2008-08-19T20:08:54.007 | 2009-04-08T12:30:06.300 | 2009-04-08T12:30:06.300 | 745 | 123 | null |
16,837 | 2 | null | 16,828 | 506 | null | You can also type command `-I` while less is running. It toggles case sensitivity for searches.
| null | CC BY-SA 3.0 | null | 2008-08-19T20:09:09.483 | 2017-12-07T11:14:00.190 | 2017-12-07T11:14:00.190 | 3,964,381 | 1,431 | null |
16,841 | 2 | null | 16,833 | 2 | null | The [GZipStream](http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx) class might be what you want.
| null | CC BY-SA 2.5 | null | 2008-08-19T20:10:44.283 | 2008-08-19T20:10:44.283 | null | null | 429 | null |
16,839 | 2 | null | 16,829 | 7 | null | Example for SVN:
trunk/
branch/
tags/
The trunk should be kept at a point where you can always push a release from it. There should be no huge gaping bugs that you know about(of course there will be eventually but that is what you should strive for).
Every time you need to make a new feature, do a design change,... | null | CC BY-SA 2.5 | null | 2008-08-19T20:09:33.367 | 2008-08-19T20:30:32.340 | 2008-08-19T20:30:32.340 | 1,797 | 1,797 | null |
16,842 | 2 | null | 16,833 | 4 | null | Just use the [HttpWebRequest](http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx) class in the System.Net namespace to request the file and download it. Then use [GZipStream](http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx) class in the System.IO.Compression namespace ... | null | CC BY-SA 2.5 | null | 2008-08-19T20:10:48.217 | 2008-08-19T20:10:48.217 | null | null | 1,117 | null |
16,830 | 2 | null | 6,778 | 0 | null | After spending some more time on this I agree with @grapefrukt. Setting wmode to transparent leads to all sorts of strange issues and in my opinion it should be avoided.
Instead I've resorted to passing the background color as a parameter. I use the following ActionScript to draw the background.
```
var parameters:O... | null | CC BY-SA 2.5 | null | 2008-08-19T20:04:30.350 | 2008-08-28T04:23:26.660 | 2008-08-28T04:23:26.660 | 247 | 247 | null |
16,840 | 2 | null | 16,443 | 7 | null | See this MSDN Forum Post: [Creating a new Table in SQL Server from ADO.net DataTable](http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/4929a0a8-0137-45f6-86e8-d11e220048c3/).
Here the poster seems to be trying to do the same thing as you, and provides code that generates a Create Table stat... | null | CC BY-SA 3.0 | null | 2008-08-19T20:09:46.937 | 2012-11-05T14:25:59.793 | 2012-11-05T14:25:59.793 | 240,733 | 51 | null |
16,838 | 2 | null | 15,496 | 432 | null | [Double Brace Initialization](http://www.c2.com/cgi/wiki?DoubleBraceInitialization) took me by surprise a few months ago when I first discovered it, never heard of it before.
[ThreadLocals](http://docs.oracle.com/javase/6/docs/api/java/lang/ThreadLocal.html) are typically not so widely known as a way to store per-thre... | null | CC BY-SA 3.0 | null | 2008-08-19T20:09:17.063 | 2012-05-10T11:47:01.060 | 2012-05-10T11:47:01.060 | 587,642 | 1,996 | null |
16,844 | 2 | null | 16,832 | 8 | null | [Git](http://git.or.cz) is very lightweight and is just as suitable for personal projects as it is for huge projects like the Linux kernel. There is lots of tutorial documentation available on its web site that will get you started. Example:
```
git init
git add .
git commit -m "my first commit!"
```
If you are keen... | null | CC BY-SA 2.5 | null | 2008-08-19T20:10:54.800 | 2008-08-19T20:23:11.747 | 2008-08-19T20:23:11.747 | 893 | 893 | null |
16,850 | 2 | null | 16,832 | 2 | null | Pick your flavour of distributed version control. I like Mercurial, other folks swear by Git and Bazaar. There's no need to make a fake server to put a directory under version control, which, IMO, makes it very ideal for small projects.
I'm not sure if any of these have Visual Studio plugins, though.
| null | CC BY-SA 2.5 | null | 2008-08-19T20:12:46.340 | 2008-08-19T20:12:46.340 | null | null | 1,914 | null |
16,845 | 2 | null | 16,804 | 1 | null | Crystal Reports by [Business Objects](http://businessobjects.com) seems to be a popular choice.
I never wrote any reports in it myself, but others in my team who did sometimes struggled getting the more complex reports to work.
It also might be a bit pricey, depending on your budget.
| null | CC BY-SA 2.5 | null | 2008-08-19T20:11:22.660 | 2008-08-19T22:22:24.880 | 2008-08-19T22:22:24.880 | 1,817 | 1,817 | null |
16,851 | 2 | null | 14,617 | 24 | null | A nice abstraction on top of Jsch is Apache [commons-vfs](http://commons.apache.org/vfs/) which offers a virtual filesystem API that makes accessing and writing SFTP files almost transparent. Worked well for us.
| null | CC BY-SA 2.5 | null | 2008-08-19T20:12:51.783 | 2008-08-19T20:12:51.783 | null | null | 1,996 | null |
16,843 | 2 | null | 16,832 | 18 | null | I use [VisualSVN Server](http://www.visualsvn.com/server) (free) and [Tortoise SVN](http://tortoisesvn.tigris.org) (free) for school, work, hobbies, everything. If you want Visual Studio integration, you can use [Visual SVN](http://www.visualsvn.com/visualsvn) ($49) or [AnkhSVN](http://ankhsvn.open.collab.net) (free).
| null | CC BY-SA 2.5 | null | 2008-08-19T20:10:51.070 | 2008-08-19T20:10:51.070 | null | null | 317 | null |
16,852 | 2 | null | 16,833 | 7 | null | You can use WebClient in System.Net to download:
```
WebClient Client = new WebClient ();
Client.DownloadFile("http://data.dot.state.mn.us/dds/det_sample.xml.gz", " C:\mygzipfile.gz");
```
then use [#ziplib](http://sharpdevelop.net/OpenSource/SharpZipLib/Default.aspx) to extract
Edit: or GZipStream... forgot about ... | null | CC BY-SA 2.5 | null | 2008-08-19T20:13:06.260 | 2008-08-19T20:13:06.260 | null | null | 194 | null |
16,828 | 1 | 16,837 | null | 346 | 94,170 | It seems like the only way to do this is to pass the -i parameter in when you initially run less. Does anyone know of some secret hack to make something like this work
```
/something to search for/i
```
| How do you do a case insensitive search using a pattern modifier using less? | CC BY-SA 3.0 | 0 | 2008-08-19T20:00:33.900 | 2018-10-31T23:39:38.257 | 2017-05-03T11:05:21.067 | 1,983,854 | 1,797 | [
"unix",
"search",
"case-insensitive",
"less-unix"
] |
16,853 | 2 | null | 16,833 | 5 | null | Try the [SharpZipLib](http://www.icsharpcode.net/OpenSource/SharpZipLib/), a C# based library for compressing and uncompressing files using gzip/zip.
Sample usage can be found on this [blog post](http://dotnet.org.za/thea/archive/2006/01/17/Unzip-files-programmatically-in-C_2300_-_2D00_-_2300_ZipLib.aspx):
```
using ... | null | CC BY-SA 3.0 | null | 2008-08-19T20:14:36.243 | 2011-08-15T21:21:03.157 | 2011-08-15T21:21:03.157 | 95 | 51 | null |
16,855 | 2 | null | 8,398 | 0 | null | Yeah using is a an option if you have Office XP or Office 2003 installed. In IE uncheck Disable Script debugging (Internet Explorer) and Disable Script debugging (Other).
Restart IE. In View menu you will have a new item, "script debugging", choose open. You will be given a choice of VS2005 or New instance of Microso... | null | CC BY-SA 3.0 | null | 2008-08-19T20:14:47.630 | 2012-11-02T17:00:55.327 | 2012-11-02T17:00:55.327 | 1,116 | 1,116 | null |
16,860 | 1 | 16,894 | null | 25 | 6,459 | > Unit testing is, roughly speaking, testing bits of your code in isolation with test code. The immediate advantages that come to mind are:- - [Rytmis](https://stackoverflow.com/questions/1383/what-is-unit-testing)
My question is, what are the current "best practices" in terms of tools as well as when and where to use ... | Getting Started with Unit Testing | CC BY-SA 2.5 | 0 | 2008-08-19T20:18:09.993 | 2012-07-20T11:39:41.103 | 2020-06-20T09:12:55.060 | -1 | 149 | [
"unit-testing"
] |
16,856 | 2 | null | 16,833 | 29 | null | To compress:
```
using (FileStream fStream = new FileStream(@"C:\test.docx.gzip",
FileMode.Create, FileAccess.Write)) {
using (GZipStream zipStream = new GZipStream(fStream,
CompressionMode.Compress)) {
byte[] inputfile = File.ReadAllBytes(@"c:\test.docx");
zipStream.Write(inputfile, 0, input... | null | CC BY-SA 3.0 | null | 2008-08-19T20:15:07.007 | 2017-04-20T07:32:20.813 | 2017-04-20T07:32:20.813 | 4,380,409 | 581 | null |
16,868 | 2 | null | 16,832 | 4 | null | TortoiseSVN works great. You don't even need a Subversion server, you can create a local repository through the tool. Since it integrates right into Windows Explorer, it makes it easy to work with in a variety of scenarios. You also then have the option to work with remote Subversion servers or Team Foundation Serve... | null | CC BY-SA 2.5 | null | 2008-08-19T20:22:25.803 | 2008-08-19T20:22:25.803 | null | null | 1,233 | null |
16,857 | 2 | null | 16,689 | 9 | null | Kyle has the right approach in asking about the interaction. There is no "correct" answer without knowing what the usage patterns are likely to be.
Any architectural decision -- especially at this level -- is a trade-off.
You must ask yourself:
- - - - - -
Until you have an understanding of the answers, or potent... | null | CC BY-SA 2.5 | null | 2008-08-19T20:16:50.030 | 2008-08-19T20:16:50.030 | null | null | 1,820 | null |
16,861 | 1 | null | null | 63 | 49,046 | What is the best way to sanitize user input for a Python-based web application? Is there a single function to remove HTML characters and any other necessary characters combinations to prevent an [XSS](http://en.wikipedia.org/wiki/Cross-site_scripting) or SQL injection attack?
| Sanitising user input using Python | CC BY-SA 3.0 | 0 | 2008-08-19T20:18:31.740 | 2017-07-11T01:42:17.960 | 2017-07-11T01:42:17.960 | 7,750,640 | 2,019 | [
"python",
"xss"
] |
16,867 | 2 | null | 16,832 | 2 | null | If you have access to SQL Server, then SourceGear's Vault is free for a single user. If you want to go even further, Axosoft's OnTime issue tracking is also free for single user use. I use both at home (for free) and we also use both (licensed) at our company. Both integrate into Visual Studio, and OnTime also suppo... | null | CC BY-SA 2.5 | null | 2008-08-19T20:21:23.623 | 2008-08-19T20:21:23.623 | null | null | 1,616 | null |
16,871 | 2 | null | 16,832 | 3 | null | I prefer distributed version control for personal projects, because they eliminate the need for a server. is the one I try to use most of the time, but I've been hearing good things about as well.
| null | CC BY-SA 2.5 | null | 2008-08-19T20:23:11.560 | 2008-08-19T20:23:11.560 | null | null | 2,018 | null |
16,873 | 1 | 16,903 | null | 15 | 2,202 | Do you have any advice/rules on selecting a multiplier to use in a (multiplicative) hash function. The function is computing the hash value of a string.
| Choosing a multiplier for a (string) hash function | CC BY-SA 2.5 | 0 | 2008-08-19T20:23:25.723 | 2013-01-23T04:55:14.290 | null | null | 381 | [
"performance",
"algorithm"
] |
16,866 | 2 | null | 6,414 | 106 | null | causes the program counter to jump out of the scope of the innermost loop
```
for(i = 0; i < 10; i++)
{
if(i == 2)
break;
}
```
Works like this
```
for(i = 0; i < 10; i++)
{
if(i == 2)
goto BREAK;
}
BREAK:;
```
jumps to the end of the loop. In a for loop, continue jumps to the increment... | null | CC BY-SA 2.5 | null | 2008-08-19T20:21:17.633 | 2008-08-19T20:21:17.633 | null | null | 1,994 | null |
16,877 | 2 | null | 16,832 | 3 | null | I can't comment on other source control software but after using VSS 6.0 , StarTeam, Vault and SVN I cannot rate SVN + Tortoise more highly. AnkhSVN is a free plug-in for Visual studio which I personally didn't warm to. Apparently Visual SVN is much better but costs money.
| null | CC BY-SA 2.5 | null | 2008-08-19T20:25:17.173 | 2008-08-19T20:25:17.173 | null | null | 1,116 | null |
16,825 | 2 | null | 16,770 | 0 | null | For me, the concept of Haskell's algebraic data types always looked like polymorphism in OO-languages like C#.
Look at the example from [http://en.wikipedia.org/wiki/Algebraic_data_types](http://en.wikipedia.org/wiki/Algebraic_data_types):
```
data Tree = Empty
| Leaf Int
| Node Tree Tree
```
... | null | CC BY-SA 2.5 | null | 2008-08-19T19:58:06.400 | 2008-08-19T19:58:06.400 | null | null | 1,810 | null |
16,876 | 2 | null | 16,829 | 1 | null | I think the SCM policies and procedures a team adopts are going to be very dependent on the development process they are using. If you've got a team of 50 with several people working on major changes simultaneously and releases only occurring every 6 months, it makes a lot of sense for everyone to have his own branch ... | null | CC BY-SA 2.5 | null | 2008-08-19T20:24:52.460 | 2008-08-19T20:24:52.460 | null | null | 1,247 | null |
16,880 | 2 | null | 16,860 | 1 | null | The xUnit family are the mainstay of unit testing. They are integrated into the likes of Netbeans, Eclipse and many other IDEs. They offer a simple, structured solution to unit testing.
One thing I always try and do when writing a test is to minimise external code usage. By that I mean: I try to minimise the setup and... | null | CC BY-SA 2.5 | null | 2008-08-19T20:27:34.670 | 2008-08-19T20:27:34.670 | null | null | 2,019 | null |
16,874 | 2 | null | 16,832 | 2 | null | I use [Perforce](http://www.perforce.com) at work and at home for hobby projects. It is easy enough to set up, and allows two users and five workspaces without having to pay for a license. Also has a Visual Studio integration plugin.
| null | CC BY-SA 2.5 | null | 2008-08-19T20:23:33.447 | 2008-08-19T20:23:33.447 | null | null | 41 | null |