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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34,301 | 1 | 34,315 | null | 4 | 2,008 | At work, we have multiple branches that we may be working on at any time.
Our solution so far as been to create multiple web-sites but you can only run one web-site at a time. This makes switching between branches more of a pain that in should be.
I just want to go to the URL, mapped in my hosts file, for that branc... | Multiple web-sites running in IIS simulatenously | CC BY-SA 2.5 | 0 | 2008-08-29T10:00:43.393 | 2008-09-18T13:39:10.737 | null | null | 854 | [
"iis"
] |
34,303 | 2 | null | 34,301 | 1 | null | I believe it is a restriction of IIS that you can only run more than one website on server versions of the windows OS.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:02:38.287 | 2008-08-29T10:02:38.287 | null | null | 770 | null |
34,297 | 2 | null | 34,262 | 0 | null | if they checked them in as part of a single changeset then you can find them that way.
(right click file in solution explorer, view history, double-click on the relevant changeset and you'll see all the related files for that checkin)
Is your question about finding this info via the TFS API via the website, or via t... | null | CC BY-SA 2.5 | null | 2008-08-29T09:58:37.080 | 2008-08-29T09:58:37.080 | null | null | 49 | null |
34,307 | 2 | null | 34,300 | 2 | null | Not yet, but I'd say in the long term, it aims to. Obviously there will always be a place for the lower levels, but from what I understand of Microsoft's strategy, the move is towards replacing as much with managed code as possible.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:05:29.780 | 2008-08-29T10:05:29.780 | null | null | 797 | null |
34,304 | 1 | null | null | 2 | 622 | I use TFS 2008. We run unit tests as part of our continuous integration build and integration tests nightly.
What other types of testing do you automate and include in your build process? what technologies do you use to do so?
I'm thinking about smoke tests, performance tests, load tests but don't know how realis... | What types of testing do you include in your build process? | CC BY-SA 2.5 | null | 2008-08-29T10:03:47.410 | 2013-01-16T14:54:46.843 | 2013-01-16T14:54:46.843 | 897,326 | 2,471 | [
"testing",
"build-automation"
] |
34,294 | 1 | null | null | 8 | 3,260 | I've been asked to create a Delphi compatible dll in C++ to do simple 64bit memory management.
The background is that the system in Delphi needs to allocate a lots of chunks of memory that would go well outside 32bit addressable space. The Delphi developer explained to me that he could not allocate memory with the Del... | 64bit Memory allocation | CC BY-SA 2.5 | 0 | 2008-08-29T09:57:24.573 | 2012-07-03T14:55:45.323 | null | null | 3,585 | [
"c++",
"delphi",
"memory",
"64-bit"
] |
34,309 | 2 | null | 34,286 | 1 | null | If you are using TOAD for your db access you can set a custom colour for each of your connections. ([List of Quest products here](http://www.quest.com/products/all-products.aspx) scroll down page to the TOAD links)
The colour appears as a border around each TOAD window (at least it did on the Windows version I used in ... | null | CC BY-SA 2.5 | null | 2008-08-29T10:07:00.167 | 2008-08-29T10:07:00.167 | null | null | 3,590 | null |
34,310 | 2 | null | 34,284 | 3 | null | Is there any more information in the error message?
When I had problems with LC.exe in the past, most times it was because the licensed component was upgraded (the version number increased), but the licx file still contained the old version.
In this case, you can try to update the version in the licx file manually, o... | null | CC BY-SA 2.5 | null | 2008-08-29T10:07:46.607 | 2008-08-29T10:07:46.607 | null | null | 1,810 | null |
34,312 | 1 | 8,715,966 | null | 128 | 30,043 | I was wondering if anyone that has experience in both this stuff can shed some light on the difference between the two if any?
Any specific strength of each that makes it suitable for any specific case?
| SimpleTest vs PHPunit | CC BY-SA 4.0 | 0 | 2008-08-29T10:08:06.370 | 2019-02-20T11:46:18.970 | 2019-01-18T11:05:58.790 | 567,854 | 2,976 | [
"php",
"unit-testing",
"phpunit",
"simpletest"
] |
34,298 | 2 | null | 34,286 | 1 | null | None that I'm aware of, but perhaps a [virtual desktop](http://en.wikipedia.org/wiki/Virtual_desktop) system for your OS of choice would help keep the separation a little better for you.
| null | CC BY-SA 2.5 | null | 2008-08-29T09:59:52.023 | 2008-08-29T09:59:52.023 | null | null | 797 | null |
34,315 | 2 | null | 34,301 | 3 | null | Yes, it is a restriction and this one website can have only 10 simultanious connections.
Buy a Windows 2003 or 2008 Small Business Edition, it is quite cost-effective in this scenario.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:08:49.660 | 2008-08-29T10:08:49.660 | null | null | 968 | null |
34,311 | 2 | null | 32,643 | 1 | null | You are in the right place using OpenCV, it is an excellent utility. For example, [this guy](http://www.nashruddin.com/template-matching-in-opencv-with-example.html) used it for template matching, which is fairly similar to what you need to do. Also, the link Roddy specified looks similar to what you want to do.
I fee... | null | CC BY-SA 2.5 | null | 2008-08-29T10:07:59.507 | 2008-08-29T10:33:21.210 | 2008-08-29T10:33:21.210 | 142 | 142 | null |
34,302 | 2 | null | 34,286 | 0 | null | Since you didn't restrict your question, I'll answer with my solution to this type of problem. I often am logged into multiple different machines with [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/) as different users (including as `root`). If I have a window that I want to distinguish from the others, for ... | null | CC BY-SA 2.5 | null | 2008-08-29T10:01:39.397 | 2008-08-29T10:01:39.397 | null | null | 893 | null |
34,321 | 2 | null | 34,314 | 4 | null | You might want to have a look at [xapian](http://xapian.org/) and the [omega](http://xapian.org/docs/omega/overview.html) front end. It's essentially a toolkit on which you can build search functionality.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:11:51.200 | 2008-08-29T10:11:51.200 | null | null | 893 | null |
34,318 | 2 | null | 34,314 | 40 | null | Use lucene,
[http://lucene.apache.org/java/docs/](http://lucene.apache.org/java/docs/)
> Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.
It is avail... | null | CC BY-SA 2.5 | null | 2008-08-29T10:09:40.830 | 2008-08-29T10:16:18.833 | 2008-08-29T10:16:18.833 | 2,976 | 2,976 | null |
34,314 | 1 | 34,318 | null | 70 | 79,527 | I want to implement search functionality for a website (assume it is similar to SO). I don't want to use Google search of stuff like that.
My question is:
How do I implement this?
There are two methods I am aware of:
1. Search all the databases in the application when the user gives his query.
2. Index all the dat... | How do I implement Search Functionality in a website? | CC BY-SA 2.5 | 0 | 2008-08-29T10:08:12.190 | 2013-05-05T10:00:14.093 | 2008-08-29T10:14:28.790 | 184 | 184 | [
"search"
] |
34,323 | 2 | null | 34,301 | 0 | null | One way you could solve this without reinstalling your computer is to create each branch in a virtual subdirectory under you current web-root. Then at the top-level website, create a default.asp(x) the reads `Request.ServerVariables["SERVER-NAME"]` (should be underscore) and redirects the browser to whatever virtual di... | null | CC BY-SA 2.5 | null | 2008-08-29T10:14:34.640 | 2008-08-29T10:14:34.640 | null | null | 2,257 | null |
34,326 | 2 | null | 34,304 | 1 | null | Integrating load testing during you build process is a bad idea, just do your normal unit testing to make sure that all your codes work as expected. Load and performance testing should be done separately.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:18:01.013 | 2008-08-29T10:18:01.013 | null | null | 2,976 | null |
34,329 | 2 | null | 34,325 | 8 | null | If you have the expertise, use native frontends, it'll effectively double the job you have to do for UI but from my experience non-native UI is a little bit clunkier than their native counterparts.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:19:41.757 | 2008-08-29T10:19:41.757 | null | null | 2,976 | null |
34,324 | 2 | null | 34,314 | 1 | null | The best way to approach this will depend on how you construct your pages.
If they're frequently composed from a lot of different records (as I imagine stack overflow pages are), the indexing approach is likely to give better results unless you put a lot of work into effectively reconstructing the pages on the databas... | null | CC BY-SA 2.5 | null | 2008-08-29T10:16:50.627 | 2008-08-29T10:16:50.627 | null | null | 797 | null |
34,325 | 1 | 34,329 | null | 5 | 2,038 | On my side job as programmer, I am to write a program in C++ to convert audio files from/to various formats. Probably, this will involve building a simple GUI.
Will it be a great effort to build seperate GUIs for Mac and Windows using Cocoa and WinForms instead of a cross-platform toolkit like Qt or GTK? (I will have ... | Should I use a cross-platform GUI-toolkit or rely on the native ones? | CC BY-SA 3.0 | 0 | 2008-08-29T10:17:08.877 | 2016-01-12T03:13:27.610 | 2015-08-24T09:01:57.343 | 155,077 | 1,034 | [
"c++",
"user-interface",
"cross-platform"
] |
34,313 | 2 | null | 4,219 | 3 | null | Having used both extensively, I think Wedge was on the money in noting "TFS includes bug tracking, work item tracking and other features beyond source control".
However, I can honestly say that SVN and TFS seem pretty equal in regards to scalability, and if anything SVN's source control has the edge on TFS due to its ... | null | CC BY-SA 2.5 | null | 2008-08-29T10:08:08.273 | 2008-08-29T10:08:08.273 | null | null | 2,562 | null |
34,328 | 1 | 34,418 | null | 11 | 8,383 | In [another question](https://stackoverflow.com/questions/32404/can-i-run-a-python-script-as-a-service-in-windows-how) I posted yesterday, I got very good advice on how a Python script could be run as a service in Windows. What I'm left wondering is: How is Windows aware of the services that can be managed in the nativ... | How do I make Windows aware of a service I have written in Python? | CC BY-SA 2.5 | 0 | 2008-08-29T10:18:21.167 | 2008-11-03T18:03:37.790 | 2017-05-23T11:47:16.490 | -1 | 2,077 | [
"python",
"windows",
"cross-platform"
] |
34,330 | 2 | null | 34,328 | 7 | null | Here is code to install a python-script as a service, written in python :)
[http://code.activestate.com/recipes/551780/](http://code.activestate.com/recipes/551780/)
This post could also help you out:
[http://essiene.blogspot.com/2005/04/python-windows-services.html](http://essiene.blogspot.com/2005/04/python-window... | null | CC BY-SA 2.5 | null | 2008-08-29T10:20:39.213 | 2008-08-29T10:20:39.213 | null | null | 2,257 | null |
34,327 | 2 | null | 34,155 | 7 | null | @Pat
> Seaside
Yes, [Seaside](http://www.seaside.st) is a great example. I browsed its code quickly and found this message illustrating passing control between components in a seemingly statefull way accross the Web.
```
WAComponent >> call: aComponent
"Pass control from the receiver to aComponent. The receiver... | null | CC BY-SA 2.5 | null | 2008-08-29T10:18:18.517 | 2008-08-29T11:11:50.853 | 2008-08-29T11:11:50.853 | 2,797 | 2,797 | null |
34,337 | 2 | null | 34,301 | 2 | null | Are virtual directories an option for you? I run multiple versions of the same website this way.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:31:41.760 | 2008-08-29T10:31:41.760 | null | null | 2,471 | null |
34,322 | 1 | 34,466 | null | 0 | 96 | Using the TFS build server VS 2008 Team System Tester Edition installed - is it possible to run a series of webtests as part of a build?
I know that Webtests can only be recorded using the Tester Edition of VS. Here's a [post about this](http://blogs.vertigosoftware.com/teamsystem/archive/2006/03/09/Simple_Web_Testin... | Do webtests need VS tester edition on the build server? | CC BY-SA 3.0 | null | 2008-08-29T10:14:21.537 | 2013-04-17T21:07:25.243 | 2013-04-17T21:07:25.243 | 1,454,806 | 2,471 | [
"tfs",
"build-process"
] |
34,334 | 2 | null | 34,294 | 7 | null | Only 64 bit processes can address 64 bit memory. A 64 bit process can only load 64 bit dlls and 32 bits processes can only load 32 bits dlls. Delphi's compiler can only make 32 bits binaries.
So a 32 bits Delphi exe can not load your 64 bit c++ dll. It could load a 32 bit c++ dll, but then that dll wouldn't be able to... | null | CC BY-SA 2.5 | null | 2008-08-29T10:26:22.037 | 2008-08-29T10:26:22.037 | null | null | 1,242 | null |
34,343 | 2 | null | 34,312 | 1 | null | I haven't checked Simple Test for a while, last time it had an eclipse plugin, which is a major factor for me, but it hasn't been updated for a long time.
Sebastian Bergmann is still very actively working on PHPUnit, but it still lacks a good plugin for eclipse - but it is included for the new Zend Studio.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:38:51.040 | 2008-08-29T10:38:51.040 | null | null | 3,134 | null |
34,338 | 2 | null | 34,312 | 10 | null | I found SimpleTest was even easier than PHPUnit to set up. Just extract it and you are good to go. A benefit of this is if you are working at more than one machine, since you can store the whole testing framework the same way as your source code, and thereby know that you are using the same framework code. Especially i... | null | CC BY-SA 2.5 | null | 2008-08-29T10:34:51.643 | 2008-08-29T10:34:51.643 | null | null | 276 | null |
34,342 | 2 | null | 34,300 | 10 | null | Not yet, because the OS is still unmanaged.
If MS finally do what their labs have been talking about for years and produce a fully managed OS then it will.
That OS won't be backwards compatible though. They would have to produce managed versions of Office, IE, etc first. They will have to produce a virtual machine to... | null | CC BY-SA 2.5 | null | 2008-08-29T10:38:33.037 | 2008-08-29T10:38:33.037 | null | null | 905 | null |
34,340 | 2 | null | 34,300 | 0 | null | .NET has been deliberately designed to replace COM (and, consequently, DLL Hell) so while .NET applications still can access COM components, all new development are encouraged to move to .NET except if you have a very good reason to stick with COM.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:37:04.647 | 2008-08-29T10:37:04.647 | null | null | 372 | null |
34,332 | 2 | null | 34,325 | 1 | null | Yes.
But seriously, it depends on your goals. I agree that the native UI libraries, with a bunch of effort put into them, will give vastly better results, but for lots of apps, a very basic UI is sufficient and a lot less effort if you take one of the existing cross platform frameworks.
Maybe starting with the CLI an... | null | CC BY-SA 2.5 | null | 2008-08-29T10:22:40.750 | 2008-08-29T10:22:40.750 | null | null | 797 | null |
34,341 | 2 | null | 34,301 | 0 | null | With Windows XP and IIS 5.1 you cannot run moultiple web sites.
You can however run multiple ASP.NET hosts. You would probably have to write the host your self.
Something like this should get you started:
| null | CC BY-SA 2.5 | null | 2008-08-29T10:38:06.517 | 2008-08-29T10:38:06.517 | null | null | 2,253 | null |
34,352 | 2 | null | 33,395 | 1 | null | securityTrimmingEnabled="true" works for internal pages that have a config file restricting permissions, you can also add role="SomeRole" in the sitemap to ovveride the display mechanism, which is useful if you have menu items to external sites.
| null | CC BY-SA 2.5 | null | 2008-08-29T10:51:27.343 | 2008-08-29T10:51:27.343 | null | null | 2,808 | null |
34,355 | 2 | null | 34,345 | 1 | null | Implement a sorting algorithm and sort the boxes according to the numbers inside them.
First prisoner sorts 50 boxes, and the second prisoner sorts the other 50 and merges with the first one. (Note that the second prisoner can guess the values inside the first 50 boxes)
After the 2nd prisoner, all of the boxes will b... | null | CC BY-SA 2.5 | null | 2008-08-29T10:53:59.477 | 2008-08-29T10:53:59.477 | null | null | 184 | null |
34,359 | 2 | null | 5,706 | 21 | null | Request.Params contains a combination of QueryString, Form, Cookies and ServerVariables (added in that order).
The difference is that if you have a form variable called "key1" that is in both the QueryString and Form then Request.Params["key1"] will return the QueryString value and Request.Params.GetValues("key1") wi... | null | CC BY-SA 2.5 | null | 2008-08-29T10:57:21.823 | 2008-08-29T10:57:21.823 | null | null | 3,603 | null |
34,364 | 2 | null | 5,460 | 4 | null | You can also take a look at Telligent Graffiti CMS.
[http://graffiticms.com/](http://graffiticms.com/)
It supports multiple blogs and authors.
Update: It's now open source and available at [http://graffiticms.codeplex.com/](http://graffiticms.codeplex.com/)
| null | CC BY-SA 2.5 | null | 2008-08-29T11:02:54.663 | 2010-06-15T14:14:53.860 | 2010-06-15T14:14:53.860 | 3,584 | 3,584 | null |
34,362 | 1 | null | null | 4 | 4,439 | I have a multi dimensional OLAP cube with a number of dimensions. Some of these dimensions have hierarchies. The users would like to perform 'what-if' analysis on the measures in the cube by changing the hierarchies in the dimensions.
For example, they want to know the impact on departmental resource budgets by movin... | What if analysis on multi dimensional cubes (OLAP) | CC BY-SA 2.5 | null | 2008-08-29T11:01:59.673 | 2012-05-03T19:01:08.690 | null | null | 2,661 | [
"database-design",
"olap"
] |
34,365 | 1 | 34,375 | null | 3 | 3,481 | Here's a wierd one. I'm reusing a code base that unfortunately must not be updated. This code makes a call to `HttpContext.Current.Request.QueryString`. Ideally, I need to push a value into this collection with every request that is made. Is this possible - perhaps in an HTTP Module?
| Updating/Intercepting HttpContext.Current.Request.QueryString | CC BY-SA 3.0 | null | 2008-08-29T11:03:19.763 | 2014-12-13T02:23:45.303 | 2014-12-13T02:23:45.303 | 1,810,429 | 1,735 | [
"asp.net",
".net-3.5",
"query-string"
] |
34,348 | 2 | null | 34,300 | 5 | null | COM was the last major technology that MS actually dogfooded. MS are continuing to build new APIs that depend on COM; for example, Vista's new Media Foundation (a kind of successor to DirectShow, which was also COM-based) is a COM API. So is Direct3D10 (and I would assume D3D11). I don't think it's going to disappea... | null | CC BY-SA 2.5 | null | 2008-08-29T10:41:00.567 | 2008-08-29T10:41:00.567 | null | null | 2,131 | null |
34,368 | 2 | null | 34,325 | 7 | null | Have you looked at [wxWidgets](http://www.wxwidgets.org/)? Cross platform native controls.
| null | CC BY-SA 2.5 | null | 2008-08-29T11:07:02.860 | 2008-08-29T11:07:02.860 | null | null | 1,075 | null |
34,369 | 2 | null | 34,059 | 0 | null | Another nice thing about batch build is that it lets you build a configuration different than the current one. It is handy for solutions that take a while to switch.
| null | CC BY-SA 4.0 | null | 2008-08-29T11:11:51.897 | 2019-12-25T01:07:55.803 | 2019-12-25T01:07:55.803 | 63,550 | 1,042 | null |
34,373 | 2 | null | 31,871 | 54 | null | Is it possible that the serverSocket is being closed from another thread? That will cause this exception.
| null | CC BY-SA 2.5 | null | 2008-08-29T11:14:51.233 | 2008-08-29T14:53:39.713 | 2008-08-29T14:53:39.713 | 2,348 | 2,348 | null |
34,377 | 2 | null | 34,262 | 2 | null | In Visual Studio Source Control Explorer, right click on the directory you want to compare, and select "Compare". It will pop up a dialog with a couple of filtering options, and then show you what's out of date.
| null | CC BY-SA 2.5 | null | 2008-08-29T11:23:05.257 | 2008-08-29T11:23:05.257 | null | null | 3,114 | null |
34,376 | 2 | null | 34,325 | 3 | null | I would agree that if possible, native front-ends are the way to go. I've not used wxWidgets recently, and I've heard it's come a long way, but back when it was wxWindows, we built an app with it that was spec'd to be built in X/Motif. When we finished the effort and delivered it, the customer said it did not look enou... | null | CC BY-SA 2.5 | null | 2008-08-29T11:20:50.923 | 2008-08-29T11:20:50.923 | null | null | 3,114 | null |
34,372 | 2 | null | 33,768 | 4 | null | Slow compile time is most often caused by having large numbers of embedded resources ([Embed] or @Embed).
Option 2 on this article might help you: [[http://www.rogue-development.com/blog2/2007/11/slow-flex-builder-compile-and-refresh-solution-modules/]](http://www.rogue-development.com/blog2/2007/11/slow-flex-builder-... | null | CC BY-SA 2.5 | null | 2008-08-29T11:14:26.167 | 2008-08-29T11:14:26.167 | null | null | 3,603 | null |
34,375 | 2 | null | 34,365 | 6 | null | Without using reflection, the simplest way to do it would be to use the RewritePath function on the current HttpContext object in order to modify the querystring.
Using an [IHttpModule](http://msdn.microsoft.com/en-us/library/system.web.ihttpmodule.aspx), it might look something like:
```
context.RewritePath(context... | null | CC BY-SA 2.5 | null | 2008-08-29T11:20:34.420 | 2008-08-29T11:20:34.420 | null | null | 2,257 | null |
34,361 | 2 | null | 26,863 | 2 | null | I tried most of the suggestions, and none of them worked. I didn't get a chance to try /resetuserdata. Finally I reinstalled the plugin and uninstalled it again, and the windows went away.
| null | CC BY-SA 2.5 | null | 2008-08-29T11:00:33.797 | 2008-08-29T14:52:06.113 | 2008-08-29T14:52:06.113 | 2,348 | 2,348 | null |
34,388 | 2 | null | 34,284 | 5 | null | I reinstalled Infragistics and that seems to have fixed it.
| null | CC BY-SA 4.0 | null | 2008-08-29T11:36:13.507 | 2019-06-06T16:54:15.180 | 2019-06-06T16:54:15.180 | 10,607,772 | 3,353 | null |
34,371 | 2 | null | 33,476 | 4 | null | Action listeners, such as for a , are called during the phase, which is the last phase before the final phase. This is shown in [The JSF Lifecycle - figure 1](http://www.ibm.com/developerworks/library/j-jsf2/#figure1).
| null | CC BY-SA 2.5 | null | 2008-08-29T11:14:15.447 | 2008-08-29T11:14:15.447 | null | null | 2,670 | null |
34,390 | 1 | 34,502 | null | 52 | 59,308 | Since there are no header sections for user controls in asp.net, user controls have no way of knowing about stylesheet files. So css classes in the user controls are not recognized by visual studio and produces warnings. How can I make a user control know that it will relate to a css class, so if it is warning me about... | How to make user controls know about css classes in ASP.NET | CC BY-SA 2.5 | 0 | 2008-08-29T11:37:54.783 | 2013-02-08T14:42:52.563 | 2008-11-02T02:13:46.210 | null | 31,505 | [
"asp.net",
"css",
"visual-studio-2008",
"user-controls"
] |
34,384 | 2 | null | 34,345 | 0 | null | Maybe I'm not reading it right, but the question seems to be badly constructed or missing information.
> If he finds the number that was
assigned to him in one of these 50
boxes, the prisoner gets to walk into
a room C and all boxes are closed
again before the next one walks into
room B from room A. Otherwis... | null | CC BY-SA 2.5 | null | 2008-08-29T11:27:40.050 | 2008-08-29T11:27:40.050 | null | null | 2,541 | null |
34,392 | 2 | null | 34,345 | 0 | null | The prisoners could agree that prisoner 1 open boxes 1-50.
If they're all still alive, they agree that the next prisoner opens boxes 2-51. (the 2 is arbitrary, but simple to remember this rule) His odds of surviving are now 50/99. You want to eliminate opening a box when you know that the previous guy found his.
I... | null | CC BY-SA 2.5 | null | 2008-08-29T11:39:33.220 | 2008-08-29T11:39:33.220 | null | null | 1,179 | null |
34,395 | 1 | 34,431 | null | 10 | 3,812 | I would like to put a string into a byte array, but the string may be too big to fit. In the case where it's too large, I would like to put as much of the string as possible into the array. Is there an efficient way to find out how many characters will fit?
| How do I truncate a string while converting to bytes in C#? | CC BY-SA 2.5 | 0 | 2008-08-29T14:51:24.727 | 2013-08-13T21:03:59.800 | 2013-08-13T21:03:59.800 | 3,205 | 2,348 | [
"c#",
".net",
"arrays",
"string",
"truncate"
] |
34,399 | 1 | 34,656 | null | 53 | 83,460 | I have an html file with an unordered list. I want to show the list items horizontally but still keep the bullets. No matter what I try, whenever I set the style to inline to meet the horizontal requirement I can't get the bullets to display.
| How to dispay unordered list inline with bullets? | CC BY-SA 4.0 | 0 | 2008-08-29T14:55:05.170 | 2022-08-04T02:40:14.823 | 2019-01-24T07:14:30.610 | 10,757,987 | 3,043 | [
"html",
"css"
] |
34,394 | 1 | 34,412 | null | 2 | 159 | How would you programmacially abbreviate `XHTML` to an arbitrary number of words without leaving unclosed or corrupted tags?
i.e.
```
<p>
Proin tristique dapibus neque. Nam eget purus sit amet leo
tincidunt accumsan.
</p>
<p>
Proin semper, orci at mattis blandit, augue justo blandit nulla.
<span>Quisq... | How would you abbriviate XHTML to an arbitrary number of words? | CC BY-SA 3.0 | 0 | 2008-08-29T14:51:10.953 | 2017-12-16T22:43:47.023 | 2017-12-16T22:43:47.023 | 858,913 | 3,187 | [
"html",
"regex",
"dom",
"xhtml",
"dom-traversal"
] |
34,391 | 2 | null | 34,209 | 2 | null | This is simple. I started getting this problems a few revisions ago. Basically, just remove the "core=True" parameter in the ImageField in the models, and then follow the instructions [here](http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects) to convert to what the newforms admin uses.
| null | CC BY-SA 2.5 | null | 2008-08-29T11:39:27.540 | 2008-08-29T11:39:27.540 | null | null | 2,384 | null |
34,402 | 2 | null | 34,398 | 0 | null | If you want to store numeric and string values in the same column, I am not sure you can avoid doing a lot of casts and converts when using that column as a query filter.
| null | CC BY-SA 2.5 | null | 2008-08-29T14:56:54.013 | 2008-08-29T14:56:54.013 | null | null | 1,453 | null |
34,387 | 2 | null | 34,155 | 16 | null | In Algo & Data II we used these all the times to "exit" or "return" from a (long) function
for example the BFS algorthm to traverse trees with was implemented like this:
```
(define (BFS graph root-discovered node-discovered edge-discovered edge-bumped . nodes)
(define visited (make-vector (graph.order graph) #f))
... | null | CC BY-SA 2.5 | null | 2008-08-29T11:36:06.473 | 2008-08-29T15:47:09.117 | 2008-08-29T15:47:09.117 | 46 | 46 | null |
34,405 | 2 | null | 34,398 | 3 | null | A good way to get the query support you want is to have two columns: numvalue that stores a number and textvalue that stores characters. They should be nullable or at least have some default that represents no value. Your application can then decide which column to store its value and which to leave with no value.
| null | CC BY-SA 2.5 | null | 2008-08-29T14:58:00.517 | 2008-08-29T14:58:00.517 | null | null | 507 | null |
34,406 | 2 | null | 34,398 | 0 | null | two columns.
```
Table: (ValueLable as char(x), Value as numerica(p,s))
```
| null | CC BY-SA 2.5 | null | 2008-08-29T14:58:17.347 | 2008-08-29T14:58:17.347 | null | null | 1,293 | null |
34,407 | 2 | null | 34,398 | 0 | null | I don't think it's possible to have a column with both varchar and int type. You could save your value as a varchar and cast it to int during your query. But this way you could get an exception if your value does contain any character. What are you trying to achieve?
| null | CC BY-SA 2.5 | null | 2008-08-29T14:58:19.937 | 2008-08-29T14:58:19.937 | null | null | 296 | null |
34,398 | 1 | 34,480 | null | 4 | 3,357 | I have a new database table I need to create...
It logically contains an `ID`, a `name`, and a `"value"`.
That value field could be either numeric or a character string in nature.
I don't think I want to just make the field a `varchar`, because I also want to be able to query with filters like `WHERE value > 0.5` an... | How should I model a field that can contain both numeric and string values in SQL Server 2005? | CC BY-SA 3.0 | null | 2008-08-29T14:53:55.487 | 2015-09-09T09:34:41.250 | 2015-09-09T09:34:41.250 | 1,537,726 | 404 | [
"sql-server",
"database-design"
] |
34,345 | 1 | 34,966 | null | 8 | 1,336 | 100 (or some even number 2N :-) ) prisoners are in a room A. They are numbered from 1 to 100.
One by one (from prisoner #1 to prisoner #100, in order), they will be let into a room B in which 100 boxes (numbered from 1 to 100) await them. Inside the (closed) boxes are numbers from 1 to 100 (the numbers inside the boxe... | Finding your own number in a box | CC BY-SA 3.0 | null | 2008-08-29T10:39:13.537 | 2017-08-08T04:06:14.977 | 2017-08-07T11:58:46.427 | 366,904 | 2,638 | [
"algorithm",
"puzzle"
] |
34,397 | 2 | null | 25,765 | 42 | null | [Apache Commons Configuration](http://commons.apache.org/configuration/) works great. It supports having the configuration stored in a wide range of formats on the backend including properties, XML, JNDI, and more. It is easy to use and to extend. To get the most flexibility out of it use a [factory](http://en.wikip... | null | CC BY-SA 3.0 | null | 2008-08-29T14:52:01.777 | 2015-05-06T18:00:22.020 | 2015-05-06T18:00:22.020 | 4,464,702 | 3,535 | null |
34,383 | 2 | null | 34,345 | 3 | null | I find a low tech solution to this type of problem is always the best way to go.
first we make some assumptions about the situation
- - -
So with a 0.005% chance that they will see tomorrow, there is a very simple and low tech solution to this problem.
its all about losses v potential gain, the chances are the p... | null | CC BY-SA 2.5 | null | 2008-08-29T11:26:48.070 | 2008-08-29T11:26:48.070 | null | null | 2,098 | null |
34,411 | 1 | 36,026 | null | 7 | 8,260 | I always tend to forget these built-in functions for making links.
| How do I generate a friendly URL in Symfony PHP? | CC BY-SA 4.0 | null | 2008-08-29T14:58:58.873 | 2019-01-18T11:05:20.107 | 2019-01-18T11:05:20.107 | 567,854 | 2,108 | [
"php",
"url",
"seo",
"symfony1"
] |
34,412 | 2 | null | 34,394 | 1 | null | Recurse through the DOM tree, keeping a word count variable up to date. When the word count exceeds your maximum word count, insert "..." and remove all following siblings of the current node, then, as you go back up through the recursion, remove all the following siblings of each of its ancestors.
| null | CC BY-SA 2.5 | null | 2008-08-29T14:59:06.783 | 2008-08-29T14:59:06.783 | null | null | 3,044 | null |
34,413 | 1 | 34,419 | null | 653 | 1,033,075 | I am getting a `NoClassDefFoundError` when I run my Java application. What is typically the cause of this?
| Why am I getting a NoClassDefFoundError in Java? | CC BY-SA 3.0 | 0 | 2008-08-29T14:59:30.747 | 2022-11-21T23:41:04.043 | 2014-04-11T10:38:15.117 | 474,189 | 3,535 | [
"java",
"noclassdeffounderror"
] |
34,420 | 2 | null | 34,398 | 0 | null | I don't think you're going to be able to get around using VARCHAR or NVARCHAR as your data type. With mixed data like you're describing, you'll have to test the value when you pull the field out of the db and perform the appropriate CAST or CONVERT based on the data type.
| null | CC BY-SA 2.5 | null | 2008-08-29T15:01:38.150 | 2008-08-29T15:01:38.150 | null | null | 1,284 | null |
34,421 | 2 | null | 34,328 | 0 | null | You can use srvany.exe from Windows NT Resource Kit to create a user defined service that will show up in the admin tools...
[http://support.microsoft.com/kb/137890](http://support.microsoft.com/kb/137890)
I am using this method to run tracd (a python script / server) for trac.
Here are some very clear instructions... | null | CC BY-SA 2.5 | null | 2008-08-29T15:01:50.257 | 2008-08-29T15:01:50.257 | null | null | 1,638 | null |
34,426 | 2 | null | 34,411 | 1 | null | This advice is for symfony 1.0. It probably will work for later versions.
:
string genUrl($parameters = array(), $absolute = false)
eg.
$this->getController()->genUrl('yourmodule/youraction?key=value&key2=value', true);
:
This will generate a normal link.
string link_to($name, $internal_uri, $options = array())... | null | CC BY-SA 2.5 | null | 2008-08-29T15:02:37.370 | 2008-08-29T15:02:37.370 | null | null | 2,108 | null |
34,419 | 2 | null | 34,413 | 298 | null | This is caused when there is a class file that your code depends on and it is present at compile time but not found at runtime. Look for differences in your build time and runtime classpaths.
| null | CC BY-SA 2.5 | null | 2008-08-29T15:01:07.607 | 2008-08-29T15:01:07.607 | null | null | 3,211 | null |
34,424 | 2 | null | 30,346 | 0 | null | These answers were helpful and they did let me add a limited form of fixed positioning to IE6, however none of these fix the bug that breaks my layout in IE6 if I specify both a top and a bottom css property for my sidebars (which is the behavior I need).
Since top and bottom can't be specified, I used top and height... | null | CC BY-SA 2.5 | null | 2008-08-29T15:02:13.110 | 2008-08-29T15:02:13.110 | null | null | 3,211 | null |
34,428 | 1 | 35,405 | null | 1 | 393 | Is there a simple way to format numbers in a Winforms 1.1 datagrid? The Format property of the DataGridTextBoxColumn seems to be completely ignored. I know there is a [solution](http://support.microsoft.com/kb/318581) that involves subclassing a Column control, and it's fairly simple, but was hoping there might be so... | How to Format Numbers in WinForms 1.1 DataGrid? | CC BY-SA 3.0 | null | 2008-08-29T15:02:41.953 | 2017-01-28T12:01:42.877 | 2017-01-28T12:01:42.877 | 2,442,804 | 785 | [
"winforms"
] |
34,401 | 1 | 34,435 | null | 90 | 34,331 | Is anyone using Elmah to send exceptions via email? I've got Elmah logging set up via SQL Server, and can view the errors page via the Elmah.axd page, but I am unable to get the email component working. The idea here is to get the email notification so we can react more quickly to exceptions. Here is my web.config (unn... | Send email from Elmah? | CC BY-SA 2.5 | 0 | 2008-08-29T14:56:47.680 | 2012-05-11T14:11:15.100 | null | null | 1,284 | [
".net",
"asp.net",
"elmah"
] |
34,434 | 2 | null | 34,401 | 5 | null | I have used Elmah myself in this configuration and I had to setup the server with SMTP locally. It is a straight-forward install on you local IIS server. This should do the trick.
Good point above, you need the errorMail module BUT if you are not using a remote SMTP server you need SMTP locally, just to clarify.
| null | CC BY-SA 2.5 | null | 2008-08-29T15:04:15.523 | 2008-08-29T15:55:39.567 | 2008-08-29T15:55:39.567 | 2,305 | 2,305 | null |
34,408 | 2 | null | 34,398 | 0 | null | If you want it to be able to hold a character string, I think you have to make the column varchar, or similar.
An alternative could be to have 2 or 3 columns instead of the one value column. Maybe have the three columns, value_type (enum between "number" and "string"), number_value, string_value. Then you could reco... | null | CC BY-SA 2.5 | null | 2008-08-29T14:58:30.187 | 2008-08-29T14:58:30.187 | null | null | 75 | null |
34,418 | 2 | null | 34,328 | 3 | null | As with most "aware" things in Windows, the answer is "Registry".
Take a look at this Microsoft Knowledge Base article: [http://support.microsoft.com/kb/103000](http://support.microsoft.com/kb/103000)
Search for "A Win32 program that can be started by the Service Controller and that obeys the service control protocol... | null | CC BY-SA 2.5 | null | 2008-08-29T15:00:52.333 | 2008-08-29T15:00:52.333 | null | null | null | null |
34,432 | 2 | null | 34,390 | 0 | null | If you are creating composite UserControl, then you can set the [CSSClass](http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.cssclass.aspx) property on the child controls..
If not, then you need to expose properties that are either of the [Style](http://msdn.microsoft.com/en-us/library/syste... | null | CC BY-SA 2.5 | null | 2008-08-29T15:03:37.757 | 2008-08-29T15:03:37.757 | null | null | 832 | null |
34,427 | 2 | null | 34,399 | 1 | null | Did you try `float: left` on your `<li/>`? Something like this:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
ul li {
float: left;
margin-left: 2em;
... | null | CC BY-SA 3.0 | null | 2008-08-29T15:02:37.710 | 2013-06-01T12:51:08.750 | 2013-06-01T12:51:08.750 | 2,156,756 | 909 | null |
34,415 | 2 | null | 34,314 | 0 | null | This is somewhat orthogonal to your question, but I highly recommend the idea of a RESTful search. That is, to perform a search that has never been performed, the website POSTs a query to /searches/. To re-run a search, the website GETs /searches/{some id}
There are some good documents to be found regarding this, fo... | null | CC BY-SA 2.5 | null | 2008-08-29T14:59:47.047 | 2008-08-29T14:59:47.047 | null | null | 1,190 | null |
34,431 | 2 | null | 34,395 | 6 | null | In order to truncate a string to a UTF8 byte array without splitting in the middle of a character I use this:
```
static string Truncate(string s, int maxLength) {
if (Encoding.UTF8.GetByteCount(s) <= maxLength)
return s;
var cs = s.ToCharArray();
int length = 0;
int i = 0;
while (i < cs.Le... | null | CC BY-SA 2.5 | null | 2008-08-29T15:03:27.040 | 2008-08-29T15:03:27.040 | null | null | 321,238 | null |
34,442 | 2 | null | 34,395 | 2 | null | You should be using the Encoding class to do your conversion to byte array correct? All Encoding objects have an overridden method GetMaxCharCount, which will give you "The maximum number of characters produced by decoding the specified number of bytes." You should be able to use this value to trim your string and pr... | null | CC BY-SA 2.5 | null | 2008-08-29T15:05:38.657 | 2008-08-29T15:05:38.657 | null | null | null | null |
34,435 | 2 | null | 34,401 | 79 | null | You need the ErrorMail httpModule.
add this line inside the <httpModules> section
```
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
```
If you're using a remote SMTP server (which it looks like you are) you don't need SMTP on the server.
| null | CC BY-SA 3.0 | null | 2008-08-29T15:04:44.617 | 2012-05-11T14:11:15.100 | 2012-05-11T14:11:15.100 | 29 | 3,543 | null |
34,439 | 1 | 34,452 | null | 642 | 637,095 | Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?
Or if this is not possible, is there at least an easy way to check if it has a particular method, other than checking if an error occurs when the method is called?
| Finding what methods a Python object has | CC BY-SA 4.0 | 0 | 2008-08-29T15:05:17.237 | 2023-01-25T15:36:55.973 | 2023-01-25T15:36:55.973 | 11,985,743 | 3,587 | [
"python",
"introspection"
] |
34,443 | 2 | null | 34,399 | 9 | null | You could also use a background image on the <li> elements, with a padding to keep the text from overlapping it.
```
li {
background-image: url(i/bullet.gif) no-repeat center left;
padding-left: 20px;
display: inline;
}
```
| null | CC BY-SA 3.0 | null | 2008-08-29T15:06:13.523 | 2016-01-14T19:14:07.183 | 2016-01-14T19:14:07.183 | 2,678,454 | 96 | null |
34,444 | 2 | null | 34,413 | 33 | null | I have found that sometimes I get a NoClassDefFound error when code is compiled with an incompatible version of the class found at runtime. The specific instance I recall is with the apache axis library. There were actually 2 versions on my runtime classpath and it was picking up the out of date and incompatible vers... | null | CC BY-SA 2.5 | null | 2008-08-29T15:06:36.923 | 2008-08-29T15:06:36.923 | null | null | 292 | null |
34,448 | 2 | null | 34,395 | 1 | null | Efficient way would be finding how much (pessimistically) bytes you will need per character with
```
Encoding.GetMaxByteCount(1);
```
then dividing your string size by the result, then converting that much characters with
```
public virtual int Encoding.GetBytes (
string s,
int charIndex,
int charCount,
byte[] ... | null | CC BY-SA 2.5 | null | 2008-08-29T15:07:17.483 | 2008-08-29T15:07:17.483 | null | null | 3,205 | null |
34,450 | 2 | null | 34,395 | 1 | null | The Encoding class in .NET has a method called `GetByteCount` which can take in a string or char[]. If you pass in 1 character, it will tell you how many bytes are needed for that 1 character in whichever encoding you are using.
The method `GetMaxByteCount` is faster, but it does a worst case calculation which could r... | null | CC BY-SA 2.5 | null | 2008-08-29T15:08:04.377 | 2008-08-29T15:08:04.377 | null | null | 507 | null |
34,466 | 2 | null | 34,322 | 1 | null | You don't have to have the tester's edition; the Developer Edition works,
I believe with the standard MSDN license, if you have Developer Edition, you can run a single build server with a copy of it. There might be some extra limitations, such as who can run builds on the server; you should review your license agree... | null | CC BY-SA 2.5 | null | 2008-08-29T15:36:11.267 | 2008-08-29T15:36:11.267 | null | null | null | null |
34,463 | 1 | 34,547 | null | 9 | 4,889 | Despite primarily being a windows user, I am a huge fan of rsync. Now, I don't want to argue the virtues of rsync vs any other tool...this is not my point.
The only way I've ever found of running rsync on windows is via a version that is built to run on top of Cygwin, and as Cygwin has issues with Unicode, so does rs... | Technical Hurdles for Win32 rsync port | CC BY-SA 2.5 | 0 | 2008-08-29T15:33:06.687 | 2020-01-23T22:14:32.653 | 2020-01-23T22:14:32.653 | 3,723,423 | 194 | [
"winapi",
"rsync",
"porting"
] |
34,465 | 2 | null | 33,252 | 1 | null | There is a way to do it thru web services, but I have done more with implementing custom event handlers. Here is a bit of code that will do what you want. Keep in mind, you can only execute this from the server, so you may want to wrap this up in a web service to allow access from your embedded devices. Also, you wi... | null | CC BY-SA 2.5 | null | 2008-08-29T15:35:09.350 | 2008-08-29T16:28:52.170 | 2008-08-29T16:28:52.183 | 2,470 | 2,470 | null |
34,453 | 2 | null | 34,394 | 1 | null | You need to think of the XHTML as a hierarchy of elements and treat it as such. This is basically the way XML is meant to be treated. Then just go through the hierarchy recursively, adding the number of words together as you go. When you hit your limit throw everything else away.
I work mainly in PHP, and I would use ... | null | CC BY-SA 2.5 | null | 2008-08-29T15:09:06.493 | 2008-08-29T15:09:06.493 | null | null | 1,349,865 | null |
34,472 | 2 | null | 34,439 | 34 | null | To check if it has a particular method:
```
hasattr(object,"method")
```
| null | CC BY-SA 3.0 | null | 2008-08-29T15:40:05.017 | 2012-07-30T04:12:14.040 | 2012-07-30T04:12:14.040 | 1,288 | null | null |
34,452 | 2 | null | 34,439 | 722 | null | , you can use this code, replacing 'object' with the object you're interested in:
```
object_methods = [method_name for method_name in dir(object)
if callable(getattr(object, method_name))]
```
I discovered it at [diveintopython.net](https://web.archive.org/web/20180901124519/http://www.diveintopytho... | null | CC BY-SA 4.0 | null | 2008-08-29T15:09:05.667 | 2022-05-16T01:18:24.560 | 2022-05-16T01:18:24.560 | 10,794,031 | 3,394 | null |
34,467 | 2 | null | 34,439 | 342 | null | You can use the built in `dir()` function to get a list of all the attributes a module has. Try this at the command line to see how it works.
```
>>> import moduleName
>>> dir(moduleName)
```
Also, you can use the `hasattr(module_name, "attr_name")` function to find out if a module has a specific attribute.
See the [... | null | CC BY-SA 4.0 | null | 2008-08-29T15:36:55.727 | 2022-11-17T14:31:33.230 | 2022-11-17T14:31:33.230 | 1,288 | 1,288 | null |
34,429 | 2 | null | 34,345 | 1 | null | I don't know if this is allowed but the best approximation I can find is:
EDIT: Ok, I think this makes it. Of course I'm treating this as a computing problem, I don't think any prisioner will be able to perform this, although is pretty straight forward if you don't.
Find the first 50 primes, let's asume we hold them ... | null | CC BY-SA 2.5 | null | 2008-08-29T15:02:47.650 | 2008-08-29T18:11:37.103 | 2008-08-29T18:11:37.103 | 2,695 | 2,695 | null |
34,484 | 2 | null | 24,551 | 1 | null | There is a slight performance benefit to setting the value in the declaration. If you set it in the constructor it is actually being set twice (first to the default value, then reset in the ctor).
| null | CC BY-SA 2.5 | null | 2008-08-29T15:47:24.500 | 2008-08-29T15:47:24.500 | null | null | 3,535 | null |