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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
31,428 | 2 | null | 31,424 | 0 | null | Restriction.In definately creates a subquery with whatever criteria you pass to the .In() method, but not sure what InG() does. never seen it.
| null | CC BY-SA 2.5 | null | 2008-08-28T00:34:53.590 | 2008-08-28T00:34:53.590 | null | null | 2,993 | null |
31,427 | 2 | null | 31,410 | 4 | null | I saw this functionality in older versions of VS.Net (2003 I think). It may still exist in current versions, but I haven't encountered it. Seems that files with the same name, even in different directories confuse VS.Net, and it ends up setting a break point in a file with the same name. May only happen if the class... | null | CC BY-SA 2.5 | null | 2008-08-28T00:34:39.363 | 2008-08-28T00:34:39.363 | null | null | 1,862 | null |
31,434 | 2 | null | 30,903 | 1 | null | > hg: unknown command 'view'
(Maybe I need to install something - but it's not native, nonetheless).
There is one "native" application out there, but it's not especially user-friendly. In fact, I'd go as far as saying that it's harder to use than the command line.
There was some talk a year or so ago about a versio... | null | CC BY-SA 2.5 | null | 2008-08-28T00:38:32.707 | 2008-08-28T00:38:32.707 | null | null | 188 | null |
31,436 | 2 | null | 8,952 | 3 | null | While performance is an issue, I think modern database designs have made it much less of an issue for small files.
Performance aside, it also depends on just how tightly-coupled the data is. If the file contains data that is closely related to the fields of the database, then it conceptually belongs close to it and ma... | null | CC BY-SA 2.5 | null | 2008-08-28T00:39:55.137 | 2008-08-28T00:39:55.137 | null | null | 1,000 | null |
31,438 | 2 | null | 1,711 | 6 | null | Mr. Bunny's Guide To ActiveX
| null | CC BY-SA 2.5 | null | 2008-08-28T00:41:34.587 | 2010-01-30T00:26:21.550 | 2010-01-30T00:26:21.550 | 11,635 | 3,333 | null |
31,440 | 2 | null | 31,408 | 2 | null | Maybe you're looking for something like [Kigg - Building a Digg Clone with ASP.NET MVC](http://dotnetslackers.com/articles/aspnet/KiggBuildingADiggCloneWithASPNETMVC1.aspx).
Or maybe Jeff and the team are willing to provide you the souce code for SO... :P
| null | CC BY-SA 2.5 | null | 2008-08-28T00:43:11.747 | 2008-08-28T00:43:11.747 | null | null | 2,841 | null |
31,324 | 1 | 31,418 | null | 13 | 24,255 | I am reading in CSV file and translating it to an SQL Table. The kicker is that one of the columns in the table is of data type ID that needs to be set to a constant (in this case 2). I am not sure how to do this.
| How do I add a constant column value during data transfer from CSV to SQL? | CC BY-SA 3.0 | null | 2008-08-27T23:33:35.813 | 2011-07-28T13:19:26.703 | 2011-07-28T13:19:26.703 | null | 2,894 | [
"sql-server",
"ssis",
"csv"
] |
31,446 | 1 | 33,041 | null | 60 | 78,047 | What would be the easiest way to detach a specific JPA Entity Bean that was acquired through an EntityManager. Alternatively, could I have a query return detached objects in the first place so they would essentially act as 'read only'?
The reason why I want to do this is becuase I want to modify the data within the be... | Detach an entity from JPA/EJB3 persistence context | CC BY-SA 2.5 | 0 | 2008-08-28T00:53:21.860 | 2021-07-08T05:48:35.833 | 2010-09-01T21:42:21.030 | 70,604 | 506 | [
"java",
"orm",
"jpa"
] |
31,437 | 2 | null | 31,221 | 76 | null | > I think you need to drop the "~/" and replace it with just "/", I believe / is the root
:-) unless you want to hardcode your web app so that it can only be installed at the root of a web site.
"~/" the correct thing to use, but the reason that your original code didn't work as expected is that `ResolveUrl` (whic... | null | CC BY-SA 3.0 | null | 2008-08-28T00:40:27.633 | 2011-12-19T20:00:52.903 | 2011-12-19T20:00:52.903 | 1,278 | 1,278 | null |
31,451 | 2 | null | 31,408 | 6 | null | [Rob Conery's MVC Storefront project](http://blog.wekeroad.com/mvc-storefront/) is a good from-the-ground-up step-by-step series on how to put up an ASP.NET MVC site.
| null | CC BY-SA 2.5 | null | 2008-08-28T01:06:29.020 | 2008-08-28T01:06:29.020 | null | null | 372 | null |
31,448 | 2 | null | 31,312 | 0 | null | Can you provide a code sample?
More likely than not you'll just need to escape your HTML entities using [encodeuri](http://www.w3schools.com/jsref/jsref_encodeURI.asp) or something like that.
| null | CC BY-SA 2.5 | null | 2008-08-28T01:00:24.543 | 2008-08-28T01:00:24.543 | null | null | 234 | null |
31,447 | 2 | null | 31,408 | 2 | null | What about the [MVC Membership application](http://www.squaredroot.com/post/2008/04/MVC-Membership-Starter-Kit.aspx) that Troy Goode wrote. I'm not sure what Preview he wrote it in but it could be worth a look.
Also, if you want to go right from the beginning, scott gu has a [great series of posts on MVC](http://weblo... | null | CC BY-SA 2.5 | null | 2008-08-28T00:55:05.943 | 2008-08-28T01:01:03.027 | 2008-08-28T01:01:03.027 | 493 | 493 | null |
31,425 | 2 | null | 29,856 | 0 | null | The short answer is because I can. The long answer, expanding on what the OP said, is to be more compatible with apache and mysql/postgresql. They are all 64bit (apache is a fat binary with ppc, ppc64 x86 and x86 and x86_64, the others just straight 64bit). Yes I could run them all in 32bit (and have in the past) but ... | null | CC BY-SA 2.5 | null | 2008-08-28T00:33:52.297 | 2008-08-28T00:33:52.297 | null | null | 3,431,280 | null |
31,452 | 2 | null | 31,408 | 11 | null | [CodeCampServer](http://code.google.com/p/codecampserver/) - Built with ASP.NET MVC, pretty light and small project. No cruft at all.
@lomaxx - Just FYI, most of what Troy Goode wrote is now part of [ASP.NET MVC as of Preview 4](http://weblogs.asp.net/scottgu/archive/2008/07/14/asp-net-mvc-preview-4-release-part-1.as... | null | CC BY-SA 2.5 | null | 2008-08-28T01:07:02.703 | 2008-08-28T01:07:02.703 | null | null | 1,117 | null |
31,458 | 2 | null | 20,207 | 0 | null | If it works without a hitch then you don't need .NET 3.5 Framework for now. Installing .NET 3.5 Framework is easy enough to do along with later versions of your software .
| null | CC BY-SA 2.5 | null | 2008-08-28T01:13:55.603 | 2008-08-28T01:13:55.603 | null | null | 372 | null |
31,460 | 2 | null | 31,410 | 0 | null | Kibbee, you were right! It was two files with the same name in different folders. I was setting the breakpoint in the correct file on line 58 - it was putting the breakpoint on the other file at line 58. I was finally able to set a breakpoint by using the "Debug-->New Breakpoint-->Break at Function Name" menu option... | null | CC BY-SA 2.5 | null | 2008-08-28T01:19:13.733 | 2008-08-28T01:19:13.733 | null | null | 3,331 | null |
31,454 | 2 | null | 31,346 | 2 | null | Yeah - In a way you're both asking and answering the question yourself... But that is one of the two options I can think of. The reasons that might be a problem is that you lose some of the features/control you get from the MediaElement control. Another option is to do this:
1. Add your MediaElement to your page.
2. ... | null | CC BY-SA 3.0 | null | 2008-08-28T01:09:58.077 | 2015-12-03T19:44:35.517 | 2015-12-03T19:44:35.517 | 3,393,505 | 1,199,387 | null |
31,462 | 1 | 31,463 | null | 33 | 72,648 | Without the use of any external library, what is the simplest way to fetch a website's HTML content into a String?
| How to fetch HTML in Java | CC BY-SA 2.5 | 0 | 2008-08-28T01:20:18.100 | 2018-12-29T11:17:20.550 | 2008-08-28T09:07:05.620 | 2,084 | 2,644 | [
"java",
"html",
"screen-scraping"
] |
31,463 | 2 | null | 31,462 | 45 | null | I'm currently using this:
```
String content = null;
URLConnection connection = null;
try {
connection = new URL("http://www.google.com").openConnection();
Scanner scanner = new Scanner(connection.getInputStream());
scanner.useDelimiter("\\Z");
content = scanner.next();
scanner.close();
}catch ( Exception e... | null | CC BY-SA 4.0 | null | 2008-08-28T01:21:00.797 | 2018-12-29T11:17:20.550 | 2018-12-29T11:17:20.550 | -1 | 2,644 | null |
31,432 | 2 | null | 31,415 | 10 | null | Depends on how sophisticated of an Http request you need to build (authentication, etc). Here's one simple way I've seen used in the past.
```
StringBuilder html = new StringBuilder();
java.net.URL url = new URL("http://www.google.com/");
BufferedReader input = null;
try {
input new BufferedReader(
new In... | null | CC BY-SA 2.5 | null | 2008-08-28T00:38:16.360 | 2008-08-28T01:23:33.443 | 2008-08-28T01:23:33.443 | 2,146 | 2,146 | null |
31,466 | 1 | 31,470 | null | 6 | 10,200 | We just added an autoupdater in our software and got some bug report saying
that the autoupdate wouldn't complete properly because the downloaded file's sha1 checksum wasn't matching. We're hosted on Amazon S3...
That's either something wrong with my code or something wrong with S3.
I reread my code for suspicious st... | Does Amazon S3 download fail sometimes? | CC BY-SA 3.0 | 0 | 2008-08-28T01:25:52.313 | 2016-12-29T12:38:55.330 | 2016-12-29T12:38:55.330 | 1,874,627 | 446,497 | [
"download",
"amazon-s3"
] |
31,468 | 2 | null | 31,285 | 2 | null | This error ofter occurs because incompatibility of VMWare Tools Version and recent Kernels (You can test it using older Kernels). Sometimes you can fix some thing with patches all over the internet, but I prefer to downgrade my kernel or don't using latest distribution's version in VMWare. It can be really annoying. An... | null | CC BY-SA 2.5 | null | 2008-08-28T01:27:18.923 | 2008-08-28T01:27:18.923 | null | null | 2,274 | null |
31,465 | 1 | 31,486 | null | 11 | 4,270 | When you get a badge or aren't logged in to stack overflow there's a groovy little notification bar at the top of the page that lets you know there's something going on.
I know the SOflow team use JQuery, but I was wondering if anyone knew of an implementation of the same style of notification system in asp.net AJAX.
... | Stackoverflow Style Notifications in asp.net Ajax | CC BY-SA 2.5 | 0 | 2008-08-28T01:24:10.697 | 2010-06-25T12:14:57.260 | 2008-11-16T09:54:55.177 | 21,755 | 493 | [
"asp.net",
"asp.net-ajax",
"notification-bar"
] |
31,459 | 2 | null | 30,752 | 2 | null | So there are two levels of "work with Boo". One would be all the code (namely, the Controllers), and the other would be the views.
For the code, I assume Boo compiles to standard .NET assemblies, so simply properly following the naming conventions using by ASP.NET MVC should allow you to write Controllers. You will pr... | null | CC BY-SA 2.5 | null | 2008-08-28T01:15:06.130 | 2008-08-28T01:15:06.130 | null | null | 1,554 | null |
31,470 | 2 | null | 31,466 | 4 | null | Other than the downtime a few weeks ago. None that I heard of.
They did a good job considering the one time it was down was because of an obscure server error that cascaded throughout the cloud. They was very open about it and resolve it as soon as they found out.(it happened during a weekend, iirc)
So they are pretty... | null | CC BY-SA 2.5 | null | 2008-08-28T01:29:30.650 | 2008-08-28T01:29:30.650 | null | null | 2,976 | null |
31,471 | 2 | null | 31,462 | 2 | null | I just left [this post in your other thread](https://stackoverflow.com/questions/31415/quick-way-to-find-a-value-in-html-java), though what you have above might work as well. I don't think either would be any easier than the other. The Apache packages can be accessed by just using `import org.apache.commons.HttpClien... | null | CC BY-SA 2.5 | null | 2008-08-28T01:31:53.187 | 2008-08-28T01:31:53.187 | 2017-05-23T12:18:27.453 | -1 | 271 | null |
31,472 | 2 | null | 9,472 | 0 | null | I was using the basicHttp binding but the problem was actually with the XMLSerializer. It doesn't properly recognize the wsdl generated by WCF (even with basicHttp bindings) for anything other than basic value types.
We got around this by added the reference to the 3.0 dll's and using the datacontract serializer.
| null | CC BY-SA 2.5 | null | 2008-08-28T01:32:25.277 | 2008-08-28T01:32:25.277 | null | null | 493 | null |
31,475 | 2 | null | 31,466 | 1 | null | I agree, quad-checking your code would be a good idea. I'm not saying that it can't happen, but I don't believe that I have ever seen it, and I've used S3 a pretty good bit now. I have, however, mismanaged exceptions/connection breaks a few times and ended up with pieces that didn't match what I was expecting.
I wou... | null | CC BY-SA 2.5 | null | 2008-08-28T01:32:48.333 | 2008-08-28T01:32:48.333 | null | null | 1,432 | null |
31,474 | 2 | null | 31,059 | 5 | null | I assume you're on Vista using VS2008? In that case I think that the [FOS_PICKFOLDERS option](http://msdn.microsoft.com/en-us/library/bb761832.aspx) is being used when calling the Vista file dialog [IFileDialog](http://msdn.microsoft.com/en-us/library/bb775966.aspx). I'm afraid that in .NET code this would involve plen... | null | CC BY-SA 2.5 | null | 2008-08-28T01:32:43.280 | 2008-08-28T01:32:43.280 | null | null | 1,278 | null |
31,469 | 2 | null | 31,303 | 1 | null | This is a topic that I was just talking about at work. Mainly the problem is that unless database migrations is handled for you nicely by your framework, eg rails and their migration scripts, then it is left up to you.
The current way that we do it has apparent flaws, and I am open to other suggestions.
1. Have a ... | null | CC BY-SA 2.5 | null | 2008-08-28T01:29:11.930 | 2008-08-28T01:29:11.930 | null | null | 1,797 | null |
31,477 | 2 | null | 30,752 | 1 | null | The Brail view engine has been implemented to be used in ASP.NET MVC. The [MvcContrib](http://www.mvccontrib.org) project implemented the code. The [source code](http://code.google.com/p/mvccontrib/) is located on Google Code.
As far as the controllers, I really am not sure. I am not that familiar with Boo. I know... | null | CC BY-SA 2.5 | null | 2008-08-28T01:37:08.403 | 2008-08-28T01:37:08.403 | null | null | 1,117 | null |
31,480 | 1 | 31,485 | null | 6 | 576 | How stable is WPF not in terms of stability of a WPF program, but in terms of the 'stability' of the API itself.
Let me explain:
Microsoft is notorious for changing its whole methodology around with new technology. Like with the move from silverlight 1 to silverlight 2. With WPF, I know that MS changed a bunch of... | How stable is WPF? | CC BY-SA 3.0 | null | 2008-08-28T01:38:47.073 | 2015-11-20T11:37:33.767 | 2015-11-20T11:37:33.767 | 3,218,692 | 2,976 | [
".net",
"wpf"
] |
31,467 | 2 | null | 31,415 | 0 | null | I haven't tried this, but wouldn't the basic framework be
1. Open a java.net.HttpURLConnection
2. Get an input stream using getInputStream
3. Use the regular expression in Mike's answer to parse out the bit you want
| null | CC BY-SA 4.0 | null | 2008-08-28T01:26:26.227 | 2018-12-20T12:57:17.430 | 2018-12-20T12:57:17.430 | 1,997,093 | 3,333 | null |
31,478 | 2 | null | 29,370 | 0 | null | I uninstalled the previous 32bit version, reinstalled as 64bit, and now I get a completely different error. Its mentioned as requiring FP2 to fix, but since I'm using Express-C, I can't install the fixpack (IBM doesn't provide fixpacks for free DB2 products). Anyway, thanks for the help. At least I can come closer t... | null | CC BY-SA 2.5 | null | 2008-08-28T01:37:50.053 | 2008-08-28T01:37:50.053 | null | null | 1,432 | null |
31,485 | 2 | null | 31,480 | 12 | null | MS do have a history of "fire and movement" with regards to introducing new technology into their development stack, but they also have a strong history of maintaining support for the older stuff, and backwards-compatibility. WPF seems to be getting stuff added to it with each new release of the framework but the thing... | null | CC BY-SA 2.5 | null | 2008-08-28T01:42:15.457 | 2008-08-28T01:42:15.457 | null | null | 615 | null |
31,486 | 2 | null | 31,465 | 8 | null | I like it to.
div tag with a fade.
[http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Walkthrough/UsingAnimations.aspx](http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Walkthrough/UsingAnimations.aspx)
| null | CC BY-SA 2.5 | null | 2008-08-28T01:42:26.813 | 2008-08-28T01:42:26.813 | null | null | 1,293 | null |
31,481 | 2 | null | 31,303 | 5 | null | I have a lot of experience with this. My application is highly iterative, and schema changes happen frequently. I do a production release roughly every 2 to 3 weeks, with 50-100 items cleared from my FogBugz list for each one. Every release we've done over the last few years has required schema changes to support ne... | null | CC BY-SA 2.5 | null | 2008-08-28T01:39:40.673 | 2008-08-28T01:39:40.673 | null | null | 1,219 | null |
31,489 | 2 | null | 31,446 | 3 | null | As far as I know, the only direct ways to do it are:
1. Commit the txn - Probably not a reasonable option
2. Clear the Persistence Context - EntityManager.clear() - This is brutal, but would clear it out
3. Copy the object - Most of the time your JPA objects are serializable, so this should be easy (if not particular... | null | CC BY-SA 2.5 | null | 2008-08-28T01:45:09.240 | 2008-08-28T01:45:09.240 | null | null | 1,432 | null |
31,492 | 2 | null | 20,207 | 1 | null | Uising Reflector you can see that Microsoft.ReportViewer.Common.dll has a dependency on "Microsoft.Build.Framework, Version=3.5.0.0" and "Microsoft.Build.Utilities.v3.5, Version=3.5.0.0". So strictly speaking it does have a 3.5 requirement. But if the reporting functionality you use never executes the code that uses/lo... | null | CC BY-SA 2.5 | null | 2008-08-28T01:49:14.097 | 2008-08-28T01:49:14.097 | null | null | 1,278 | null |
31,491 | 2 | null | 31,480 | 3 | null | We've been using WPF since it was first released and yes it had it's problems at the beginning that caused us headaches and had us scratching our heads to find a work around, but each new update the stack has actually become pretty stable.
It definitely became easier and easier to develop with it with the addition of ... | null | CC BY-SA 2.5 | null | 2008-08-28T01:49:02.727 | 2008-08-28T01:49:02.727 | null | null | 1,117 | null |
31,493 | 2 | null | 31,238 | 1 | null | I recently did something very similar, I used an abstract factory. In fact, you can see the basic concept here:
[Abstract Factory Design Pattern](https://stackoverflow.com/questions/27294/abstract-factory-design-pattern)
| null | CC BY-SA 2.5 | null | 2008-08-28T01:53:51.543 | 2008-08-28T01:53:51.543 | 2017-05-23T10:32:50.377 | -1 | 1,965 | null |
31,490 | 2 | null | 7,851 | 2 | null | For example the webserver username and group is ,
if you set your to check UID, the php process will only have access to any file owned by the user . So if you have another webserver running on your system,for example tomcat with the username and group of , any files created by the tomcat process won't be accessible b... | null | CC BY-SA 2.5 | null | 2008-08-28T01:46:35.883 | 2008-08-28T01:46:35.883 | null | null | 2,976 | null |
31,494 | 1 | null | null | 15 | 14,224 | I have got a simple contacts database but I'm having problems with users entering in duplicate data. I have implemented a simple data comparison but unfortunately the duplicated data that is being entered is not exactly the same. For example, names are incorrectly spelled or one person will put in 'Bill Smith' and anot... | How to detect duplicate data? | CC BY-SA 2.5 | 0 | 2008-08-28T01:54:18.500 | 2019-07-27T05:13:38.453 | 2008-08-28T03:34:36.233 | 35 | 486 | [
"algorithm",
"language-agnostic",
"duplicate-data"
] |
31,495 | 2 | null | 1,453 | 1 | null | You can use a static class member to hold the default:
```
class Shipment
{
public static $DefaultWeight = '0';
public function createShipment($startZip,$endZip,$weight=Shipment::DefaultWeight) {
// your function
}
}
```
| null | CC BY-SA 3.0 | null | 2008-08-28T01:56:13.800 | 2016-04-28T15:05:59.357 | 2016-04-28T15:05:59.357 | 4,850,040 | 2,976 | null |
31,496 | 1 | 31,505 | null | 12 | 10,980 | I would like to enable/disable some code based on a custom solution configuration I added in Visual Studio. How do I check this value at runtime?
| How do I check the active solution configuration Visual Studio built with at runtime? | CC BY-SA 2.5 | null | 2008-08-28T01:56:34.377 | 2012-05-03T19:34:39.270 | 2012-05-03T19:34:39.270 | 352,841 | 327 | [
"visual-studio"
] |
31,464 | 2 | null | 31,415 | 0 | null | You may want to check the documentation for Apache's org.apache.commons.HttpClient package and the related packages [here](http://hc.apache.org/httpclient-3.x/apidocs/index.html). Sending an HTTP request from a Java application is pretty easy to do. Poking through the documentation should get you off in the right dir... | null | CC BY-SA 2.5 | null | 2008-08-28T01:22:32.027 | 2008-08-28T01:22:32.027 | null | null | 271 | null |
31,499 | 2 | null | 30,653 | 0 | null | Why can't you load the .net runtime into you process space? It is possible to host the .net runtime and call into .net using COM.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:00:07.007 | 2008-08-28T02:00:07.007 | null | null | 645 | null |
31,501 | 2 | null | 31,494 | 3 | null | While I do not have an algorithm for you, my first action would be to take a look at the process involved in entering a new contact. Perhaps users do not have an easy way to find the contact they are looking for. Much like on Stack Overflow's new question form, you could suggest contacts that already exist on the new c... | null | CC BY-SA 2.5 | null | 2008-08-28T02:00:13.260 | 2008-08-28T02:00:13.260 | null | null | 3,149 | null |
31,497 | 1 | 31,522 | null | 111 | 48,795 | What are some real world places that call for delegates? I'm curious what situations or patterns are present where this method is the best solution. No code required.
| Where do I use delegates? | CC BY-SA 2.5 | 0 | 2008-08-28T01:58:53.810 | 2013-08-09T13:34:35.970 | 2013-08-09T13:34:35.970 | null | 1,635 | [
"oop",
"design-patterns",
"delegates"
] |
31,500 | 1 | 31,520 | null | 62 | 35,378 | If I have a query like:
```
Select EmployeeId
From Employee
Where EmployeeTypeId IN (1,2,3)
```
and I have an index on the `EmployeeTypeId` field, does SQL server still use that index?
| Do indexes work with "IN" clause | CC BY-SA 3.0 | 0 | 2008-08-28T02:00:09.970 | 2020-02-13T07:45:30.517 | 2013-11-14T17:20:14.280 | 111,266 | 493 | [
"sql",
"indexing"
] |
31,502 | 2 | null | 31,497 | 13 | null | Binding Events to Event Handlers is usually your first introduction to delegates...You might not even know you were using them because the delegate is wrapped up in the EventHandler class.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:00:18.393 | 2008-08-28T02:00:18.393 | null | null | 1,965 | null |
31,503 | 2 | null | 31,496 | 0 | null | I'm not sure if you can figure out the exact name of the build configuration. Howerver, if you use Debug.Assert(...), that code will only be run when you compile in debug mode. Not sure it that helps you at all.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:00:25.193 | 2008-08-28T02:00:25.193 | null | null | 1,862 | null |
31,504 | 2 | null | 31,500 | 9 | null | Usually it would, unless the IN clause covers too much of the table, and then it will do a table scan. Best way to find out in your specific case would be to run it in the query analyzer, and check out the execution plan.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:02:01.353 | 2008-08-28T02:02:01.353 | null | null | 1,862 | null |
31,507 | 2 | null | 31,496 | 7 | null | add a const value assign to a value that designate the configuration you are in.
like
```
#ifdef _ENABLE_CODE1_
const codeconfig = 1;
#else
const codeconfig = 2;
#endif
```
and add _ENABLE_CODE1_ in your configuration preprocessor.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:03:25.937 | 2008-08-28T02:03:25.937 | null | null | 2,566 | null |
31,508 | 2 | null | 31,497 | 1 | null | A quick google search came up with this [http://en.wikipedia.org/wiki/Delegation_pattern](http://en.wikipedia.org/wiki/Delegation_pattern) . Basically, anytime that you use an object that forwards it's calls to another object then you are delegating.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:03:27.153 | 2008-08-28T02:03:27.153 | null | null | 1,353 | null |
31,202 | 2 | null | 31,090 | 2 | null | Here's my split button implementation. It does not draw the arrow, and the focus/unfocus behavior is a little different.
Both mine and the originals handle visual styles and look great with Aero.
[http://wyday.com/splitbutton/](http://wyday.com/splitbutton/)
```
using System;
using System.Collections.Generic;
using... | null | CC BY-SA 3.0 | null | 2008-08-27T20:36:18.297 | 2014-10-28T20:25:37.587 | 2014-10-28T20:25:37.587 | 492 | 1,490 | null |
31,366 | 1 | 31,725 | null | 4 | 12,181 | I am performing a find and replace on the line feed character (` `) and replacing it with the paragraph close and paragraph open tags using the following code:
```
<xsl:template match="/STORIES/STORY">
<component>
<xsl:if test="boolean(ARTICLEBODY)">
<p>
<xsl:call-templat... | Find and Replace with Unique | CC BY-SA 3.0 | 0 | 2008-08-27T23:55:28.600 | 2014-03-21T16:06:44.737 | 2014-03-21T16:06:44.737 | 1,987,598 | 274 | [
"xml",
"xslt"
] |
31,512 | 2 | null | 31,498 | 14 | null | ```
if (typeof(T).IsValueType || typeof(T) == typeof(String))
{
return default(T);
}
else
{
return Activator.CreateInstance<T>();
}
```
Untested, but the first thing that came to mind.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:06:30.000 | 2010-05-29T00:33:17.690 | 2010-05-29T00:33:17.690 | 67 | 1,965 | null |
31,510 | 2 | null | 31,494 | 4 | null | I imagine that this problem is well understood but what occurs to me on first reading is:
- - -
Use your existing database to get a good first guess for the threshold, and correct as you accumulate experience.
You may prefer a fairly strong bias toward false positives, at least at first.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:03:53.737 | 2008-08-28T02:10:38.663 | 2008-08-28T02:10:38.663 | 2,509 | 2,509 | null |
31,513 | 2 | null | 31,498 | 191 | null | Keep in mind that default(string) is null, not string.Empty. You may want a special case in your code:
```
if (typeof(T) == typeof(String)) return (T)(object)String.Empty;
```
| null | CC BY-SA 3.0 | null | 2008-08-28T02:08:18.670 | 2012-01-23T19:53:45.213 | 2012-01-23T19:53:45.213 | 615 | 615 | null |
31,514 | 2 | null | 8,214 | 3 | null | The following blog post gives quite a few good ideas for instrumenting a WPF application:
[Techniques for UI Auditing on WPF apps](https://blog.pixelingene.com/2008/08/techniques-for-ui-auditing-on-wpf-apps/).
| null | CC BY-SA 3.0 | null | 2008-08-28T02:08:26.253 | 2017-03-10T21:37:11.747 | 2017-03-10T21:37:11.747 | 504,398 | 708 | null |
31,516 | 2 | null | 31,494 | 5 | null | You can compare the names with the [Levenshtein distance](http://en.wikipedia.org/wiki/Levenshtein_distance). If the names are the same, the distance is 0, else it is given by the minimum number of operations needed to transform one string into the other.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:09:02.787 | 2008-08-28T02:09:02.787 | null | null | 720 | null |
31,518 | 2 | null | 31,494 | 2 | null | This may or may not be related but, minor misspellings might be detected by a [Soundex search](http://en.wikipedia.org/wiki/Soundex), e.g., this will allow you to consider Britney Spears, Britanny Spares, and Britny Spears as duplicates.
Nickname contractions, however, are difficult to consider as duplicates and I dou... | null | CC BY-SA 2.5 | null | 2008-08-28T02:09:46.700 | 2008-08-28T02:09:46.700 | null | null | 372 | null |
31,525 | 2 | null | 31,285 | 1 | null | You're probably best off using the VMWare Tools .rpm file instead of the install script on Ubuntu. Alien is a program that will [let you turn a .rpm into a Ubuntu-friendly .deb package](http://ubuntu.wordpress.com/2005/09/23/installing-using-an-rpm-file/).
| null | CC BY-SA 2.5 | null | 2008-08-28T02:13:04.650 | 2008-08-28T02:13:04.650 | null | null | 1,902,010 | null |
31,522 | 2 | null | 31,497 | 36 | null | > A delegate is a named type that defines a particular kind of method. Just as a class definition lays out all the members for the given kind of object it defines, the delegate lays out the method signature for the kind of method it defines.
Based on this statement, a delegate is a function pointer and it defines what... | null | CC BY-SA 2.5 | null | 2008-08-28T02:12:21.983 | 2008-08-28T03:11:35.070 | 2008-08-28T03:11:35.087 | 1,117 | 1,117 | null |
31,520 | 2 | null | 31,500 | 34 | null | Yeah, that's right. If your `Employee` table has 10,000 records, and only 5 records have `EmployeeTypeId` in (1,2,3), then it will most likely use the index to fetch the records. However, if it finds that 9,000 records have the `EmployeeTypeId` in (1,2,3), then it would most likely just do a table scan to get the cor... | null | CC BY-SA 4.0 | null | 2008-08-28T02:11:32.827 | 2020-02-13T07:45:30.517 | 2020-02-13T07:45:30.517 | 3,118,401 | 1,862 | null |
31,517 | 2 | null | 31,366 | 1 | null | Given the XPath functions that you're calling which I don't remember having the luxury of in my MSXSL work, it looks like you're using an XPath 2-compatible processor.
If that's the case, doesn't XPath 2 have a replace(string, pattern, replacement) function that takes a regex as a second parameter?
```
<xsl:value-... | null | CC BY-SA 2.5 | null | 2008-08-28T02:09:22.520 | 2008-08-28T04:31:26.937 | 2008-08-28T04:31:26.937 | 2,146 | 2,146 | null |
31,527 | 2 | null | 31,480 | 0 | null | WPF is pretty stable as far as changes go. Silverlight is still in flux. Though you may watch out since silverlight brought the concept of the state manager(instead of implementing triggers) which may get adopted in wpf...
If that happens there will be multiple ways to defining control templates and behavior...
an... | null | CC BY-SA 2.5 | null | 2008-08-28T02:17:08.603 | 2008-08-28T02:17:08.603 | null | null | 580 | null |
31,526 | 2 | null | 31,494 | 3 | null | If you have access SSIS check out the Fuzzy grouping and Fuzzy lookup transformation.
[http://www.sqlteam.com/article/using-fuzzy-lookup-transformations-in-sql-server-integration-services](http://www.sqlteam.com/article/using-fuzzy-lookup-transformations-in-sql-server-integration-services)
[http://msdn.microsoft.com/... | null | CC BY-SA 2.5 | null | 2008-08-28T02:14:56.860 | 2008-08-28T02:14:56.860 | null | null | 1,293 | null |
31,532 | 2 | null | 31,285 | 0 | null | I've heard a lot of good things about VirtualBox from Sun. If you get fed up with VMWare, it's worth a look.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:20:27.487 | 2008-08-28T02:20:27.487 | null | null | 1,811 | null |
31,528 | 2 | null | 31,466 | 0 | null | More than sending bad data, I think I got an ERROR403. If I just try again it's usually ok.
And I agree : I saw a lot of report about people talking about amazon being totally down, but nobody talking about a "sometimes my access is refused" error, so I guess there might be an error on my side. I just set up the log o... | null | CC BY-SA 2.5 | null | 2008-08-28T02:17:22.207 | 2008-08-28T02:26:11.153 | 2008-08-28T02:26:11.153 | 446,497 | 446,497 | null |
31,488 | 2 | null | 31,238 | 8 | null | I would also suggest Xml serialization as others have already mentioned. Here is a sample I threw together to demonstrate. Attributes are used to connect the names from the Xml to the actual property names and types in the data structure. Attributes also list out all the allowed types that can go into the `Things` c... | null | CC BY-SA 2.5 | null | 2008-08-28T01:43:22.007 | 2008-08-28T01:43:22.007 | null | null | 1,254 | null |
31,529 | 2 | null | 31,498 | 4 | null | You can use the [TypeCode](http://msdn.microsoft.com/en-us/library/system.typecode.aspx) enumeration. Call the GetTypeCode method on classes that implement the IConvertible interface to obtain the type code for an instance of that class. IConvertible is implemented by Boolean, SByte, Byte, Int16, UInt16, Int32, UInt32,... | null | CC BY-SA 2.5 | null | 2008-08-28T02:18:09.503 | 2008-08-28T02:18:09.503 | 2017-05-23T11:46:50.813 | -1 | 718 | null |
31,533 | 2 | null | 4,363 | 2 | null | [NUnit](https://nunit.org/) is the way to go for you.
You could find some links here :
1. http://nunitasp.sourceforge.net/tutorial/
2. NUnit Unit Testing of ASP.NET Pages, Base Classes, Controls and other widgetry using Cassini by Scott Hanselman
| null | CC BY-SA 4.0 | null | 2008-08-28T02:20:33.743 | 2019-12-27T09:02:08.217 | 2019-12-27T09:02:08.217 | 5,407,188 | 3,342 | null |
31,361 | 2 | null | 31,296 | 3 | null | We are using the tools by [RedGate](http://www.red-gate.com/) which I personally find very useful in any aspect of work with databases. For scripting I would recommend the [SQL Compare](http://www.red-gate.com/products/SQL_Compare/index.htm) (you need a pro version for scripting). The SQL Compare is a must have for dep... | null | CC BY-SA 2.5 | null | 2008-08-27T23:54:08.570 | 2008-08-27T23:54:08.570 | null | null | 3,241 | null |
31,536 | 2 | null | 4,363 | 2 | null | Take a look at [http://selenium.openqa.org/](http://selenium.openqa.org/) it offers a good automated way to build unit tests hooking into the browser. there is a nice firefox plugin for recording tests and can utilize almost any unit testing framework. We had a presentation/demo at our local user group meeting last mo... | null | CC BY-SA 2.5 | null | 2008-08-28T02:26:00.750 | 2008-08-28T02:26:00.750 | null | null | 820 | null |
31,542 | 2 | null | 31,497 | 5 | null | If you're interested in seeing how the Delegate pattern is used in real-world code, look no further than Cocoa on Mac OS X. Cocoa is Apple's preferred UI toolkit for programming under Mac OS X, and is coded in Objective C. It's designed so that each UI component is intended to be extended via delegation rather than s... | null | CC BY-SA 2.5 | null | 2008-08-28T02:30:16.043 | 2008-08-28T02:30:16.043 | null | null | 2,276 | null |
31,543 | 2 | null | 31,535 | 3 | null | Actually, you should probably use some sort of HTML parser where you can inspect each node (and therefore node attributes) in the DOM of the page. I've not used any of these for a while so I don't know the pros and cons but here's a list [http://java-source.net/open-source/html-parsers](http://java-source.net/open-sour... | null | CC BY-SA 2.5 | null | 2008-08-28T02:30:42.080 | 2008-08-28T02:30:42.080 | null | null | 1,353 | null |
31,535 | 1 | 31,546 | null | 5 | 521 | I'm trying to fetch some HTML from various blogs and have noticed that different providers use the same tag in different ways.
For example, here are two major providers that use the meta name generator tag differently:
- `<meta content='blogger' name='generator'/>`- `<meta name="generator" content="WordPress.com" />`... | Best way to fetch a varying HTML tag | CC BY-SA 3.0 | null | 2008-08-28T02:23:12.770 | 2014-12-13T08:17:23.270 | 2014-12-13T08:17:23.270 | 1,810,429 | 2,644 | [
"html",
"regex",
"language-agnostic"
] |
31,498 | 1 | 31,513 | null | 109 | 100,400 | I have a generic class that should allow any type, primitive or otherwise. The only problem with this is using `default(T)`. When you call default on a value type or a string, it initializes it to a reasonable value (such as empty string). When you call `default(T)` on an object, it returns null. For various reasons we... | Best way to test if a generic type is a string? (C#) | CC BY-SA 3.0 | 0 | 2008-08-28T02:00:00.920 | 2020-09-11T10:32:49.427 | 2017-06-13T14:59:50.727 | 271,200 | 67 | [
"c#",
"generics"
] |
31,538 | 2 | null | 31,535 | 2 | null | Those differences are not really important according to the XHTML standard.
In other words, they are exactly the same thing.
Also, if you replace double quotes with single quotes would be the same.
The typical way of 'normalizing' an xml document is to pare it using some API that treats the document as its Infoset r... | null | CC BY-SA 2.5 | null | 2008-08-28T02:28:16.827 | 2008-08-28T02:34:28.437 | 2008-08-28T02:34:28.437 | 2,954 | 2,954 | null |
31,505 | 2 | null | 31,496 | 9 | null | You can use [precompiler directives](http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx) within Visual Studio. The #if directive will allow you to determine if you are going to include code or not based on your custom solution configuration.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:02:07.717 | 2008-08-28T02:02:07.717 | null | null | 372 | null |
31,547 | 2 | null | 31,496 | 4 | null | In each project's properties under the build section you can set different custom constants for each solution configuration. This is where you define custom pre-compiler directives.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:31:41.330 | 2008-08-28T02:31:41.330 | null | null | 327 | null |
31,546 | 2 | null | 31,535 | 14 | null | The answer is: .
Seriously. Use a SGML parser, or an XML parser if you happen to know it's valid XML (probably almost never true). You will absolutely screw up and waste tons of time trying to get it right. Just use what's already available.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:31:40.643 | 2008-08-28T02:31:40.643 | null | null | 1,554 | null |
31,549 | 2 | null | 31,497 | 20 | null | One common use of delegates for generic Lists are via Action delegates (or its anonymous equivalent) to create a one-line foreach operation:
```
myList.Foreach( i => i.DoSomething());
```
I also find the Predicate delegate quite useful in searching or pruning a List:
```
myList.FindAll( i => i.Name == "Bob");
m... | null | CC BY-SA 2.5 | null | 2008-08-28T02:32:42.403 | 2008-08-28T02:32:42.403 | null | null | 372 | null |
31,551 | 1 | null | null | 96 | 76,553 | Using SqlServer, and trying to update rows from within the same table. I want to use a table alias for readability.
This is the way I am doing it at the moment:
```
UPDATE ra
SET ra.ItemValue = rb.ItemValue
FROM dbo.Rates ra, dbo.Rates rb
WHERE ra.ResourceID = rb.ResourceID
AND ra.PriceSched = 't8'
AND rb.PriceSched =... | Good way to use table alias in Update statement? | CC BY-SA 4.0 | 0 | 2008-08-28T02:33:56.830 | 2022-12-07T09:11:53.823 | 2020-12-23T19:40:34.213 | 4,099,593 | 2,027 | [
"sql-server"
] |
31,548 | 2 | null | 31,494 | 1 | null | I'm not sure it will work well for the names vs nicknames problem, but the most common algorithm in this sort of area would be the [edit distance / Levenshtein distance](http://en.wikipedia.org/wiki/Levenshtein_distance) algorithm. It's basically a count of the number of character changes, additions and removals requir... | null | CC BY-SA 2.5 | null | 2008-08-28T02:32:24.430 | 2008-08-28T02:32:24.430 | null | null | 797 | null |
31,566 | 1 | 31,573 | null | 4 | 2,640 | Question as stated in the title.
| Query to list all tables that contain a specific column with SQL Server 2005 | CC BY-SA 3.0 | null | 2008-08-28T02:50:38.147 | 2011-11-25T06:59:57.600 | 2011-11-25T06:59:57.600 | 360,899 | 1,293 | [
"sql-server-2005"
] |
31,561 | 1 | 31,603 | null | 2 | 523 | Depending on my mood I seem to waffle back and forth between wanting a Lisp-1 and a Lisp-2. Unfortunately beyond the obvious name space differences, this leaves all kinds of amusing function name/etc problems you run into. Case in point, trying to write some code tonight I tried to do (map #'function listvar) which, ... | Keeping CL and Scheme straight in your head | CC BY-SA 2.5 | null | 2008-08-28T02:41:53.987 | 2010-10-11T07:28:12.600 | 2008-09-02T04:46:11.717 | 305 | 3,326 | [
"lisp",
"scheme",
"clisp"
] |
31,552 | 2 | null | 31,340 | 11 | null | Use threads in python if the individual workers are doing I/O bound operations. If you are trying to scale across multiple cores on a machine either find a good [IPC](http://www.python.org/dev/peps/pep-0371/) framework for python or pick a different language.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:34:18.967 | 2008-08-28T02:34:18.967 | null | null | 1,455 | null |
31,553 | 2 | null | 31,446 | 1 | null | If there aren't too many properties in the bean, you might just create a new instance and set all of its properties manually from the persisted bean.
This could be implemented as a copy constructor, for example:
```
public Thing(Thing oldBean) {
this.setPropertyOne(oldBean.getPropertyOne());
// and so on
}
```
... | null | CC BY-SA 2.5 | null | 2008-08-28T02:36:16.857 | 2008-08-28T02:36:16.857 | null | null | 3,344 | null |
31,556 | 2 | null | 27,743 | 12 | null | I've done a little more investigation into the Mongrel source and it turns out that Mongrel installs a signal handler to catch an standard process kill (TERM) and do a graceful shutdown, so I don't need a special procedure after all.
You can see this working from the log output you get when killing a Mongrel while it'... | null | CC BY-SA 2.5 | null | 2008-08-28T02:38:06.320 | 2009-01-27T06:29:12.003 | 2009-01-27T06:29:12.020 | 2,994 | 2,994 | null |
31,559 | 1 | null | null | 22 | 14,668 | [XPO](http://www.devexpress.com/Products/NET/ORM/) is the object relational mapper of choice at my company. Any thoughts on the pros and cons?
---
I was just looking for general feeling and anecdotes about the product. We are not switching to XPO. We are just getting rid of hard coded sql strings living in the app... | Any thoughts on DevExpress XPO ORM Package? | CC BY-SA 3.0 | 0 | 2008-08-28T02:40:03.353 | 2011-12-16T18:15:18.683 | 2011-12-16T18:15:18.683 | 396,458 | 1,455 | [
"c#",
"windows",
"orm",
"devexpress",
"xpo"
] |
31,575 | 2 | null | 31,572 | -3 | null | do a RDP multicast.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:57:15.993 | 2008-11-24T04:45:23.910 | 2008-11-24T04:45:23.923 | 2,789 | 2,789 | null |
31,570 | 2 | null | 31,366 | 1 | null | Try this (XSLT 2.0):
```
<xsl:template match="/STORIES/STORY">
<component>
<xsl:if test="boolean(ARTICLEBODY)">
<xsl:call-template name="insert_paras">
<xsl:with-param name="text" select="ARTICLEBODY/text()"/>
</xsl:call-template>
</xs... | null | CC BY-SA 2.5 | null | 2008-08-28T02:54:20.290 | 2008-08-28T02:54:20.290 | null | null | 207 | null |
31,567 | 1 | 31,638 | null | 10 | 12,577 | I'm trying to wrap my head around reflection, so I decided to add plugin capability to a program that I'm writing. The only way to understand a concept is to get your fingers dirty and write the code, so I went the route of creating a simple interface library consisting of the IPlugin and IHost interfaces, a plugin imp... | How to properly cast objects created through reflection | CC BY-SA 2.5 | 0 | 2008-08-28T02:50:55.510 | 2011-01-26T18:45:15.087 | 2008-08-28T03:12:59.653 | 1,880 | 1,880 | [
"c#",
".net",
"reflection"
] |
31,573 | 2 | null | 31,566 | 2 | null | [http://blog.sqlauthority.com/2008/08/06/sql-server-query-to-find-column-from-all-tables-of-database/](http://blog.sqlauthority.com/2008/08/06/sql-server-query-to-find-column-from-all-tables-of-database/)
```
USE AdventureWorks
GO
SELECT
t.name AS table_name
,SCHEMA_NAME(schema_id) AS schema_name
,c.name ... | null | CC BY-SA 3.0 | null | 2008-08-28T02:55:57.323 | 2011-11-25T06:59:32.140 | 2011-11-25T06:59:32.140 | 360,899 | 1,293 | null |
31,579 | 2 | null | 31,572 | 0 | null | What you can do is that after the broadcast have the initiate the tcp connections. Otherwise you just have to keep a list of all clients and initiate the connections to each client yourself.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:59:12.120 | 2008-08-28T02:59:12.120 | null | null | 2,976 | null |
31,576 | 2 | null | 31,567 | 0 | null | Is your type not public, if so, call the overload that takes in a boolean:
```
Activator.CreateInstance(type, true);
```
Also, in your first example, see if o is null and if not, print out o.GetType().Name to see what it really is.
| null | CC BY-SA 2.5 | null | 2008-08-28T02:57:30.440 | 2008-08-28T02:57:30.440 | null | null | 598 | null |
31,560 | 2 | null | 17,781 | 5 | null | It's likely that self-signing will give you what you need; [here is a page](http://web.archive.org/web/20080221140348/http://riseuplabs.org/grimoire/web-server/self-signed-certs/) (link resurrected by web.archive.org) that provides a decent guide to self-signing if you would like to know the ins and outs of how it's do... | null | CC BY-SA 3.0 | null | 2008-08-28T02:40:55.317 | 2015-01-12T11:36:30.030 | 2015-01-12T11:36:30.030 | 1,640,661 | 2,976 | null |