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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,755 | 2 | null | 3,748 | 1 | null | I would personally store the large data outside of the database.
Pros: Stores everything in one please, easy access to data files, easy baskup
Cons: Decreases database performance, many page splits, possible database coruption
| null | CC BY-SA 2.5 | null | 2008-08-06T17:41:26.143 | 2008-08-06T17:41:26.143 | null | null | 383 | null |
3,750 | 2 | null | 3,231 | 1 | null | Check out the open source project [LMMS](http://lmms.sourceforge.net/). It's a music studio for Linux that includes the ability to use MIDI keyboards with software instruments. If you dig around in [source files](http://lmms.sourceforge.net/wiki/index.php?title=Accessing_SVN) with 'midi' in the name, you'll probably fi... | null | CC BY-SA 2.5 | null | 2008-08-06T17:39:02.980 | 2008-08-06T17:39:02.980 | null | null | 432 | null |
3,739 | 1 | null | null | 8 | 5,769 | I have an unusual situation in which I need a SharePoint timer job to both have local administrator windows privileges and to have `SHAREPOINT\System` SharePoint privileges.
I can get the windows privileges by simply configuring the timer service to use an account which is a member of local administrators. I understan... | Sharepoint: executing stsadm from a timer job + SHAREPOINT\System rights | CC BY-SA 3.0 | null | 2008-08-06T17:27:19.883 | 2018-02-22T17:03:00.670 | 2016-12-20T09:21:02.697 | 7,040,547 | null | [
"sharepoint",
"timer",
"privileges",
"stsadm",
"event-viewer"
] |
3,757 | 1 | 3,762 | null | 7 | 521 | I've got the task of displaying a web form to represent the properties in a .NET class. In WinForms, there's a pre-fab control named PropertyGrid that is a lot like what I need. I'm just looking for something to display a simple layout of property names next to an appropriate control like a textbox for strings or a d... | Looking for code to render a form that displays a view of an object | CC BY-SA 3.0 | null | 2008-08-06T17:42:43.613 | 2012-09-11T00:16:02.453 | 2012-09-11T00:16:02.453 | 1,270,384 | 404 | [
"asp.net",
"controls",
"propertygrid"
] |
3,751 | 2 | null | 3,748 | 350 | null | I'm in charge of some applications that manage many TB of images. We've found that storing in the database to be best.
There are a couple of issues:
- - - - - - -
| null | CC BY-SA 2.5 | null | 2008-08-06T17:40:10.387 | 2010-11-20T17:25:42.243 | 2010-11-20T17:25:42.243 | 125,052 | 116 | null |
3,765 | 2 | null | 3,748 | 11 | null | If this is web-based application then there could be advantages to storing the images on a third-party storage delivery network, such as Amazon's S3 or the Nirvanix platform.
| null | CC BY-SA 2.5 | null | 2008-08-06T17:52:51.937 | 2008-08-06T17:52:51.937 | null | null | 381 | null |
3,752 | 2 | null | 3,713 | 18 | null | The [Microsoft AJAX library](http://www.asp.net/ajax/) will accomplish this. You could also create your own solution that involves using AJAX to call your own aspx (as basically) script files to run .NET functions.
I suggest the Microsoft AJAX library. Once installed and referenced, you just add a line in your page lo... | null | CC BY-SA 2.5 | null | 2008-08-06T17:40:32.087 | 2011-02-17T20:14:51.067 | 2011-02-17T20:14:51.067 | 106 | 106 | null |
3,775 | 2 | null | 3,682 | 0 | null | [@Michal](https://stackoverflow.com/questions/3682/sql-distribution-of-table-in-time#3691)
For whatever reason, your example only works when the where @recnum uses a less than operator. I think when the where filters out a row, the rownum doesn't get incremented, and it can't match anything else.
If the original tab... | null | CC BY-SA 2.5 | null | 2008-08-06T18:01:32.733 | 2008-08-14T19:57:29.720 | 2017-05-23T12:02:21.550 | -1 | 75 | null |
3,780 | 2 | null | 3,748 | 39 | null | File paths in the DB is the way to go - I've heard story after story from customers with TB of images that it became a nightmare trying to store any significant amount of images in a DB - the performance hit alone is too much.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:07:46.603 | 2008-08-06T18:17:52.183 | 2008-08-06T18:17:52.183 | 35 | 35 | null |
3,781 | 1 | 3,782 | null | 17 | 2,796 | When prototyping initial GUI functionality with a customer is it better to use a pen/paper drawing or to mock something up using a tool and show them that ?
The argument against a tool generated design being that the customer can sometimes focus on the low-level specifics of the mock-up rather than taking a higher lev... | Prototyping a GUI with a customer | CC BY-SA 2.5 | 0 | 2008-08-06T18:10:23.477 | 2019-02-22T11:00:35.017 | null | null | 381 | [
"user-interface",
"prototyping"
] |
3,764 | 2 | null | 3,748 | 3 | null | Second the recommendation on file paths. I've worked on a couple of projects that needed to manage large-ish asset collections, and any attempts to store things directly in the DB resulted in pain and frustration long-term.
The only real "pro" I can think of regarding storing them in the DB is the potential for easy o... | null | CC BY-SA 2.5 | null | 2008-08-06T17:51:00.053 | 2008-08-06T17:51:00.053 | null | null | null | null |
3,779 | 2 | null | 1,644 | 1 | null | This isn't necessarily something you can pop on your iPod and just chill to, but [Diggnation](http://diggnation.com) is a hillarious video podcast with Kevin Rose and Alex Albrecht.
They talk about "some of the top stories on the user-submitted news site digg.com". This doesn't really have much in the way of software... | null | CC BY-SA 2.5 | null | 2008-08-06T18:07:16.543 | 2009-08-20T19:49:09.673 | 2009-08-20T19:49:09.673 | 63,550 | 50 | null |
3,784 | 2 | null | 3,781 | 3 | null | There is a book called [Paper Prototyping](https://rads.stackoverflow.com/amzn/click/com/1558608702) which details pen and paper drawing and what you can gain from it. I think it has a lot of benefits, particularly that you can, very early on (and easily), modify what the end result will be without much effort, and th... | null | CC BY-SA 2.5 | null | 2008-08-06T18:12:33.707 | 2008-08-06T18:12:33.707 | null | null | 122 | null |
3,777 | 2 | null | 3,713 | 99 | null | Well, if you don't want to do it using Ajax or any other way and just want a normal ASP.NET postback to happen, here is how you do it (without using any other libraries):
i. In your code file (assuming you are using C# and .NET 2.0 or later) add the following Interface to your Page class to make it look like
```
pu... | null | CC BY-SA 3.0 | null | 2008-08-06T18:04:25.270 | 2016-12-09T17:26:30.197 | 2016-12-09T17:26:30.197 | 63,550 | 384 | null |
3,785 | 2 | null | 3,625 | 0 | null | You should probably just use the standard ASP.Net LinkButton, unless it's really missing something you need.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:12:58.013 | 2008-08-06T18:12:58.013 | null | null | 35 | null |
3,762 | 2 | null | 3,757 | 8 | null | [ASP.Net PropertyGrid](http://www.codeplex.com/PropertyGrid)
| null | CC BY-SA 2.5 | null | 2008-08-06T17:49:03.943 | 2008-08-06T17:49:03.943 | null | null | 35 | null |
3,782 | 2 | null | 3,781 | 16 | null | Always start with paper or paper-like mock-ups first. You do not want to fall into a trap of giving the impression of completeness when the back-end is completely hollow.
A polished prototype or pixel-perfect example puts too much emphasis on the design. With an obvious sketch, you have a better shot of discussing d... | null | CC BY-SA 2.5 | null | 2008-08-06T18:10:56.317 | 2008-08-06T18:17:48.970 | 2008-08-06T18:17:48.970 | 83 | 83 | null |
3,794 | 2 | null | 3,793 | 0 | null | Is it possible to use the System.Xml namespace objects to get the job done here instead of using LINQ? As you already mentioned, XmlNode.InnerXml is exactly what you need.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:20:18.903 | 2008-08-06T18:36:39.527 | 2008-08-06T18:36:39.527 | 35 | 35 | null |
3,795 | 2 | null | 3,725 | 2 | null | Greg Hurlman wrote:
> Why not just show/hide the proper container when a node is selected in the grid? Have the containers all sized appropriately in the same spot, and hide all but the default, which would be preselected in the grid on load.
Unfortunately, that's what I'm trying to avoid. I'm looking for an easy way... | null | CC BY-SA 2.5 | null | 2008-08-06T18:20:29.947 | 2008-08-06T18:20:29.947 | null | null | 551 | null |
3,790 | 1 | 3,833 | null | 4 | 2,142 | I've been working on a project that accesses the WMI to get information about the software installed on a user's machine. We've been querying Win32_Product only to find that it doesn't exist in 64-bit versions of Windows because it's an ["optional component"](http://msdn.microsoft.com/en-us/library/aa392726(VS.85).aspx... | Is there a WMI Redistributable Package? | CC BY-SA 3.0 | null | 2008-08-06T18:15:43.357 | 2013-01-09T05:36:53.420 | 2013-01-09T05:36:53.420 | 1,471,203 | 560 | [
"windows",
"64-bit",
"wmi"
] |
3,800 | 2 | null | 3,781 | 2 | null | For the first draft, I prefer to use graph paper (the stuff with a grid printed on it) and a pencil. The graph paper is great for helping to maintain proportions. Once the client and I have come to a conclusion I'll usually fill in the drawing with pen since pencil is prone to fading.
When I actually get around ... | null | CC BY-SA 2.5 | null | 2008-08-06T18:26:45.987 | 2008-08-06T18:26:45.987 | null | null | 37 | null |
3,793 | 1 | 1,704,579 | null | 153 | 88,038 | What's the best way to get the contents of the mixed `body` element in the code below? The element might contain either XHTML or text, but I just want its contents in string form. The `XmlElement` type has the `InnerXml` property which is exactly what I'm after.
The code as written does what I want, but includes th... | Best way to get InnerXml of an XElement? | CC BY-SA 3.0 | 0 | 2008-08-06T18:16:55.853 | 2018-10-25T19:07:28.277 | 2015-05-30T08:04:33.173 | 1,743,997 | 205 | [
".net",
"xml",
"xelement",
"innerxml"
] |
3,799 | 2 | null | 3,793 | 2 | null | @Greg: It appears you've edited your answer to be a completely different answer. To which my answer is yes, I could do this using System.Xml but was hoping to get my feet wet with LINQ to XML.
I'll leave my original reply below in case anyone else wonders why I can't just use the XElement's .Value property to get wha... | null | CC BY-SA 2.5 | null | 2008-08-06T18:25:08.877 | 2008-08-07T02:18:19.017 | 2008-08-07T02:18:19.017 | 205 | 205 | null |
3,801 | 1 | 3,824 | null | 11 | 3,571 | The discussion of Dual vs. Quadcore is as old as the Quadcores itself and the answer is usually "it depends on your scenario". So here the scenario is a Web Server (Windows 2003 (not sure if x32 or x64), 4 GB RAM, IIS, ASP.net 3.0).
My impression is that the CPU in a Webserver does not need to be THAT fast because req... | More vs. Faster Cores on a Webserver | CC BY-SA 3.0 | 0 | 2008-08-06T18:28:04.987 | 2012-10-24T22:44:31.930 | 2012-10-24T22:44:31.930 | 91 | 91 | [
"asp.net",
"windows",
"iis",
"hardware"
] |
3,798 | 1 | null | null | 20 | 2,912 | Currently I have two Linux servers running MySQL, one sitting on a rack right next to me under a 10 Mbit/s upload pipe (main server) and another some couple of miles away on a 3 Mbit/s upload pipe (mirror).
I want to be able to replicate data on both servers continuously, but have run into several roadblocks. One of t... | Full complete MySQL database replication? Ideas? What do people do? | CC BY-SA 3.0 | 0 | 2008-08-06T18:24:42.887 | 2016-09-30T04:48:33.647 | 2016-09-30T04:48:33.647 | 116 | 547 | [
"mysql",
"oracle",
"replication"
] |
3,776 | 2 | null | 3,725 | 11 | null | A tidier way is to create separate forms for each 'pane' and, in each form constructor, set
```
this.TopLevel = false;
this.FormBorderStyle = FormBorderStyle.None;
this.Dock = DockStyle.Fill;
```
That way, each of these forms can be laid out in its own designer, instantiated one or more times at runtime, and added t... | null | CC BY-SA 3.0 | null | 2008-08-06T18:02:31.480 | 2016-01-17T12:49:42.543 | 2016-01-17T12:49:42.543 | 490,018 | 82 | null |
3,804 | 2 | null | 3,798 | 0 | null | [GoldenGate](http://www.goldengate.com/) is a very good solution, but probably as expensive as the MySQL replicator.
It basically tails the journal, and applies changes based on what's committed. They support bi-directional replication (a hard task), and replication between heterogenous systems.
Since they work by p... | null | CC BY-SA 2.5 | null | 2008-08-06T18:30:45.950 | 2008-08-06T18:30:45.950 | null | null | 116 | null |
3,806 | 2 | null | 1,329 | 1 | null | Besides the already mentioned Robocopy, [XXCOPY](http://www.xxcopy.com) has a free version. Its syntax is backwards compatible with XCOPY, but has tons of additional options (XXCOPY /HELP > x create a 42kb file with all the options available). For instance, you can delete files with it, include or exclude a list of dir... | null | CC BY-SA 2.5 | null | 2008-08-06T18:31:21.300 | 2008-08-06T18:31:21.300 | null | null | 394 | null |
3,772 | 2 | null | 3,748 | 35 | null | In my experience, sometimes the simplest solution is to . So it's easy to find the image that belongs to a particular record, and vice versa. But at the same time you're not storing about the image in the database.
| null | CC BY-SA 2.5 | null | 2008-08-06T17:59:59.380 | 2008-08-06T17:59:59.380 | null | null | 437 | null |
3,786 | 2 | null | 3,781 | 2 | null | A basic paper version is the way to go for an initial mock-up. It's been my experience that if you do a "real" mock-up, even if you explain to the customer that it's a non-functional mock-up, they are confused when things don't work.
Bottom line: keep it as simple as possible. If it's on paper, there is no way the c... | null | CC BY-SA 2.5 | null | 2008-08-06T18:14:14.313 | 2008-08-06T18:14:14.313 | null | null | 423 | null |
3,802 | 1 | 3,874 | null | 8 | 434 | What is the best way to typeset a function with arguments for readibility, brevity, and accuracy? I tend to put empty parentheses after the function name like `func()`, even if there are actually arguments for the function. I have trouble including the arguments and still feeling like the paragraph is readable.
Any t... | How do you typeset code elements in normal text? | CC BY-SA 3.0 | null | 2008-08-06T18:28:38.573 | 2012-12-04T07:39:07.077 | 2012-12-04T07:39:07.077 | 1,136,709 | 59 | [
"language-agnostic",
"format"
] |
3,812 | 2 | null | 3,809 | 5 | null | There is an option in the Print Dialog to do the same (in VS 2005 and 2008 atleast)!
| null | CC BY-SA 2.5 | null | 2008-08-06T18:35:41.400 | 2008-08-06T18:35:41.400 | null | null | 384 | null |
3,818 | 2 | null | 3,748 | 17 | null | At a company where I used to work we stored 155 million images in an Oracle 8i (then 9i) database. 7.5TB worth.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:37:17.573 | 2008-08-06T18:37:17.573 | null | null | 342 | null |
3,811 | 2 | null | 3,801 | 3 | null | We use apache on linux, which forks a process to handle requests. We've found that more cores help our throughput, since they reduce the latency of processes waiting to be placed on the run queue. I don't have much experience with IIS, but I imagine the same scenario applies with its thread pool.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:33:50.530 | 2008-08-06T18:33:50.530 | null | null | 116 | null |
3,809 | 1 | 3,812 | null | 11 | 1,451 | How can I get line numbers to `print` in when printing `code` listings?
| Setup Visual Studio 2005 to print line numbers | CC BY-SA 3.0 | null | 2008-08-06T18:32:37.957 | 2013-12-25T18:10:30.060 | 2013-12-25T18:10:30.060 | 1,796,061 | 479 | [
"visual-studio",
"visual-studio-2005",
"line-numbers"
] |
3,807 | 2 | null | 3,802 | 1 | null | I would simply be a little more careful with the name of my variables and parameters, most people will then be able to guess much more accurately what type of data you want to hold in it.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:31:49.923 | 2008-08-06T18:31:49.923 | null | null | 1,384,652 | null |
3,810 | 2 | null | 3,809 | 7 | null | Isn't there an option in the Print Dialog?
Edit: There is. Go to File => Print, and then in the bottom left there is "Print what" and then "Include line Numbers"
| null | CC BY-SA 2.5 | null | 2008-08-06T18:33:28.830 | 2008-08-06T18:33:28.830 | null | null | 91 | null |
3,823 | 1 | 3,848 | null | 32 | 13,941 | One simple method I've used in the past is basically just creating a second table whose structure mirrors the one I want to audit, and then create an update/delete trigger on the main table. Before a record is updated/deleted, the current state is saved to the audit table via the trigger.
While effective, the data in... | Suggestions for implementing audit tables in SQL Server? | CC BY-SA 3.0 | 0 | 2008-08-06T18:39:33.560 | 2016-05-07T03:13:05.320 | 2016-05-07T03:13:05.320 | 116 | 423 | [
"sql",
"sql-server",
"database",
"audit"
] |
3,825 | 2 | null | 3,801 | 3 | null | Mark Harrison said:
> I don't have much experience with IIS, but I imagine the same scenario applies with its thread pool.
Indeed - more cores = more threads running concurrently. IIS is inherently multithreaded, and takes easy advantage of this.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:40:39.813 | 2008-08-06T18:40:39.813 | null | null | 35 | null |
3,824 | 2 | null | 3,801 | 16 | null | For something like a webserver, dividing up the tasks of handling each connection is (relatively) easy. I say it's safe to say that web servers is one of the most common (and ironed out) uses of parallel code. And since you are able to split up much of the processing into multiple discrete threads, more cores actuall... | null | CC BY-SA 2.5 | null | 2008-08-06T18:40:08.393 | 2008-08-06T18:40:08.393 | null | null | 194 | null |
3,805 | 2 | null | 3,801 | 1 | null | The more the better. As programming languages start to become more complex and abstract, the more processing power that will be required.
Atleat Jeff believes [Quadcore is better](https://blog.stackoverflow.com/2008/04/our-dedicated-server/).
| null | CC BY-SA 4.0 | null | 2008-08-06T18:31:14.793 | 2008-08-06T18:31:14.793 | 2021-01-18T12:39:36.810 | -1 | 383 | null |
3,836 | 2 | null | 3,748 | 27 | null | Small static images (not more than a couple of megs) that are not frequently edited, should be stored in the database. This method has several benefits including easier portability (images are transferred with the database), easier backup/restore (images are backed up with the database) and better scalability (a file s... | null | CC BY-SA 2.5 | null | 2008-08-06T18:46:49.270 | 2008-08-06T18:46:49.270 | null | null | 373 | null |
3,829 | 2 | null | 1,329 | 2 | null | Powershell scripts might be useful too and surely more flexible than and other DOS commands. You can easily recurse through sub-directories, filter your files by name or extensions, treat especially some particular files based on the criteria of your choice, etc. The [Powershell community web site](http://www.powershe... | null | CC BY-SA 2.5 | null | 2008-08-06T18:43:21.617 | 2008-08-06T18:43:21.617 | null | null | 563 | null |
3,852 | 2 | null | 3,839 | 2 | null | Can you do it as a subselect, something like
```
SELECT * FROM (
SELECT A,B,C FROM table WHERE field LIKE 'query%'
UNION
SELECT A,B,C FROM table WHERE field LIKE '%query'
UNION
SELECT A,B,C FROM table WHERE field LIKE '%query%'
) ORDER BY B ASC LIMIT 5
```
| null | CC BY-SA 4.0 | null | 2008-08-06T18:54:23.157 | 2019-01-23T17:49:15.767 | 2019-01-23T17:49:15.767 | 2,652,441 | 116 | null |
3,848 | 2 | null | 3,823 | 19 | null | How much writing vs. reading of this table(s) do you expect?
I've used a single audit table, with columns for Table, Column, OldValue, NewValue, User, and ChangeDateTime - generic enough to work with any other changes in the DB, and while a LOT of data got written to that table, reports on that data were sparse enough... | null | CC BY-SA 2.5 | null | 2008-08-06T18:51:48.793 | 2008-08-06T19:35:51.713 | 2008-08-06T19:35:51.713 | 35 | 35 | null |
3,831 | 1 | 3,855 | null | 12 | 2,891 | I need to detect when a session has expired in my Visuial Basic web application. This is what I'm using...
```
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If CurrentSession.IsNew AndAlso (Not Page.Request.Headers("Cookie") Is Nothing) AndAlso (Page.Request.Headers... | How do I best detect an ASP.NET expired session? | CC BY-SA 3.0 | 0 | 2008-08-06T18:44:06.857 | 2013-05-18T04:51:11.230 | 2013-05-18T04:51:11.230 | 1,012,641 | 83 | [
"asp.net",
"http",
"session"
] |
3,853 | 2 | null | 3,839 | 0 | null | If there isn't a sort that makes sense to order them you desire, don't union the results together - just return 3 separate recordsets, and deal with them accordingly in your data tier.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:54:27.587 | 2008-08-06T18:54:27.587 | null | null | 35 | null |
3,833 | 2 | null | 3,790 | 2 | null | You didn't mention for what OS, but the [WMI Redistributable Components version 1.0](http://www.microsoft.com/downloads/details.aspx?familyid=013BB284-3946-44A9-AC3C-BF2A569EAA72&displaylang=en) definitely exists.
For Windows Server 2003, the WMI SDK and redistributables are part of the [Server SDK](http://www.microso... | null | CC BY-SA 2.5 | null | 2008-08-06T18:44:55.373 | 2008-08-06T19:15:47.857 | 2008-08-06T19:15:47.857 | 35 | 35 | null |
3,845 | 2 | null | 3,823 | 1 | null | Are there any built-in audit packages? Oracle has a nice package, which will even send audit changes off to a separate server outside the access of any bad guy who is modifying the SQL.
Their example is awesome... it shows how to alert on anybody modifying the audit tables.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:49:23.150 | 2008-08-06T18:49:23.150 | null | null | 116 | null |
3,855 | 2 | null | 3,831 | 10 | null | Try the following
```
If Session("whatever") IsNot Nothing Then
```
| null | CC BY-SA 3.0 | null | 2008-08-06T18:55:57.693 | 2013-05-18T04:49:53.537 | 2013-05-18T04:49:53.537 | 1,012,641 | 26 | null |
3,839 | 1 | 3,860 | null | 21 | 12,847 | I'm trying out the following query:
```
SELECT A,B,C FROM table WHERE field LIKE 'query%'
UNION
SELECT A,B,C FROM table WHERE field LIKE '%query'
UNION
SELECT A,B,C FROM table WHERE field LIKE '%query%'
GROUP BY B ORDER BY B ASC LIMIT 5
```
That's three queries stuck together, kinda sorta. However, the result set th... | How do I Concatenate entire result sets in MySQL? | CC BY-SA 3.0 | null | 2008-08-06T18:47:24.137 | 2019-06-26T08:13:56.990 | 2018-06-06T07:55:28.830 | 1,864,029 | 547 | [
"mysql",
"sql",
"union"
] |
3,854 | 2 | null | 3,839 | 7 | null | Add an additional column with hard-coded values that you will use to sort the overall resultset, like so:
```
SELECT A,B,C,1 as [order] FROM table WHERE field LIKE 'query%'
UNION
SELECT A,B,C,2 as [order] FROM table WHERE field LIKE '%query'
UNION
SELECT A,B,C,3 as [order] FROM table WHERE field LIKE '%query%'
GROUP B... | null | CC BY-SA 2.5 | null | 2008-08-06T18:55:45.243 | 2008-08-06T18:55:45.243 | null | null | 51 | null |
3,856 | 1 | 3,880 | null | 7 | 3,416 | I wrote a component that displays a filename, a thumbnail and has a button to load/play the file. The component is databound to a repeater. How can I make it so that the button event fires to the main application and tells it which file to play?
| Adobe Flex component events | CC BY-SA 3.0 | null | 2008-08-06T18:57:38.313 | 2012-01-22T00:59:24.987 | 2012-01-22T00:59:24.987 | 1,154,847 | 26 | [
"apache-flex",
"actionscript-3"
] |
3,860 | 2 | null | 3,839 | 16 | null | Maybe you should try including a fourth column, stating the table it came from, and then order and group by it:
```
SELECT A,B,C, "query 1" as origin FROM table WHERE field LIKE 'query%'
UNION
SELECT A,B,C, "query 2" as origin FROM table WHERE field LIKE '%query'
UNION
SELECT A,B,C, "query 3" as origin FROM table WHER... | null | CC BY-SA 2.5 | null | 2008-08-06T18:59:36.467 | 2008-08-06T18:59:36.467 | null | null | 431 | null |
3,859 | 1 | 3,865 | null | 22 | 13,815 | After being told by at least 10 people on SO that version control was a good thing even if it's just me I now have a followup question.
What is the difference between all the different types of version control and is there a guide that anybody knows of for version control that's very simple and easy to understand?
| What is the difference between all the different types of version control? | CC BY-SA 2.5 | 0 | 2008-08-06T18:58:53.707 | 2023-01-25T07:30:50.533 | 2023-01-25T07:30:50.533 | 116 | 1,384,652 | [
"version-control",
"language-agnostic"
] |
3,861 | 2 | null | 2,658 | 4 | null | Also try out [visual svn](http://www.visualsvn.com/) for your server if you want to avoid any command line work.
| null | CC BY-SA 2.5 | null | 2008-08-06T18:59:40.167 | 2008-08-06T18:59:40.167 | null | null | 370 | null |
3,867 | 1 | 3,941 | null | 11 | 4,708 | I think most people here understand the importance of fully automated builds.
The problem is one of our project is now using an integrated Visual Studio Setup project (vdproj) and has recently been ported to Visual Studio 2008. Unfortunatly, those won't build in MSBuild and calling devenv.exe /build on 2008 just crash... | Automated release script and Visual Studio Setup projects | CC BY-SA 3.0 | 0 | 2008-08-06T19:04:51.823 | 2022-12-21T15:03:11.837 | 2011-11-21T01:34:34.290 | 1,288 | 42 | [
"visual-studio",
"msbuild",
"wix",
"build-automation",
"vdproj"
] |
3,827 | 2 | null | 3,486 | 2 | null | I'm not sure if I can solve this in one go, but we can go back and forth as necessary.
First, I want to repeat what I think you are saying and make sure I'm clear. You want to disallow requests to servlet1 and servlet2 is the request doesn't have the proper referer and it have a query string? I'm not sure I underst... | null | CC BY-SA 2.5 | null | 2008-08-06T18:41:13.057 | 2008-08-06T18:41:13.057 | null | null | 430 | null |
3,865 | 2 | null | 3,859 | 15 | null | Eric Sink has a [good overview of source control](http://www.ericsink.com/scm/source_control.html). There are also some [existing](https://stackoverflow.com/questions/871/why-is-git-better-than-subversion) [questions](https://stackoverflow.com/questions/2658/version-control-getting-started) here on SO.
| null | CC BY-SA 2.5 | null | 2008-08-06T19:02:28.303 | 2008-08-06T19:02:28.303 | 2017-05-23T12:02:29.837 | -1 | 100 | null |
3,868 | 1 | 3,958 | null | 26 | 3,605 | I'm downloading a web page (tag soup HTML) with XMLHttpRequest and I want to take the output and turn it into a DOM object that I can then run XPATH queries on. How do I convert from a string into DOM object?
It appears that the general solution is to create a hidden iframe and throw the contents of the string into tha... | How can I turn a string of HTML into a DOM object in a Firefox extension? | CC BY-SA 4.0 | 0 | 2008-08-06T19:08:19.290 | 2021-01-09T17:15:26.073 | 2021-01-09T17:15:26.073 | 10,607,772 | 163 | [
"javascript",
"firefox",
"dom"
] |
3,871 | 2 | null | 3,868 | 6 | null |
```
var request = new XMLHttpRequest();
request.overrideMimeType( 'text/xml' );
request.onreadystatechange = process;
request.open ( 'GET', url );
request.send( null );
function process() {
if ( request.readyState == 4 && request.status == 200 ) {
var xml = request.responseXML;
}
}
```
Notice the... | null | CC BY-SA 3.0 | null | 2008-08-06T19:13:13.930 | 2018-04-05T20:35:16.473 | 2018-04-05T20:35:16.473 | 7,600,492 | 402 | null |
3,869 | 2 | null | 3,859 | 20 | null | We seem to be in the golden age of version control, with a ton of choices, all of which have their pros and cons.
Here are the ones I see most used:
- - - - - - - -
My recommendation: you're safest with either git, svn or perforce, since a lot of people use them, they are cross platform, have good guis, you can buy... | null | CC BY-SA 2.5 | null | 2008-08-06T19:10:51.687 | 2008-08-31T20:17:40.137 | 2008-08-31T20:17:40.137 | 116 | 116 | null |
3,864 | 2 | null | 3,859 | 5 | null | I would start with:
- [A Visual Guide to Version Control](http://betterexplained.com/articles/a-visual-guide-to-version-control/)- [Wikipedia](http://en.wikipedia.org/wiki/Revision_control)
Then once you have read up on it, download and install [SVN](http://subversion.tigris.org/), [TortoiseSVN](http://tortoisesvn.ti... | null | CC BY-SA 2.5 | null | 2008-08-06T19:02:22.203 | 2008-08-06T19:02:22.203 | null | null | 51 | null |
3,873 | 2 | null | 3,859 | 1 | null | If you are working by yourself in a Windows environment, then the [single user license](http://www.sourcegear.com/faq.html) for SourceGear's Vault is free.
| null | CC BY-SA 2.5 | null | 2008-08-06T19:15:30.227 | 2008-08-06T19:15:30.227 | null | null | 206 | null |
3,874 | 2 | null | 3,802 | 3 | null | I usually take that approach, but if I feel like it's going to cause confusion, I'll use ellipses like: `myFunction(...)`
I guess if I were good, I would use those time I was omitting parameters from a function in text.
| null | CC BY-SA 2.5 | null | 2008-08-06T19:16:06.403 | 2008-08-06T19:16:06.403 | null | null | 93 | null |
3,872 | 2 | null | 3,781 | 13 | null | The ["Napkin Look & Feel"](http://napkinlaf.sourceforge.net/) for Java is really cool for prototyping. An actual, functioning, clickable app that looks like it was drawn on a napkin. Check out this screenshot:

Seriously, how cool is that?
| null | CC BY-SA 3.0 | null | 2008-08-06T19:13:15.363 | 2012-03-28T19:56:38.563 | 2012-03-28T19:56:38.563 | 1,219,121 | 551 | null |
3,880 | 2 | null | 3,856 | 1 | null | On your custom component you can listen to the button click event and then generate a custom event that holds information about the file you want to play. You can then set the bubbles property to true on the event and dispatch the custom event from your custom component. The bubbles property will make your event float ... | null | CC BY-SA 2.5 | null | 2008-08-06T19:25:37.400 | 2008-08-06T19:25:37.400 | null | null | 453 | null |
3,862 | 2 | null | 3,859 | 5 | null | Version Control is essential to development, even if you're working by yourself because it protects you from yourself. If you make a mistake, it's a simple matter to rollback to a previous version of your code that you know works. This also frees you to explore and experiment with your code because you're free of havin... | null | CC BY-SA 2.5 | null | 2008-08-06T19:00:23.050 | 2008-08-06T19:17:10.630 | 2008-08-06T19:17:10.630 | 306 | 306 | null |
3,876 | 2 | null | 3,839 | 0 | null | I eventually (looking at all suggestions) came to this solution, its a bit of a compromise between what I need and time.
```
SELECT * FROM
(SELECT A, B, C, "1" FROM table WHERE B LIKE 'query%' LIMIT 3
UNION
SELECT A, B, C, "2" FROM table WHERE B LIKE '%query%' LIMIT 5)
AS RS
GROUP BY B
ORDER BY 1 DESC
```
i... | null | CC BY-SA 3.0 | null | 2008-08-06T19:19:53.993 | 2013-01-09T05:36:23.250 | 2013-01-09T05:36:23.250 | 1,471,203 | 547 | null |
3,885 | 2 | null | 3,859 | 3 | null | The [answer](https://stackoverflow.com/questions/2658/version-control-getting-started#2668) to [another question](https://stackoverflow.com/questions/2658/version-control-getting-started) also applies here, most importantly
> [Jon Works](https://stackoverflow.com/users/413/jon-works) said:
The most important thing ... | null | CC BY-SA 2.5 | null | 2008-08-06T19:29:10.153 | 2008-08-06T19:29:10.153 | 2017-05-23T12:17:53.783 | -1 | 117 | null |
3,894 | 1 | 3,897 | null | 10 | 15,920 | Given the constraint of only using T-Sql in Sql Server 2005, is there a better way to remove the decimal point from a money datatype than a conversion to a varchar (here implicitly) and then a replace of the decimal point?
Here is what I have currently.
```
SELECT REPLACE(1.23, '.', ''), REPLACE(19.99, '.', '')
```
... | T-Sql Remove Decimal Point From Money Data Type | CC BY-SA 2.5 | null | 2008-08-06T19:34:47.910 | 2017-08-30T16:03:16.760 | 2014-11-25T20:41:09.120 | 2,641,576 | 76 | [
"sql-server",
"tsql",
"sql-server-2005"
] |
3,889 | 2 | null | 371 | 7 | null | I have had the same problem in the past on many sites I have done here at work. The only guaranteed method of making sure the user gets the email is to advise the user to add you to there safe list. Any other method is really only going to be something that can help with it and isn't guaranteed.
| null | CC BY-SA 2.5 | null | 2008-08-06T19:31:01.397 | 2008-08-06T19:31:01.397 | null | null | 567 | null |
3,890 | 2 | null | 3,881 | 18 | null | If it's a `setter` method and `null` is being passed to it, I think it would make more sense to throw an `IllegalArgumentException`. A `NullPointerException` seems to make more sense in the case where you're attempting to actually use the `null`.
So, if you're using it and it's `null`, `NullPointer`. If it's being pas... | null | CC BY-SA 3.0 | null | 2008-08-06T19:31:11.070 | 2016-08-30T10:11:03.347 | 2016-08-30T10:11:03.347 | 2,014,130 | 560 | null |
3,886 | 2 | null | 3,881 | 314 | null | It seems like an `IllegalArgumentException` is called for if you don't want `null` to be an allowed value, and the `NullPointerException` would be thrown if you were trying to a variable that turns out to be `null`.
| null | CC BY-SA 3.0 | null | 2008-08-06T19:29:24.427 | 2017-05-14T11:46:06.437 | 2017-05-14T11:46:06.437 | null | 35 | null |
3,897 | 2 | null | 3,894 | 7 | null | Multiply by 100 and then convert to an int.
| null | CC BY-SA 2.5 | null | 2008-08-06T19:37:14.940 | 2008-08-06T19:37:14.940 | null | null | 51 | null |
3,896 | 2 | null | 3,793 | 7 | null | I ended up using this:
```
Body = t.Element("body").Nodes().Aggregate("", (b, node) => b += node.ToString());
```
| null | CC BY-SA 2.5 | null | 2008-08-06T19:36:02.667 | 2008-08-07T10:10:16.130 | 2008-08-07T10:10:16.130 | 1 | 205 | null |
3,878 | 2 | null | 3,856 | 1 | null | Figured it out (finally)
Custom Component
```
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" x="0" y="0" width="215" height="102" styleName="leftListItemPanel" backgroundColor="#ECECEC" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Script>
<, so you can switch to a provider that supports SSL, and swit... | null | CC BY-SA 2.5 | null | 2008-08-06T19:37:27.733 | 2008-08-06T19:37:27.733 | null | null | 521 | null |
3,909 | 2 | null | 3,903 | 1 | null | Looking into the registry is perfectly valid, so long as you can be sure that the user of the application will always have access to what you need.
| null | CC BY-SA 2.5 | null | 2008-08-06T19:48:05.153 | 2008-08-06T20:05:55.040 | 2008-08-06T20:05:55.040 | 35 | 35 | null |
3,913 | 2 | null | 1,276 | 19 | null | It's kind of pointless to talk about "database performance", "query performance" is a better term here. And the answer is: it depends on the query, data that it operates on, indexes, hardware, etc. You can get an idea of how many rows are going to be scanned and what indexes are going to be used with EXPLAIN syntax.
... | null | CC BY-SA 2.5 | null | 2008-08-06T19:53:54.580 | 2008-08-06T19:53:54.580 | null | null | 556 | null |
3,881 | 1 | 3,886 | null | 568 | 192,806 | I have a simple setter method for a property and `null` is not appropriate for this particular property. I have always been torn in this situation: should I throw an [IllegalArgumentException](http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html), or a [NullPointerException](http://docs.orac... | IllegalArgumentException or NullPointerException for a null parameter? | CC BY-SA 3.0 | 0 | 2008-08-06T19:26:30.627 | 2022-10-04T15:47:45.330 | 2014-01-17T12:18:34.950 | 3,156,863 | 122 | [
"java",
"exception",
"null",
"nullpointerexception",
"illegalargumentexception"
] |
3,911 | 2 | null | 3,903 | 8 | null | Take a look at Raymond Chens solution:
[How to detect programmatically whether you are running on 64-bit Windows](http://blogs.msdn.com/oldnewthing/archive/2005/02/01/364563.aspx)
and here's the PINVOKE for .NET:
[IsWow64Process (kernel32)](http://www.pinvoke.net/default.aspx/kernel32/IsWow64Process.html?diff=y)
I... | null | CC BY-SA 3.0 | null | 2008-08-06T19:49:35.727 | 2013-01-27T12:44:17.973 | 2013-01-27T12:44:17.973 | null | 419 | null |
3,895 | 2 | null | 3,859 | 6 | null | To everyone just starting using version control:
Use git (or hg or bzr) because they are for managing source code than SVN.
I used SVN for a few years at work, and switched over to git 6 months ago. Without learning SVN first I would be totaly lost when it comes to using a DVCS.
For people just starting out with ... | null | CC BY-SA 2.5 | null | 2008-08-06T19:34:49.940 | 2008-08-06T19:49:57.023 | 2008-08-06T19:49:57.037 | 309,844 | 309,844 | null |
3,902 | 2 | null | 3,839 | 1 | null | SELECT distinct a,b,c FROM (
SELECT A,B,C,1 as o FROM table WHERE field LIKE 'query%'
UNION
SELECT A,B,C,2 as o FROM table WHERE field LIKE '%query'
UNION
SELECT A,B,C,3 as o FROM table WHERE field LIKE '%query%'
)
ORDER BY o ASC LIMIT 5
Would be my way of doing it. I d... | null | CC BY-SA 2.5 | null | 2008-08-06T19:41:52.607 | 2008-08-06T19:49:52.013 | 2008-08-06T19:49:52.013 | 86 | 86 | null |
3,915 | 2 | null | 3,823 | 1 | null | [OmniAudit](http://www.krell-software.com/omniaudit/) might be a good solution for you need. I've never used it before because I'm quite happy writing my own audit routines, but it sounds good.
| null | CC BY-SA 2.5 | null | 2008-08-06T19:56:14.763 | 2008-08-06T19:56:14.763 | null | null | 383 | null |
3,899 | 2 | null | 3,894 | 0 | null | Could you be a little more specific about the use case? Removing the decimal point from the representation is a little unusual given that you'll lose all information about the scale. Are you assuming that there will always be two digits? If so, you could simplify multiply by 100 and then round before converting to a... | null | CC BY-SA 2.5 | null | 2008-08-06T19:38:38.993 | 2008-08-06T19:38:38.993 | null | null | 533 | null |
3,903 | 1 | 3,911 | null | 22 | 5,913 | Since the WMI class Win32_OperatingSystem only includes OSArchitecture in Windows Vista, I quickly wrote up a method using the registry to try and determine whether or not the current system is a 32 or 64bit system.
```
private Boolean is64BitOperatingSystem()
{
RegistryKey localEnvironment = Registry.LocalMachine... | Is this a good way to determine OS Architecture? | CC BY-SA 3.0 | 0 | 2008-08-06T19:41:59.813 | 2016-02-07T17:39:31.450 | 2016-02-07T17:39:31.450 | 2,921,691 | 560 | [
"c#",
"windows",
"registry"
] |
3,919 | 2 | null | 3,903 | 1 | null | The easiest way to test for 64-bit under .NET is to check the value of IntPtr.Size.
EDIT: Doh! This will tell you whether or not the current process is 64-bit, not the OS as a whole. Sorry!
| null | CC BY-SA 2.5 | null | 2008-08-06T20:01:58.450 | 2008-08-06T20:01:58.450 | null | null | 533 | null |
3,931 | 2 | null | 3,927 | 2 | null | I've worked with RedGate's profiler in the past. Did the job for me.
| null | CC BY-SA 2.5 | null | 2008-08-06T20:17:06.280 | 2008-08-06T20:17:06.280 | null | null | 419 | null |
3,934 | 2 | null | 3,927 | 12 | null | [ANTS Profiler](http://www.red-gate.com/products/ants_profiler/index.htm). I haven't used many, but I don't really have any complaints about ANTS. The visualization is really helpful.
| null | CC BY-SA 2.5 | null | 2008-08-06T20:19:00.253 | 2008-08-06T20:19:00.253 | null | null | 521 | null |
3,932 | 2 | null | 3,927 | 9 | null | I've been working with [JetBrains dotTrace](http://www.jetbrains.com/profiler/) for WinForms and Console Apps (not tested on ASP.net yet), and it works quite well:
They recently also added a "Personal License" that is significantly cheaper than the corporate one. Still, if anyone else knows some cheaper or even free o... | null | CC BY-SA 3.0 | null | 2008-08-06T20:17:59.553 | 2011-11-28T13:41:47.253 | 2011-11-28T13:41:47.253 | 41,956 | 91 | null |
3,927 | 1 | 100,490 | null | 373 | 332,466 | What profilers have you used when working with .net programs, and which would you particularly recommend?
| What Are Some Good .NET Profilers? | CC BY-SA 2.5 | 0 | 2008-08-06T20:14:57.173 | 2012-11-13T13:51:26.783 | 2011-12-09T17:53:25.813 | 3,043 | 121 | [
"c#",
".net",
"profiling",
"profiler"
] |
3,916 | 2 | null | 3,859 | 1 | null | We use and like [Mercurial](http://www.selenic.com/mercurial/wiki/). It follows a distributed model - it eliminates some of the sense of having to "check in" work. Mozilla has [moved to Mercurial](https://web.archive.org/web/20150604064655/https://developer.mozilla.org/en-US/docs/Mercurial), which is a good sign that... | null | CC BY-SA 4.0 | null | 2008-08-06T19:59:33.697 | 2021-01-09T17:15:12.040 | 2021-01-09T17:15:12.040 | 10,607,772 | 525 | null |
3,917 | 2 | null | 3,868 | 2 | null | Try creating a div
```
document.createElement( 'div' );
```
And then set the tag soup HTML to the innerHTML of the div. The browser should process that into XML, which then you can parse.
> The innerHTML property takes a string
that specifies a valid combination of
text and elements. When the innerHTML
proper... | null | CC BY-SA 2.5 | null | 2008-08-06T19:59:50.997 | 2008-08-06T20:03:04.407 | 2008-08-06T20:03:04.407 | 402 | 402 | null |
3,935 | 2 | null | 3,927 | 25 | null | Don't forget [nProf](http://code.google.com/p/nprof/) - a prefectly good, freeware profiler.
| null | CC BY-SA 2.5 | null | 2008-08-06T20:19:16.417 | 2010-07-23T14:40:59.173 | 2010-07-23T14:40:59.173 | 811 | 35 | null |
3,937 | 2 | null | 3,868 | 1 | null | So you want to download a webpage as an XML object using javascript, but you don't want to use a webpage? Since you have no control over what the user will do (closing tabs or windows or whatnot) you would need to do this in like a OSX Dashboard widget or some separate application. A Firefox extension would also work, ... | null | CC BY-SA 2.5 | null | 2008-08-06T20:22:10.543 | 2008-08-06T20:22:10.543 | null | null | 402 | null |
3,936 | 2 | null | 3,654 | 1 | null | I aim for XHTML 1.0 Trans. It's better to conform so when bugs are fixed in the browsers you won't suddenly be working against the clock trying to figure out what actually needs changing.
In my opinion 1.1 is borked and 2.0 has been smashed to smithereens: Do I really need/want a header/footer tag?
| null | CC BY-SA 2.5 | null | 2008-08-06T20:20:23.013 | 2008-08-06T20:20:23.013 | null | null | 342 | null |
3,945 | 2 | null | 3,942 | 1 | null | [nProf](http://nprof.sourceforge.net/Site/Description.html) is a free .Net profiler ([ref](https://stackoverflow.com/questions/3927/what-are-some-good-net-profilers#3935)).
| null | CC BY-SA 2.5 | null | 2008-08-06T20:30:29.687 | 2008-08-06T20:30:29.687 | 2017-05-23T11:48:44.687 | -1 | 51 | null |
3,939 | 2 | null | 3,823 | 1 | null | I use the approach described by Greg in his [answer](https://stackoverflow.com/questions/3823/suggestions-for-implementing-audit-tables-in-sql-server#3848) and populate the audit table with a stored procedure called from the table triggers.
| null | CC BY-SA 2.5 | null | 2008-08-06T20:23:27.750 | 2008-08-06T20:23:27.750 | 2017-05-23T12:13:34.533 | -1 | 206 | null |
3,941 | 2 | null | 3,867 | 6 | null | The low cost solution is to switch to using ClickOnce, which you can automate using MSBuild. But if you still need to create a Windows Installer package, you will need to convert your project to WiX (pretty straight foward) and build that with your solution.
This will get you started:
[Automate Releases With MSBuild ... | null | CC BY-SA 2.5 | null | 2008-08-06T20:25:24.673 | 2008-08-06T20:25:24.673 | null | null | 322 | null |