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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38,898 | 2 | null | 38,820 | 5 | null | The real questions are:
- - -
These can be three completely unrelated entities or not, and that will determine whether your first or second design will work, or if another completely different design is in order.
| null | CC BY-SA 2.5 | null | 2008-09-02T05:43:14.420 | 2008-09-02T05:43:14.420 | null | null | 372 | null |
38,901 | 1 | 38,915 | null | 2 | 281 | I'm using the RESTful authentication Rails plugin for an app I'm developing.
I'm having a strange issue I can't get to the bottom of.
Essentially, the first time I log into the app after a period of inactivity (the app is deployed in production, but only being used by me), I will be brought to a 404 page, but if I go b... | Strange Rails Authentication Issue | CC BY-SA 2.5 | null | 2008-09-02T05:43:40.470 | 2009-07-01T06:49:40.650 | 2008-11-28T18:11:09.900 | 268 | 2,293 | [
"ruby-on-rails",
"ruby",
"authentication",
"rest",
"plugins"
] |
38,889 | 2 | null | 29,668 | 5 | null | Gregg Miskely has a [blog post](http://blogs.msdn.com/greggm/archive/2004/10/04/237519.aspx) on this. You might get it to work if both local accounts have the same user name and password. You might also try dropping your good box from it's domain so that you are going from a workgroup to a domain rather than domain t... | null | CC BY-SA 2.5 | null | 2008-09-02T05:34:25.157 | 2008-09-02T05:34:25.157 | null | null | 3,892 | null |
38,886 | 2 | null | 38,875 | 40 | null | Use a whitelist and make sure the page is in the whitelist:
```
$whitelist = array('home', 'page');
if (in_array($_GET['page'], $whitelist)) {
include($_GET['page'].'.php');
} else {
include('home.php');
}
```
| null | CC BY-SA 2.5 | null | 2008-09-02T05:30:06.120 | 2008-09-02T05:30:06.120 | null | null | 813 | null |
38,897 | 2 | null | 38,890 | 7 | null | You could create an INSERT TRIGGER that checks that the conditions are met. That way all updates will go straight through.
```
CREATE TRIGGER employee_insupd
ON employee
FOR INSERT
AS
/* Get the range of level for this job type from the jobs table. */
DECLARE @min_lvl tinyint,
@max_lvl tinyint,
@emp_lvl tinyint,... | null | CC BY-SA 2.5 | null | 2008-09-02T05:42:55.557 | 2008-09-02T06:00:40.897 | 2008-09-02T06:00:40.897 | 2,257 | 2,257 | null |
38,900 | 2 | null | 2,809 | 1 | null | You might try a log viewer; this basically just lets you look at the transactions in the transaction log, so you should be able to find the statement that updated the row in question. I wouldn't recommend this as a production-level auditing strategy, but I've found it to be useful in a pinch.
Here's one I've used; it... | null | CC BY-SA 2.5 | null | 2008-09-02T05:43:32.263 | 2008-09-02T05:43:32.263 | null | null | 4,154 | null |
38,896 | 2 | null | 37,666 | 3 | null | Although it costs, I highly recommend [Visual Build](http://www.kinook.com/VisBuildPro/). It works with MSBuild, and old tools like Visual Basic. It is scriptable, and can do everything from making installers to simple Continuous Integration.
| null | CC BY-SA 2.5 | null | 2008-09-02T05:42:13.377 | 2008-09-02T05:42:13.377 | null | null | 3,798 | null |
38,914 | 2 | null | 38,861 | -2 | null | You have a $1000 operating system license and you're going to put it on ~$1100 worth of hardware purchased at Fry's and presumably put together by yourself?
| null | CC BY-SA 2.5 | null | 2008-09-02T06:08:54.090 | 2008-09-02T06:08:54.090 | null | null | 3,869 | null |
38,909 | 2 | null | 38,766 | 1 | null | The only way I was able to do this was to use Windows Environment Variables. You can specify things like connection strings and user preferences in environment variables, and then pick up those environment variables from your SSIS Task.
| null | CC BY-SA 2.5 | null | 2008-09-02T05:49:34.997 | 2008-09-02T05:49:34.997 | null | null | 372 | null |
38,907 | 1 | 39,022 | null | 6 | 525 | I'm developing an Eclipse plug-in, based on a bunch of core Eclipse plug-ins like SWT, JDT, GEF and others.
I need my plug-in to be compatible with Eclipse 3.3, since many potential customers are still using it. However, personally I like the new features in Eclipse 3.4 and would like to use it for my development. Th... | Developing on Eclipse 3.4, running on Eclipse 3.3 | CC BY-SA 2.5 | null | 2008-09-02T05:46:42.927 | 2009-05-19T10:30:21.770 | 2008-10-19T22:05:46.510 | 15,352 | 2,823 | [
"eclipse",
"eclipse-pde",
"eclipse-3.4",
"eclipse-3.3"
] |
38,905 | 2 | null | 38,820 | 12 | null | I don't think composition is always better than inheritance (just usually). If Employee and Member really are Users, and they are mutually exclusive, then the first design is better. Consider the scenario where you need to access the UserName of an Employee. Using the second design you would have:
```
myEmployee.User... | null | CC BY-SA 2.5 | null | 2008-09-02T05:46:09.577 | 2008-09-02T05:46:09.577 | null | null | 2,785 | null |
38,915 | 2 | null | 38,901 | 2 | null | Please check your routes.
Not all routes are created equally. Routes have priority defined by the order of appearance of the routes in the config/routes.rb file. The priority goes from top to bottom. The last route in that file is at the lowest priority and will be applied last. If no route matches, is returned.
Mor... | null | CC BY-SA 2.5 | null | 2008-09-02T06:09:25.010 | 2009-07-01T06:49:40.650 | 2009-07-01T06:49:40.650 | 2,257 | 2,257 | null |
38,921 | 2 | null | 38,861 | 2 | null | Hardware's generally pretty OS-agnostic (at least in terms of Windows flavors) these days. Your only concern is getting drivers for other devices (scanners, printers, IR remotes) that won't work on 64bit and/or won't work on "Server" OSes. Online backup software like Mozy generally won't even install on a Server OS, so... | null | CC BY-SA 2.5 | null | 2008-09-02T06:16:07.240 | 2008-09-02T06:16:07.240 | null | null | 2,072 | null |
38,911 | 2 | null | 1,069 | 3 | null | Is this in low memory conditions? If so it might be that new is returning `NULL` rather than throwing std::bad_alloc. Older `VC++` compilers didn't properly implement this. There is an article about [Legacy memory allocation failures](http://msdn.microsoft.com/en-us/magazine/cc164087.aspx) crashing `STL` apps built wi... | null | CC BY-SA 3.0 | null | 2008-09-02T06:03:55.913 | 2013-02-07T12:34:24.123 | 2013-02-07T12:34:24.123 | 395,659 | 3,892 | null |
38,903 | 2 | null | 28,530 | 30 | null | I recommend the Apache License (specifically, version 2). It is not a “copy left” license and it addresses several matters that are important to established companies and their lawyers.
“Copy left” is the philosophy of the free software foundation requiring anything incorporating the licensed opens source code to als... | null | CC BY-SA 2.5 | null | 2008-09-02T05:45:35.067 | 2008-09-02T05:45:35.067 | null | null | 4,089 | null |
38,919 | 2 | null | 38,870 | 2 | null | Option 2 is the correct answer, unless you have a really good reason to add a surrogate numeric key (which you have done in option 1).
Surrogate numeric key columns are not 'primary keys'. Primary keys are technically one of the combination of columns that uniquely identify a record within a table.
Anyone building a... | null | CC BY-SA 2.5 | null | 2008-09-02T06:12:21.523 | 2008-09-02T06:12:21.523 | null | null | 2,661 | null |
38,924 | 2 | null | 38,370 | 4 | null | Sessions are tied to the server the domain. Using frameset across domain will cause all kind of breakage because that's just not how it was designed to do.
Try using apache mod rewrite to create a "passthrough redirection", the "" flag ([P]) in the rule is the magic flag that you need
Documentation at [http://http... | null | CC BY-SA 2.5 | null | 2008-09-02T06:18:34.380 | 2008-09-02T06:18:34.380 | null | null | 2,976 | null |
38,922 | 1 | 40,015 | null | 0 | 233 | I have a rails application where each user has a separate database. (taking Joel Spolsky's advice on this). I want to run DB migrations from the rails application to create a new database and tables for this user.
What is the easiest way to do this?
Maybe the db migration is not the best for this type of thing. Tha... | Running DB Migrations from application | CC BY-SA 3.0 | null | 2008-09-02T06:17:20.310 | 2017-12-13T18:13:55.823 | 2017-12-13T18:13:55.823 | 1,380,867 | 2,737 | [
"ruby-on-rails"
] |
38,925 | 2 | null | 4,638 | 0 | null | from Craig Brockschmidt probably has the best coverage on monikers. If you want to dig a little deeper into this topic, I'd recommend getting this book. It is also contained on the MSDN disk that came along with VS 6.0, in case you still have that.
| null | CC BY-SA 2.5 | null | 2008-09-02T06:18:47.423 | 2008-09-02T06:18:47.423 | null | null | null | null |
38,923 | 2 | null | 38,920 | 1 | null | You are using the wrong SMTP-server. If you you are only going to send emails to your gmail-account, have a look at my answer [here](https://stackoverflow.com/questions/29988/how-to-send-email-from-a-program-without-using-a-preexisting-account#30001).
If you also need to send email to other accounts, ask you ISP for y... | null | CC BY-SA 2.5 | null | 2008-09-02T06:17:59.577 | 2008-09-02T12:57:36.607 | 2017-05-23T12:19:34.457 | -1 | 2,257 | null |
38,927 | 2 | null | 38,922 | 1 | null | We use seperate configuration files for each user. So in the config/ dir we would have roo.database.yml which would connect to my personal database, and I would copy that over the database.yml file that is used by rails.
We were thinking of expanding the rails Rakefile so we could specify the developer as a environme... | null | CC BY-SA 2.5 | null | 2008-09-02T06:27:10.537 | 2008-09-02T06:27:10.537 | null | null | 716 | null |
38,928 | 2 | null | 38,890 | 1 | null | What sort of constraints? I'm guessing foreign key constraints, since you imply that deleting a row might violate the constraint. If that's the case, it seems like you don't really need a constraint per se, since you're not concerned with referential integrity.
Without knowing more about your specific situation, I w... | null | CC BY-SA 2.5 | null | 2008-09-02T06:30:44.850 | 2008-09-02T06:30:44.850 | null | null | 4,154 | null |
38,926 | 2 | null | 38,784 | 0 | null | I use:
- - - -
BTW, after using Visual Studio for years I just found about a couple of months ago that you can press ALT and drag mouse to mark a column or a square.
| null | CC BY-SA 4.0 | null | 2008-09-02T06:20:08.247 | 2021-06-12T20:46:14.863 | 2021-06-12T20:46:14.863 | 9,454,010 | 2,703 | null |
38,930 | 2 | null | 28,530 | 2 | null | I believe that 6 of the 9 licenses on the OSI's list of "Licenses that are popular and widely used or with strong communities" meet your criterion: Apache, BSD, MIT, Mozilla, CPL, and Eclipse. The Mozilla license and CPL (the Common Public License) have language concerning patents that might make them more attractive t... | null | CC BY-SA 2.5 | null | 2008-09-02T06:31:04.663 | 2008-09-02T06:44:59.903 | 2008-09-02T06:44:59.903 | 1,412 | 1,412 | null |
38,932 | 2 | null | 100,420 | 7 | null | CTRL-D then type ">of " then file name. If the standard toolbar is up crtl-d put you in find combobox and there is now a dropdown with files in your solution that match the start of the filename you typed. Pick one and it will open it. This alternative to the open filedialog is awesome for big solutions with lots of ... | null | CC BY-SA 2.5 | null | 2008-09-02T06:35:40.610 | 2008-09-02T06:35:40.610 | null | null | 3,892 | null |
38,931 | 2 | null | 4,689 | 1 | null | For quite some time I've been using [ProFont](http://www.tobias-jung.de/seekingprofont/), mainly because it allows a lot of lines fit into a given height (a lot more than say Consolas or others). Consolas is not bad either, though...
| null | CC BY-SA 2.5 | null | 2008-09-02T06:34:34.857 | 2008-09-02T06:34:34.857 | null | null | 4,158 | null |
38,934 | 1 | null | null | 20 | 26,335 | How to take screenshot programmically of desktop area in Mac OS X ?
| How to take screenshot in Mac OS X using Cocoa or C++ | CC BY-SA 2.5 | 0 | 2008-09-02T06:38:18.420 | 2014-11-11T17:59:49.710 | null | null | 3,911 | [
"c++",
"cocoa",
"macos"
] |
38,935 | 2 | null | 23,930 | 26 | null | C# Lookup:
Nothing to calculate really, just look it up. To extend it,add another 8 numbers to the table and 64 bit integers are at at their limit. Beyond that, a BigNum class is called for.
```
public static int Factorial(int f)
{
if (f<0 || f>12)
{
throw new ArgumentException("Out of range for int... | null | CC BY-SA 2.5 | null | 2008-09-02T06:39:13.660 | 2008-09-02T06:39:13.660 | null | null | 224 | null |
38,936 | 2 | null | 38,651 | 2 | null | As you say, there's no Adobe-created way to do this, but you might have better luck with [Zinc](http://www.multidmedia.com/), it is similar to AIR but provides real OS integration of Flash-based applications. Look though the [API docs](http://www.multidmedia.com/support/livedocs/), there should be something there.
| null | CC BY-SA 2.5 | null | 2008-09-02T06:41:20.143 | 2008-09-02T06:41:20.143 | null | null | 1,109 | null |
38,920 | 1 | 38,978 | null | 2 | 13,503 | I'm getting this problem:
```
PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for chris.mahan@gmail.com in c:\inetpub\wwwroot\mailtest.php on line 12
```
from this script:
```
<?php
$to = "chris.mahan@gmail.com";
$subject = "test";
$body = "this is a test";
if (mail($to, $subje... | php mail() not working windows 2003, IIS SMTP | CC BY-SA 3.0 | 0 | 2008-09-02T06:15:57.210 | 2015-06-13T12:30:18.963 | 2017-05-23T11:58:48.170 | -1 | 479 | [
"php",
"iis",
"smtp"
] |
38,944 | 2 | null | 38,940 | 5 | null | Yes - it's very possible, in fact you almost had it!
Try:
```
SELECT Field1, Field2, 'Value' AS `Field3` FROM Table
```
| null | CC BY-SA 2.5 | null | 2008-09-02T06:54:00.130 | 2008-09-02T06:54:00.130 | null | null | 908 | null |
38,937 | 2 | null | 100,420 | 0 | null | Here's an old blog article on some of the [hidden debugger features in the expression evaluators](http://blogs.msdn.com/stevejs/default.aspx?p=2).
| null | CC BY-SA 2.5 | null | 2008-09-02T06:49:56.973 | 2008-09-02T06:49:56.973 | null | null | 3,892 | null |
38,945 | 2 | null | 38,801 | 2 | null | I prefer a mix of the techinques used by Josh and Mark Harrison:
Two tables, one with the data of the Person and other with the hierarchichal info (person_id, parent_id [, mother_id]) if the PK of this table is person_id, you have a simple tree with only one parent by node (which makes sense in this case, but not in o... | null | CC BY-SA 2.5 | null | 2008-09-02T06:54:53.293 | 2008-09-02T06:54:53.293 | null | null | 518 | null |
38,940 | 1 | 38,942 | null | 4 | 1,986 | If I've got a table containing Field1 and Field2 can I generate a new field in the select statement? For example, a normal query would be:
```
SELECT Field1, Field2 FROM Table
```
And I want to also create Field3 and have that returned in the resultset... something along the lines of this would be ideal:
```
SELECT... | Generate field in MySQL SELECT | CC BY-SA 2.5 | 0 | 2008-09-02T06:50:58.233 | 2009-02-17T05:34:34.317 | 2008-09-02T07:24:11.960 | 1,293 | 393,028 | [
"sql",
"mysql"
] |
38,947 | 2 | null | 38,920 | 0 | null | @Espo: I'll do that re KB153119. Thanks.
About the mail server: I hear you.
I'll update when I uncover more.
| null | CC BY-SA 2.5 | null | 2008-09-02T06:57:24.473 | 2008-09-02T06:57:24.473 | null | null | 479 | null |
38,942 | 2 | null | 38,940 | 12 | null | ```
SELECT Field1, Field2, 'Value' Field3 FROM Table
```
or for clarity
```
SELECT Field1, Field2, 'Value' AS Field3 FROM Table
```
| null | CC BY-SA 2.5 | null | 2008-09-02T06:53:23.487 | 2008-09-02T06:53:23.487 | null | null | 257 | null |
38,954 | 2 | null | 38,864 | 0 | null | running traceroute to some public site will show you. Of course, there may be more than one interface that would get you there.
| null | CC BY-SA 2.5 | null | 2008-09-02T07:08:53.200 | 2008-09-02T07:08:53.200 | null | null | 116 | null |
38,949 | 1 | 38,956 | null | 5 | 993 | I find that getting Unicode support in my cross-platform apps a real pain in the butt.
I need strings that can go from C code, to a database, to a Java application and into a Perl module. Each of these use a different Unicode encodings (UTF8, UTF16) or some other code page. The biggest thing that I need is a cross-p... | cross platform unicode support | CC BY-SA 2.5 | null | 2008-09-02T06:58:34.830 | 2022-04-10T11:08:31.527 | 2011-03-31T08:50:12.483 | 527,702 | 3,935 | [
"java",
"c",
"perl",
"unicode",
"cross-platform"
] |
38,948 | 1 | null | null | 2 | 624 | Can I use [Struts](http://struts.apache.org/) as a backend and PHP as front end for a web application? If yes, what may be the implications.
| PHP and Java EE Backend | CC BY-SA 3.0 | 0 | 2008-09-02T06:57:32.227 | 2012-11-25T18:15:29.250 | 2012-11-25T18:15:19.640 | 472,792 | null | [
"php",
"struts"
] |
38,956 | 2 | null | 38,949 | 4 | null | Have a look at this: [http://www.icu-project.org/](http://www.icu-project.org/)
| null | CC BY-SA 2.5 | null | 2008-09-02T07:12:49.150 | 2008-09-02T07:12:49.150 | null | null | 4,097 | null |
38,961 | 2 | null | 38,920 | 0 | null | @Espo, the article in question relates to Exchange servers, not IIS7.0 SMTP server.
From the summary: This article describes how to telnet to port 25 on a computer that runs Simple Mail Transfer Protocol (SMTP) services to troubleshoot SMTP communication problems. The information in this article, including error messa... | null | CC BY-SA 2.5 | null | 2008-09-02T07:19:46.073 | 2008-09-02T07:19:46.073 | null | null | 479 | null |
38,952 | 1 | null | null | 0 | 7,971 | Ok, here's a very short and to the point question. When trying to import a virtual PC 2004 Windows 2003 Server VM in VM Workstation 6.0.2 I'm getting an error 'unable to determine guest operating system'. Soo how to fix?
| Unable to determine guest operating system: Vmware error | CC BY-SA 2.5 | null | 2008-09-02T07:01:30.940 | 2008-10-08T18:53:40.673 | 2008-09-26T18:58:23.893 | 2,134 | 1,688,440 | [
"vmware"
] |
38,960 | 1 | 38,962 | null | 236 | 319,774 | I would like to test a string containing a path to a file for existence of that file (something like the `-e` test in Perl or the `os.path.exists()` in Python) in C#.
| How to find out if a file exists in C# / .NET? | CC BY-SA 3.0 | 0 | 2008-09-02T07:18:48.120 | 2022-12-30T16:47:36.667 | 2012-12-21T10:46:20.307 | 2,260 | 2,260 | [
"c#",
".net",
"io"
] |
38,967 | 2 | null | 38,960 | 30 | null | System.IO.File.Exists(path)
[msdn](http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx)
| null | CC BY-SA 2.5 | null | 2008-09-02T07:21:07.960 | 2008-09-02T07:21:07.960 | null | null | 3,911 | null |
38,962 | 2 | null | 38,960 | 362 | null | Use:
```
File.Exists(path)
```
MSDN: [http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx](http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx)
Edit: In System.IO
| null | CC BY-SA 2.5 | null | 2008-09-02T07:19:51.190 | 2008-09-02T07:24:55.360 | 2008-09-02T07:24:55.360 | 3,641 | 3,641 | null |
38,971 | 2 | null | 38,960 | 74 | null | [System.IO.File](http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx):
```
using System.IO;
if (File.Exists(path))
{
Console.WriteLine("file exists");
}
```
| null | CC BY-SA 3.0 | null | 2008-09-02T07:22:11.997 | 2016-12-30T18:27:36.977 | 2016-12-30T18:27:36.977 | 3,345,644 | 720 | null |
38,973 | 2 | null | 1,711 | 3 | null | This isn't a direct answer to the question, because I feel it's already been answered above, however, one of the books that definitely had an impact on how I code is [Code Reading, Volume 1: The Open Source Perspective](http://www.bookpool.com/ss?qs=0201799405).
[alt text http://g.bookpool.com/covers/405/0201799405_... | null | CC BY-SA 2.5 | null | 2008-09-02T07:23:09.700 | 2008-09-02T07:23:09.700 | null | null | null | null |
38,955 | 1 | 38,981 | null | 1 | 821 | Assume java 1.6 and leopard. Ideally, it would also be nice to get a list of all supported resolutions and the current resolution. If this isn't possible in java, is there some way to do it that could be called from java?
| Is it possible to get the maximum supported resolution of a connected display in os x from java? | CC BY-SA 3.0 | null | 2008-09-02T07:11:40.867 | 2013-02-03T05:32:00.660 | 2013-02-03T05:32:00.660 | 918,414 | 85 | [
"java",
"macos",
"osx-leopard",
"resolutions"
] |
38,965 | 2 | null | 3,748 | 6 | null | Im my experience I had to manage both situations: images stored in database and images on the file system with path stored in db.
The first solution, images in database, is somewhat "cleaner" as your data access layer will have to deal only with database objects; but this is good only when you have to deal with low nu... | null | CC BY-SA 3.0 | null | 2008-09-02T07:20:58.020 | 2011-12-14T10:36:43.297 | 2011-12-14T10:36:43.297 | 96,780 | 1,178 | null |
38,972 | 2 | null | 38,948 | 0 | null | What do you mean by backend and and frontend?
If you mean using Java for the admin side of your site and PHP for the part that the public will see then there is nothing stopping you.
The implications are that you will have to maintain two applications in different languages.
| null | CC BY-SA 2.5 | null | 2008-09-02T07:22:45.100 | 2008-09-02T07:22:45.100 | null | null | 3,431,280 | null |
38,916 | 2 | null | 38,601 | 168 | null | The growing complexity of this answer over time, and the many hacks required, probably ought to caution you against doing this at all. It's relying on undocumented internal implementation details of the admin, is likely to break again in future versions of Django, and is no easier to implement than just finding another... | null | CC BY-SA 4.0 | null | 2008-09-02T06:10:58.127 | 2021-09-08T17:18:55.470 | 2021-09-08T17:18:55.470 | 4,720,018 | 3,207 | null |
38,978 | 2 | null | 38,920 | 4 | null | Try removing the IP restrictions for Relaying in the SMTP server, and opening it up to all relays. If it works when this is set, then you know that the problem has to do with the original restrictions. In this case, it may be a DNS issue, or perhaps you had the wrong IP address listed.
| null | CC BY-SA 2.5 | null | 2008-09-02T07:30:53.520 | 2008-09-02T07:30:53.520 | null | null | 51 | null |
38,976 | 2 | null | 38,842 | 2 | null | You should take a look at [Apache OpenOffice API](http://api.openoffice.org). A project for creating an API for Open Office. A few languages they said to support are: C++, Java, Python, CLI, StarBasic, JavaScript and OLE.
[Java Example of a mailmerge in OpenOffice](http://codesnippets.services.openoffice.org/Writer/Wr... | null | CC BY-SA 3.0 | null | 2008-09-02T07:25:45.577 | 2013-08-02T01:27:51.013 | 2013-08-02T01:27:51.013 | 234,175 | 1,633 | null |
38,963 | 2 | null | 38,952 | 1 | null | From [here](http://www.vi411.org/2007/03/08/vmware-converter-unable-to-determine-guest-operating-system.html):
1. Make sure that that the VM is not currently running in VMware Server.
2. Make sure that VMware Server does not have a lock on the VM’s files. You have have to stop all VMware Server Services and/or reboot... | null | CC BY-SA 2.5 | null | 2008-09-02T07:20:36.557 | 2008-09-02T07:20:36.557 | null | null | 718 | null |
38,980 | 2 | null | 38,719 | 4 | null | Here are a few more resources you should check out:
1. This DevExpress WinForms control: http://www.devexpress.com/Products/NET/Controls/WinForms/Wizard/
2. A home-grown wizards framework: http://weblogs.asp.net/justin_rogers/articles/60155.aspx
3. A wizard framework by Shawn Wildermut part of the Chris Sells's Geng... | null | CC BY-SA 2.5 | null | 2008-09-02T07:33:19.630 | 2008-09-02T07:33:19.630 | null | null | 373 | null |
38,981 | 2 | null | 38,955 | 6 | null | ```
GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment()
.getScreenDevices();
for (int i = 0; i < devices.length; i++) {
GraphicsDevice dev = devices[i];
System.out.println("device " + i);
DisplayMode[] modes = dev.getDisplayModes();
for (int j = 0; j ... | null | CC BY-SA 2.5 | null | 2008-09-02T07:33:22.093 | 2008-09-17T15:21:15.447 | 2008-09-17T15:21:15.447 | 2,554 | 2,554 | null |
38,991 | 2 | null | 38,820 | 2 | null | Here's a scenario you should think about:
Composition (the 2nd example) is preferable if the same User can be both an Employee and a Member. Why? Because for two instances (Employee and Member) that represent the same User, if User data changes, you don't have to update it in two places. Only the User instance contain... | null | CC BY-SA 2.5 | null | 2008-09-02T07:54:57.707 | 2008-09-02T07:54:57.707 | null | null | 1,772 | null |
38,986 | 2 | null | 38,820 | 3 | null | Stating your requirement/spec might help arrive at the 'best design'.
Your question is too 'subject-to-reader-interpretation' at the moment.
| null | CC BY-SA 2.5 | null | 2008-09-02T07:43:01.197 | 2008-09-02T07:43:01.197 | null | null | 1,695 | null |
38,993 | 1 | 39,004 | null | 4 | 2,599 | Here's a basic regex technique that I've never managed to remember. Let's say I'm using a fairly generic regex implementation (e.g., grep or grep -E). If I were to do a list of files and match any that end in either `.sty` or `.cls`, how would I do that?
| Regex to match unique substrings | CC BY-SA 3.0 | null | 2008-09-02T08:05:43.420 | 2017-12-16T22:54:02.327 | 2017-12-16T22:54:02.327 | 858,913 | 4,161 | [
"regex",
"grep"
] |
38,988 | 2 | null | 38,934 | 4 | null | Qt includes an example screenshot app in examples\desktop\screenshot. Qt works on a range of platforms, including MacOSX.
[http://trolltech.com/products/qt/](http://trolltech.com/products/qt/)
| null | CC BY-SA 2.5 | null | 2008-09-02T07:44:30.507 | 2008-09-02T07:44:30.507 | null | null | 455,552 | null |
38,994 | 2 | null | 38,993 | 2 | null | ```
egrep "\.sty$|\.cls$"
```
| null | CC BY-SA 2.5 | null | 2008-09-02T08:08:36.473 | 2008-09-02T08:08:36.473 | null | null | 720 | null |
38,989 | 2 | null | 38,987 | 96 | null | ```
x = {'a':1, 'b': 2}
y = {'b':10, 'c': 11}
z = dict(x.items() + y.items())
print z
```
For items with keys in both dictionaries ('b'), you can control which one ends up in the output by putting that one last.
| null | CC BY-SA 2.5 | null | 2008-09-02T07:49:27.360 | 2008-09-02T07:49:27.360 | null | null | 893 | null |
38,987 | 1 | 26,853,961 | null | 6,639 | 3,018,288 | I want to merge two dictionaries into a new dictionary.
```
x = {'a': 1, 'b': 2}
y = {'b': 3, 'c': 4}
z = merge(x, y)
>>> z
{'a': 1, 'b': 3, 'c': 4}
```
Whenever a key `k` is present in both dictionaries, only the value `y[k]` should be kept.
| How do I merge two dictionaries in a single expression in Python? | CC BY-SA 4.0 | 0 | 2008-09-02T07:44:30.227 | 2023-03-02T16:18:04.183 | 2023-02-12T07:03:18.347 | 5,323,892 | 3,207 | [
"python",
"dictionary",
"merge"
] |
38,992 | 2 | null | 38,057 | 5 | null | Unfortunately, according to the Hibernate [documentation](http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#d0e939) "Properties from superclasses not mapped as @MappedSuperclass are ignored." I ran up against this too. My solution was to represent the desired inheritance through interfaces rather ... | null | CC BY-SA 2.5 | null | 2008-09-02T07:56:52.333 | 2008-09-02T08:04:11.757 | 2008-09-02T08:04:11.757 | 2,783 | 2,783 | null |
38,990 | 2 | null | 38,987 | 1,788 | null | In your case, you can do:
```
z = dict(list(x.items()) + list(y.items()))
```
This will, as you want it, put the final dict in `z`, and make the value for key `b` be properly overridden by the second (`y`) dict's value:
```
>>> x = {'a': 1, 'b': 2}
>>> y = {'b': 10, 'c': 11}
>>> z = dict(list(x.items()) + list(y.items... | null | CC BY-SA 4.0 | null | 2008-09-02T07:50:12.600 | 2023-03-02T16:18:04.183 | 2023-03-02T16:18:04.183 | 19,542,956 | 2,900 | null |
38,998 | 1 | 39,015 | null | 21 | 1,884 | I'm an Information Architect and JavaScript developer by trade nowadays, but recently I've been getting back into back-end coding again. And, whilst trying to get an HTML prototype integrated and working with our C#-based CMS, I've come to blows with our programmers over the HTML ID attributes being arbitrarily rewrit... | Can I stop .NET eating IDs? | CC BY-SA 2.5 | 0 | 2008-09-02T08:09:24.253 | 2016-02-11T08:32:24.353 | null | null | 3,212 | [
"c#",
".net",
"javascript",
"html",
"css"
] |
39,002 | 2 | null | 22,873 | 0 | null | For Java EE 5 there's a separate tutorial [JEE tutorial](http://java.sun.com/javaee/5/docs/tutorial/doc/). That's useful, as people often ask about persistence and xml binding in java.
| null | CC BY-SA 2.5 | null | 2008-09-02T08:13:06.883 | 2008-09-02T08:13:06.883 | null | null | 3,666 | null |
38,985 | 2 | null | 22,873 | 10 | null | :
- [CLR via C#](http://www.microsoft.com/MSPress/books/6522.aspx)

- [C# in Depth](http://www.manning.com/skeet/)

| null | CC BY-SA 3.0 | null | 2008-09-02T07:40:10.410 | 2012-04-02T07:43:09.847 | 2012-04-02T07:43:09.847 | 1,219,121 | 718 | null |
39,003 | 1 | 39,034 | null | 33 | 10,983 | If I have interface IFoo, and have several classes that implement it, what is the best/most elegant/cleverest way to test all those classes against the interface?
I'd like to reduce test code duplication, but still 'stay true' to the principles of Unit testing.
What would you consider best practice? I'm using NUnit, ... | NUnit - How to test all classes that implement a particular interface | CC BY-SA 2.5 | 0 | 2008-09-02T08:13:58.050 | 2018-08-02T14:21:46.613 | null | null | 3,024 | [
"c#",
".net",
"unit-testing",
"nunit"
] |
39,005 | 2 | null | 38,934 | -2 | null | If you consider REALbasic, this is extremely easy to do with RB and the MBS Plugins. I've just written an application that does timed screenshots using RB and the MBS Plugins. You can read about it here: [http://tektalkin.blogspot.com/2008/08/screenaudit-for-mac-osx.html](http://tektalkin.blogspot.com/2008/08/screen... | null | CC BY-SA 2.5 | null | 2008-09-02T08:14:40.093 | 2008-09-02T08:14:40.093 | null | null | 2,981 | null |
39,000 | 2 | null | 38,993 | 2 | null | This regex:
\.(sty|cls)\z
will match any string ends with .sty or .cls
for grep \z should be replaced with $ i.e.
\.(sty|cls)$
as [jelovirt](https://stackoverflow.com/questions/38993/regex-to-match-unique-substrings#38995) suggested.
| null | CC BY-SA 2.5 | null | 2008-09-02T08:10:16.873 | 2008-09-02T08:10:16.873 | 2017-05-23T10:32:50.377 | -1 | 1,196 | null |
39,008 | 2 | null | 39,003 | 0 | null | I don't use NUnit but I have tested C++ interfaces. I would first test a TestFoo class which is a basic implementation of it to make sure the generic stuff works. Then you just need to test the stuff that is unique to each interface.
| null | CC BY-SA 2.5 | null | 2008-09-02T08:16:43.207 | 2008-09-02T08:16:43.207 | null | null | 342 | null |
39,004 | 2 | null | 38,993 | 4 | null | ```
ls | grep -E "\.(sty|cls)$"
```
- `\.``"."``.`- `(sty|cls)``"sty"``"cls"``or`- `$`
Note, you want `grep -E` or `egrep`, not `grep -e` as that's a different option for lists of patterns.
| null | CC BY-SA 2.5 | null | 2008-09-02T08:14:22.183 | 2008-09-02T08:14:22.183 | null | null | 3,171 | null |
39,010 | 2 | null | 38,870 | 3 | null | I agree with the previous answers but I have one remark to add.
If you want to add more information to the relation and allow more relations between the same two entities you need option one.
For example if you want to track all the times user 1 has used widget 664 in the userwidget table the userid and widgetid isn'... | null | CC BY-SA 2.5 | null | 2008-09-02T08:17:49.663 | 2008-09-02T08:17:49.663 | null | null | 3,320 | null |
39,011 | 2 | null | 15,390 | 8 | null | Also, I suggest you to use Google's [AJAX Libraries API](http://code.google.com/apis/ajaxlibs/documentation/) in order to load external libraries.
It's a Google developer tool which bundle majors JavaScript libraries and make it easier to deploy, upgrade and make them lighter by always using compressed versions.
Als... | null | CC BY-SA 2.5 | null | 2008-09-02T08:18:15.777 | 2008-09-02T08:18:15.777 | null | null | 3,122 | null |
39,007 | 1 | 39,290 | null | 4 | 1,332 | When editing XAML in VS2008 SP1, the editor is really slow. devenv process seems to be around at 40% CPU (the machine I’m using at the moment is only dual core, so that’s almost maxing out one core) most of the time. It spikes up a bit more when I switch to another XAML file. I do also have ReSharper installed, but I t... | Speeding up XAML editing in VS2008 | CC BY-SA 2.5 | 0 | 2008-09-02T08:15:20.793 | 2021-06-14T22:30:57.393 | 2008-11-02T02:11:49.537 | null | 1,367 | [
"visual-studio-2008",
"xaml"
] |
39,014 | 2 | null | 39,007 | 0 | null | Maybe you can edit the XAML file outside Visual Studio. Use tools like:
- [XamlPadX 4](http://blogs.msdn.com/llobo/archive/2008/08/25/xamlpadx-4-0.aspx)- [Kaxaml](http://www.kaxaml.com/)
| null | CC BY-SA 2.5 | null | 2008-09-02T08:19:38.160 | 2008-09-02T08:19:38.160 | null | null | 718 | null |
39,015 | 2 | null | 38,998 | 25 | null | The short answer is no, with webforms the id can always be rewritten depending on the nesting of the element. You can get access to the id through the ClientID property, so you could set the ids into variables in a script at the end of the page/control then put them into jQuery.
something like this:
```
<asp:butto... | null | CC BY-SA 3.0 | null | 2008-09-02T08:20:29.283 | 2012-02-28T20:29:03.233 | 2012-02-28T20:29:03.233 | 722,331 | 2,975 | null |
39,019 | 2 | null | 38,998 | 12 | null | One method is to override the ID's manually:
```
public override string UniqueID
{
get { return this.ID; }
}
public override string ClientID
{
get { return this.ID; }
}
```
[Rick Strahl wrote a blog post](http://www.west-wind.com/WebLog/posts/4605.aspx) with some more information on that approach.
| null | CC BY-SA 2.5 | null | 2008-09-02T08:23:49.290 | 2008-09-02T08:23:49.290 | null | null | 5 | null |
39,016 | 2 | null | 13,485 | 1 | null | Recently I have had a lot of success with SQL Server Service Broker which offers reliable, persisted asynchronous messaging out of the box with very little implementation pain.
- - - -
It is a vastly under-hyped part of SQL Server and well worth a look.
| null | CC BY-SA 2.5 | null | 2008-09-02T08:20:54.087 | 2008-09-02T08:20:54.087 | null | null | 3,893 | null |
39,006 | 1 | 39,321 | null | 1 | 5,829 | I'm running WAMP v2.0 on WindowsXP and I've got a bunch of virtual hosts setup in the http-vhosts.conf file.
This was working, but in the last week whenever I try & start WAMP I get this error in the event logs:
> VirtualHost *:80 -- mixing * ports and
non-* ports with a NameVirtualHost
address is not supported, ... | Error: "VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results" | CC BY-SA 3.0 | null | 2008-09-02T08:14:54.833 | 2017-08-06T09:15:26.093 | 2017-08-06T09:15:26.093 | 1,033,581 | 2,975 | [
"windows",
"apache",
"wamp"
] |
39,022 | 2 | null | 38,907 | 11 | null | You can change the 'Target platform' setting to point to the location of an existing set of eclipse 3.3 plugins. This will compile your code against the 3.3 plugins, making sure that they stay compatible no matter which version of eclipse you are using to develop the application.
The setting is under Window->Preferen... | null | CC BY-SA 2.5 | null | 2008-09-02T08:27:01.217 | 2008-09-02T08:27:01.217 | null | null | 1,651 | null |
39,026 | 2 | null | 39,007 | 3 | null | You can speed it up a lot by only viewing the XML view. Tools / Options / Text Editor / XAML / Always open documents in full XAML view (check this box).
| null | CC BY-SA 2.5 | null | 2008-09-02T08:28:22.383 | 2008-09-02T08:28:22.383 | null | null | 5 | null |
39,012 | 2 | null | 38,998 | 4 | null | You can extend .net controls and make them return actual id's when related properties are called.
ClientID is the id attribute and UniqueID is the name attribute of html elements. So when you create a textbox like the following and using this instead of the textbox in framework, you make id and name attributes render ... | null | CC BY-SA 2.5 | null | 2008-09-02T08:18:35.963 | 2008-09-02T08:24:08.010 | 2008-09-02T08:24:08.010 | 31,505 | 31,505 | null |
39,031 | 2 | null | 38,090 | 5 | null | Unfortunately, I don't believe there is. The WAL logging operates on the page level, which is much lower than the table level and doesn't even know which page holds data from which table. In fact, the WAL files don't even know which pages belong to which .
You might consider moving your high activity table to a comple... | null | CC BY-SA 2.5 | null | 2008-09-02T08:34:37.220 | 2008-09-02T08:34:37.220 | null | null | 893 | null |
39,032 | 2 | null | 35,017 | 5 | null | Beware of any file based database, they are all likely to have the same problems. Your situation really calls for a Client/Server solution.
From SQLite FAQ
> A good rule of thumb is that you
should avoid using SQLite in
situations where the same database
will be accessed simultaneously from
many computers o... | null | CC BY-SA 2.5 | null | 2008-09-02T08:35:52.443 | 2008-09-02T08:35:52.443 | null | null | 1,293 | null |
39,033 | 2 | null | 7,540 | 3 | null | > So, my question is, is there a way to have some kind of process explorer, or task manager sort of thing for Firefox 3?
Because of the way Firefox is built this is not possible at the moment. But the new Internet Explorer 8 Beta 2 and the just announced Google Chrome browser are heading in that direction, so I suppos... | null | CC BY-SA 2.5 | null | 2008-09-02T08:37:30.710 | 2008-09-02T08:37:30.710 | null | null | 238 | null |
39,037 | 1 | 39,139 | null | 6 | 18,120 | We are developing a little application that given a directory with PDF files creates a unique PDF file containing all the PDF files in the directory. This is a simple task using iTextSharp. The problem appears if in the directory exist some files like Word documents, or Excel documents.
My question is, is there a way ... | How to convert Word and Excel documents to PDF programmatically? | CC BY-SA 2.5 | 0 | 2008-09-02T08:42:22.820 | 2019-12-11T19:48:08.160 | 2009-04-02T15:05:01.727 | 4,418 | 3,611 | [
"automation",
"ms-office"
] |
39,021 | 2 | null | 36,742 | 1 | null | > @Tom (rephrased) I had to remove the trailing $ for it to work
Removing the $ means that the line may end with something else (e.g. the following will be accepted)
```
$GPRMC,005727.000,A,3751.9418,S,14502.2569,E,0.00,339.17,210808,,,A*76xxx
```
> @Tom And can I combine the last two greps?
```
grep -Ev "ADVER|AD... | null | CC BY-SA 2.5 | null | 2008-09-02T08:26:49.407 | 2008-09-02T08:26:49.407 | null | null | 3,848 | null |
39,045 | 2 | null | 39,037 | 0 | null | You can also use a component like activePDF's [DocConverter](http://www.activepdf.com/products/serverproducts/docconverter2009/) to convert a formats to PDF.
| null | CC BY-SA 2.5 | null | 2008-09-02T08:45:23.200 | 2009-09-10T23:07:18.910 | 2009-09-10T23:07:18.910 | 1,288 | 3,201 | null |
39,036 | 2 | null | 39,003 | 3 | null | I don't think this is best practice.
The simple truth is that an interface is nothing more than a contract that a method is implemented. It is a contract on either a.) how the method should be implemented and b.) what that method should be doing exactly (it only guarantees the return type), the two reasons that I gl... | null | CC BY-SA 2.5 | null | 2008-09-02T08:41:32.663 | 2008-09-02T08:41:32.663 | null | null | 372 | null |
39,050 | 2 | null | 37,929 | 0 | null | For testing/development purposes, you can download Oracle JRockit Mission Control for free from [this](http://www.oracle.com/technology/software/products/jrockit/index.html) site. (Requires Login, but accounts can be set up with any email adress)
Docs [Here](http://www.oracle.com/technology/products/jrockit/missioncon... | null | CC BY-SA 2.5 | null | 2008-09-02T08:50:47.337 | 2008-09-02T08:50:47.337 | null | null | 4,165 | null |
39,049 | 2 | null | 38,948 | 0 | null | I think what you mean is you want to use PHP as your templating language and structs as your middleware (actions etc).
I would imaging the answer would be no, not without some kind of bridge between the structs session and the PHP.
If you say change x to 3 in java in a structs action, you couldn't just go <?php echo ... | null | CC BY-SA 2.5 | null | 2008-09-02T08:48:58.653 | 2008-09-02T08:48:58.653 | null | null | 1,666 | null |
39,056 | 2 | null | 37,929 | 6 | null | I'm often happy enough using `Java -Xprof`. This gives you a sorted list of the functions your code spends most of its time in.
| null | CC BY-SA 2.5 | null | 2008-09-02T08:56:15.563 | 2008-09-02T08:56:15.563 | null | null | 2,018 | null |
39,043 | 2 | null | 37,568 | 2 | null | Another possible solution (assuming you actually need reliable address data and you're not just using addresses as a way to prevent duplicate accounts) is to use a third-party web service to standardize the addresses provided by your users.
It works this way -- your system accepts a user's address via an online form.... | null | CC BY-SA 2.5 | null | 2008-09-02T08:44:34.297 | 2008-09-02T08:44:34.297 | null | null | 480 | null |
39,058 | 2 | null | 38,998 | 7 | null | Look at ASP.Net MVC - it addresses the over-kill object hierarchies that ASP.Net generates by default.
This site is written in MVC (I think) - look at it's structure. Were I working on a new project right now I would consider it first
If you're stuck with basic ASP.Net then be careful overriding the ClientID and Uniq... | null | CC BY-SA 2.5 | null | 2008-09-02T09:00:03.900 | 2008-09-02T09:00:03.900 | null | null | 905 | null |
39,059 | 1 | 39,235 | null | 2 | 9,387 | Large pages are available in `Windows Server 2003` and `Windows Vista`.
But how do I enable large pages for my application?
| How do I run my app with large pages in Windows? | CC BY-SA 3.0 | 0 | 2008-09-02T09:00:58.093 | 2017-07-04T08:43:40.250 | 2017-07-04T08:42:38.497 | 5,423,108 | 988 | [
"windows",
"windows-server-2003"
] |
39,035 | 2 | null | 38,875 | 15 | null | Another way to sanitize the input is to make sure that only allowed characters (no "/", ".", ":", ...) are in it. However don't use a blacklist for characters, but a whitelist for allowed characters:
```
$page = preg_replace('[^a-zA-Z0-9]', '', $page);
```
... followed by a file_exists.
That way you can make sure ... | null | CC BY-SA 2.5 | null | 2008-09-02T08:40:08.597 | 2008-09-02T08:40:08.597 | null | null | 999 | null |
39,034 | 2 | null | 39,003 | 15 | null | If you have classes implement any one interface then they all need to implement the methods in that interface. In order to test these classes you need to create a unit test class for each of the classes.
Lets go with a smarter route instead; if your goal is to you might want to create an abstract class instead that h... | null | CC BY-SA 4.0 | null | 2008-09-02T08:39:09.847 | 2018-08-02T14:21:46.613 | 2018-08-02T14:21:46.613 | 7,500,779 | 3,713 | null |
39,062 | 2 | null | 35,634 | 2 | null | You could also use `__id__`. This gives you the objects internal ID number, which is always unique. To check if to objects are the same, try
> `a.__id__ = b.__id__`
This is how Ruby's standard library does it as far as I can tell (see `group_by` and others).
| null | CC BY-SA 2.5 | null | 2008-09-02T09:02:34.940 | 2008-09-02T09:02:34.940 | null | null | 2,018 | null |