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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19,507 | 2 | null | 19,487 | 1 | null | No shortcuts :) but everybody works slightly differently.
[This tutorial](http://nettuts.com/site-builds/from-psd-to-html-building-a-set-of-website-designs-step-by-step/) that popped up in my feedreader yesterday shows the process from start to finish and might help people who have never done it before but as you are ... | null | CC BY-SA 2.5 | null | 2008-08-21T09:03:26.780 | 2008-08-21T09:43:19.040 | 2008-08-21T09:43:19.040 | 269 | 269 | null |
19,409 | 1 | 19,453 | null | 8 | 8,984 | This is kinda oddball, but I was poking around with the GNU assembler today (I want to be able to at least read the syntax), and was trying to get this little contrived example of mine to work. Namely I just want to go from 0 to 100, printing out numbers all the while. So a few minutes later I come up with this:
```
#... | Incrementing from 0 to 100 in assembly language | CC BY-SA 2.5 | 0 | 2008-08-21T06:20:08.233 | 2012-05-02T04:21:36.033 | 2012-05-02T04:21:36.033 | 192,221 | 61 | [
"gnu-assembler",
"assembly"
] |
19,542 | 2 | null | 19,409 | 3 | null | Well written functions will usually push all the registers onto the stack and then pop them when they're done so that they remain unchanged during the function. The exception would be eax that contains the return value. Library functions like printf are most likely written this way, so I wouldn't do as Wedge suggests... | null | CC BY-SA 2.5 | null | 2008-08-21T09:46:17.583 | 2008-08-21T09:46:17.583 | null | null | 1,084 | null |
19,545 | 2 | null | 19,516 | 1 | null | About the only other way I can think of is to have a base Message table, with both an Id and a TypeId. Your subtables (QuoteMessage and JobMessage) then reference the base table on both MessageId and TypeId - but also have CHECK CONSTRAINTS on them to enforce only the appropiate MessageTypeId.
```
Table: Message
Field... | null | CC BY-SA 2.5 | null | 2008-08-21T09:48:49.573 | 2008-08-21T09:48:49.573 | null | null | 2,199 | null |
19,526 | 2 | null | 5,087 | 0 | null | At a first glance you would think they are completely differente stories, since they are based on extremely different languages (Ruby and Groovy).
Then, after reading a couple of tutorials, you'll realize they share the same principles, scaffolding, duck typing, .. and finally the same goal:
.
If you already feel... | null | CC BY-SA 2.5 | null | 2008-08-21T09:30:32.130 | 2008-08-21T09:30:32.130 | null | null | 2,249 | null |
19,555 | 2 | null | 19,458 | 3 | null | SQLite is used in more applications than any other DB. (Citation required).
There are some issues with MySQL, like that it doesn't respect foreign integrity constraints.
I'm currently a fan of PostgreSQL, which is also freely available (and, I think if you read the licensing of MySQL, actually turns out to have a mo... | null | CC BY-SA 2.5 | null | 2008-08-21T09:57:53.873 | 2008-08-21T09:57:53.873 | null | null | 188 | null |
19,557 | 2 | null | 15,621 | 0 | null | If you want to use the merge-tracking of Subversion 1.5 over more than one project at the same time you should use a single tree without externals.
A tracked merge is (just like a commit) always over a directory and its children.
The same rule applies on atomic commits. (Works only stable within a single workingcopy.... | null | CC BY-SA 2.5 | null | 2008-08-21T09:59:45.973 | 2008-08-21T09:59:45.973 | null | null | 2,094 | null |
19,549 | 2 | null | 17,984 | 5 | null | You can also use TortoiseSVN for editting the proxy settings.
TortoiseSVN saves the settings in the registry in the common location that all Subversion clients (by default) use.
: A proxy settings dialog is now implemented in the AnkhSVN daily builds.
It will be available in the next release.
| null | CC BY-SA 2.5 | null | 2008-08-21T09:51:57.007 | 2009-01-21T20:12:00.373 | 2009-01-21T20:12:00.373 | 2,094 | 2,094 | null |
19,550 | 2 | null | 19,519 | 0 | null | We use virtualisation to test on a variety of Operating Systems - the server application runs under linux, and we have a production (real) server, and a couple of test servers, which are all VMs.
The client runs under Windows, which, being an OS X user I have to run in a VM, and the other developer I work with runs an... | null | CC BY-SA 2.5 | null | 2008-08-21T09:53:30.187 | 2008-08-21T09:53:30.187 | null | null | 188 | null |
19,565 | 2 | null | 19,458 | 1 | null | Sorry to be pedantic, but the title should really be "Which RDBMS?" - the way it's phrased makes about as much sense as "Which Java?" or "[Which Internet?](http://thedailywtf.com/Articles/Which-Internet.aspx)"...
| null | CC BY-SA 2.5 | null | 2008-08-21T10:04:16.073 | 2008-08-21T15:39:22.240 | 2008-08-21T15:39:22.240 | 1,025 | 1,025 | null |
19,569 | 2 | null | 19,553 | 0 | null | That would sure be nice to have the compiler check that rather than through an expression. :/
Don't see any way to do that though...
| null | CC BY-SA 2.5 | null | 2008-08-21T10:07:18.187 | 2008-08-21T10:07:18.187 | null | null | 446,497 | null |
19,554 | 2 | null | 19,519 | 0 | null | It depends on the requirements of the legacy systems. Very often if a system is relient on a certain clock frequency, then it better and morereliable to keep the older OS systems running as Virtulized OS' can do funy things to performance.
If the legacy systems aren't that critical, then go for it! One piece of advice... | null | CC BY-SA 2.5 | null | 2008-08-21T09:57:29.910 | 2008-08-21T09:57:29.910 | null | null | 1,816 | null |
19,570 | 2 | null | 19,454 | 1 | null | You can write an FxCop rule or even check for the attributes by calling GetType() in the base class's constructor and reflecting over the returned type.
| null | CC BY-SA 2.5 | null | 2008-08-21T10:08:08.840 | 2008-08-21T10:08:08.840 | null | null | 1,659 | null |
19,572 | 2 | null | 19,553 | 1 | null | Using Status as a return value remembers me of the "old days" of C programming, when you returned an integer below 0 if something didn't work.
Wouldn't it be better if you throw an exception when (as you put it) ? If some "lazy code" doesn't catch your exception, you'll know for sure.
| null | CC BY-SA 2.5 | null | 2008-08-21T10:11:35.680 | 2008-08-21T10:11:35.680 | null | null | 1,679 | null |
19,560 | 2 | null | 19,553 | 10 | null | I know this doesn't answer your question directly, but if "something went wrong" within your function (unexpected circumstances) I think you should be throwing an exception rather than using status return codes.
Then leave it up to the caller to catch and handle this exception if it can, or allow it to propogate if th... | null | CC BY-SA 2.5 | null | 2008-08-21T10:02:28.637 | 2008-08-21T11:27:32.860 | 2008-08-21T11:27:32.860 | 2,084 | 2,084 | null |
19,561 | 2 | null | 19,553 | 0 | null | You can throw an exception by:
```
throw MyException;
[global::System.Serializable]
public class MyException : Exception
{
//
// For guidelines regarding the creation of new exception types, see
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht... | null | CC BY-SA 2.5 | null | 2008-08-21T10:02:44.530 | 2008-08-21T10:14:35.783 | 2008-08-21T10:14:35.783 | 1,816 | 1,816 | null |
19,462 | 2 | null | 15,399 | 1 | null | ..."writing very complex ad-hoc SQL queries.... they are so busy"
Danger Will Robinson!
Automate Automate Automate.
Ideally, the ops team should not be put into a position where they have to write queries on the fly in a high stress situation – it’s a recipe for disaster! Better for them to build up a library of pre... | null | CC BY-SA 2.5 | null | 2008-08-21T08:04:21.603 | 2008-08-21T08:04:21.603 | null | null | 1,264 | null |
19,585 | 2 | null | 8,472 | 57 | null | Unless I'm missing something, what's wrong with using [reCAPTCHA](http://recaptcha.net/whyrecaptcha.html) as all the work is done externally.
Just a thought.
| null | CC BY-SA 2.5 | null | 2008-08-21T10:23:08.367 | 2010-04-19T16:19:39.047 | 2010-04-19T16:19:39.047 | 63,550 | 3,180 | null |
19,553 | 1 | 19,835 | null | 10 | 622 | I have a "Status" class in C#, used like this:
```
Status MyFunction()
{
if(...) // something bad
return new Status(false, "Something went wrong")
else
return new Status(true, "OK");
}
```
You get the idea.
All callers of MyFunction check the returned Status:
```
Status myStatus = MyFunction();
if ... | Enforcing required function call | CC BY-SA 3.0 | null | 2008-08-21T09:57:26.463 | 2015-11-20T11:39:56.393 | 2015-11-20T11:39:56.393 | 3,218,692 | 1,163 | [
"c#",
"garbage-collection",
"dispose",
"destructor"
] |
19,589 | 1 | 19,596 | null | 66 | 60,521 | Using C# .NET 3.5 and WCF, I'm trying to write out some of the WCF configuration in a client application (the name of the server the client is connecting to).
The obvious way is to use `ConfigurationManager` to load the configuration section and write out the data I need.
```
var serviceModelSection = ConfigurationMa... | Loading System.ServiceModel configuration section using ConfigurationManager | CC BY-SA 3.0 | 0 | 2008-08-21T10:27:59.137 | 2014-04-02T06:18:11.567 | 2013-10-24T10:46:46.827 | 493,680 | 1,297 | [
"c#",
".net",
"xml",
"wcf",
"configurationmanager"
] |
19,591 | 2 | null | 19,553 | 0 | null | GCC has a [warn_unused_result](http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html) attribute which is ideal for this sort of thing. Perhaps the Microsoft compilers have something similar.
| null | CC BY-SA 2.5 | null | 2008-08-21T10:31:08.940 | 2010-03-03T05:07:39.643 | 2010-03-03T05:07:39.643 | 120,292 | 755 | null |
19,593 | 2 | null | 7,492 | 0 | null | Take a look at [TestComplete](http://www.automatedqa.com/products/testcomplete/tc_lss_testing.asp).
| null | CC BY-SA 2.5 | null | 2008-08-21T10:34:39.620 | 2008-08-21T10:34:39.620 | null | null | 2,089 | null |
19,590 | 2 | null | 19,553 | 7 | null | If you really want to require the user to retrieve the result of MyFunction, you might want to void it instead and use an out or ref variable, e.g.,
```
void MyFunction(out Status status)
{
}
```
It might look ugly but at least it ensures that a variable is passed into the function that will pick up the result you n... | null | CC BY-SA 2.5 | null | 2008-08-21T10:28:25.920 | 2008-08-21T10:28:25.920 | null | null | 372 | null |
19,594 | 2 | null | 19,589 | 65 | null | [http://mostlytech.blogspot.com/2007/11/programmatically-enumerate-wcf.html](http://mostlytech.blogspot.com/2007/11/programmatically-enumerate-wcf.html)
```
// Automagically find all client endpoints defined in app.config
ClientSection clientSection =
ConfigurationManager.GetSection("system.serviceModel/client") ... | null | CC BY-SA 2.5 | null | 2008-08-21T10:35:08.510 | 2008-08-21T10:35:08.510 | null | null | 1,297 | null |
19,597 | 2 | null | 19,493 | 49 | null | The HTTP_HOST only contains the host name, not the path of the URL requested.
```
RewriteCond %{REQUEST_URI} !^/audio
```
Should be all you need.
Further, you can get debug info from the rewrite engine with the following, which is really useful to see how your conditions and rules are being matched:
```
RewriteLog... | null | CC BY-SA 3.0 | null | 2008-08-21T10:41:08.590 | 2013-03-10T17:53:51.620 | 2013-03-10T17:53:51.620 | 506,721 | 1,951 | null |
19,596 | 2 | null | 19,589 | 50 | null | The [<system.serviceModel>](http://msdn.microsoft.com/en-us/library/ms731354%28v=vs.90%29.aspx) element is for a configuration section , not a section. You'll need to use [System.ServiceModel.Configuration.ServiceModelSectionGroup.GetSectionGroup()](http://msdn.microsoft.com/en-us/library/system.servicemodel.configurat... | null | CC BY-SA 3.0 | null | 2008-08-21T10:38:07.083 | 2014-04-02T06:18:11.567 | 2014-04-02T06:18:11.567 | 1,244,353 | 1,659 | null |
19,571 | 2 | null | 17,880 | 1 | null | I'd suggest that modifying the underlying XML file is "considered harmful". Especially if you haven't checked to see if the document is open!
I've had a quick look at the Scripting Dictionary for Pages, and it seems pretty comprehensive; here is part of one entry:
> n [inh. > ; see also Standard Suite] : A Pages d... | null | CC BY-SA 2.5 | null | 2008-08-21T10:08:56.200 | 2008-08-21T10:08:56.200 | null | null | 188 | null |
19,600 | 2 | null | 9,275 | 1 | null | Doesn't ODBC use the old "?" syntax for parameters? Try this:
```
select col1, col2 from table1 where col3 = ?
```
The order of your parameters becomes important then, but it's less vulnerable to SQL injection than simply appending the parameter value.
| null | CC BY-SA 2.5 | null | 2008-08-21T10:44:08.020 | 2008-08-28T09:48:49.577 | 2008-08-28T09:48:49.577 | 615 | 615 | null |
19,586 | 2 | null | 19,553 | 3 | null | Even System.Net.WebRequest throws an exception when the returned HTTP status code is an error code. The typical way to handle it is to wrap a try/catch around it. You can still ignore the status code in the catch block.
You could, however, have a parameter of Action< Status> so that the caller is forced to pass a call... | null | CC BY-SA 2.5 | null | 2008-08-21T10:23:18.540 | 2008-08-21T11:01:48.697 | 2008-08-21T11:01:48.727 | 1,659 | 1,659 | null |
19,599 | 2 | null | 19,553 | 0 | null | @Paul you could do it at compile time with [Extensible C#](http://www.google.com/search?hl=en&rls=com.microsoft%3Aen-us&q=%22extensible+C%23%22).
| null | CC BY-SA 2.5 | null | 2008-08-21T10:42:52.173 | 2008-08-21T10:42:52.173 | null | null | 1,659 | null |
19,602 | 2 | null | 19,589 | 18 | null | This is what I was looking for thanks to @marxidad for the pointer.
```
public static string GetServerName()
{
string serverName = "Unknown";
Configuration appConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ServiceModelSectionGroup serviceModel = ServiceMod... | null | CC BY-SA 2.5 | null | 2008-08-21T10:51:07.800 | 2008-08-21T10:51:07.800 | null | null | 1,297 | null |
19,604 | 1 | 23,556 | null | 28 | 60,260 | What is the best Image Manager to integrate in TinyMce editor apart the official Moxiecode commercial ones?
I'm looking to integrate a light texteditor in an asp.net mvc application and I choosed the Tinymce solution (and not the classic FCKEditor as this seems more lightweight and more jquery friendly).
Sadly TinyMc... | Best TinyMce editor Image Manager / File upload for Asp.net Mvc | CC BY-SA 2.5 | 0 | 2008-08-21T10:53:54.283 | 2015-12-19T07:48:21.837 | null | null | 1,929 | [
"asp.net",
"asp.net-mvc",
".net-2.0"
] |
19,611 | 1 | 19,614 | null | 20 | 21,386 | Given a (source) patch file, what's the easiest way to apply this patch on the source files under Windows?
A GUI tool where I can visually compare the unchanged-changed source lines would be great.
| How to patch on Windows? | CC BY-SA 2.5 | 0 | 2008-08-21T10:58:40.513 | 2022-02-11T09:54:01.387 | 2008-08-21T11:06:40.570 | 1,630 | 1,630 | [
"windows",
"patch"
] |
19,615 | 2 | null | 19,611 | -2 | null | WinMerge is awesome.
[http://winmerge.org/](http://winmerge.org/)
| null | CC BY-SA 2.5 | null | 2008-08-21T11:01:55.763 | 2008-08-21T11:01:55.763 | null | null | 1,087 | null |
19,614 | 2 | null | 19,611 | 6 | null | [Patch for Windows](http://gnuwin32.sourceforge.net/packages/patch.htm) is what you're looking for.
| null | CC BY-SA 2.5 | null | 2008-08-21T11:01:49.913 | 2008-08-21T11:01:49.913 | null | null | 1,666 | null |
19,624 | 2 | null | 9,304 | 0 | null | I use CodeRush, it's faster than auto-properties.
To do this:
```
private string title;
public string Title
{
get { return title; }
set { title = value; }
}
```
Requires eight keystrokes total.
| null | CC BY-SA 2.5 | null | 2008-08-21T11:13:54.627 | 2008-08-21T11:13:54.627 | null | null | 580 | null |
19,601 | 2 | null | 5,459 | 10 | null | You can accomplish this without using [eval](http://php.net/manual/en/function.eval.php) in pre-5.3 code. Just use the [constant](http://php.net/manual/en/function.constant.php) function:
```
<?php
class MyClass
{
const CONSTANT = 'Const var';
}
$classname = 'MyClass';
echo constant("$classname::CONSTANT");
?>
... | null | CC BY-SA 3.0 | null | 2008-08-21T10:48:23.407 | 2015-10-08T00:55:12.793 | 2015-10-08T00:55:12.793 | 67,579 | 1,103 | null |
19,609 | 2 | null | 17,117 | 4 | null | I believe you're actually referring to [TR1](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1745.pdf), rather than TR2. The call for proposals for TR2 is open, but don't expect to see much movement until the new C++ standard is out. Also, although boost is a provider of an implementation of TR1, dinkumware an... | null | CC BY-SA 2.5 | null | 2008-08-21T10:55:26.947 | 2008-08-21T10:55:26.947 | null | null | 2,246 | null |
19,654 | 1 | 19,715 | null | 6 | 655 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to ... | Introducing Python | CC BY-SA 2.5 | 0 | 2008-08-21T11:48:03.000 | 2012-06-07T02:33:50.953 | 2012-06-07T02:33:50.953 | 1,324,019 | 1,951 | [
"php",
"python"
] |
19,660 | 2 | null | 12,927 | 0 | null | VisualVM should be the profiler from netbeans as standalone. I tried the TPTP for eclipse but visualVm seems as a much nicer option!
| null | CC BY-SA 2.5 | null | 2008-08-21T11:51:46.923 | 2008-08-21T11:51:46.923 | null | null | 86 | null |
19,638 | 2 | null | 2,482 | 2 | null | I've read (most of) [Java Concurrency in Practice](http://www.javaconcurrencyinpractice.com/) by Brian Goetz, which is very good.
There is obviously a Java-based theme running through the book (using Java specific implementations of threads, locks etc.), but pretty much all of the principles can be applied to other l... | null | CC BY-SA 2.5 | null | 2008-08-21T11:39:20.727 | 2008-08-21T11:39:20.727 | null | null | 142 | null |
19,644 | 2 | null | 15,203 | 2 | null | Another SVN integration with Visual studio is AnkhSVN [http://ankhsvn.open.collab.net/](http://ankhsvn.open.collab.net/) It is free, and has a few quirks. Personally, I use it for basic diffing and the visual indicators for file status (changed, conflict, etc.) while I use Tortoise for the heavy lifting.
| null | CC BY-SA 2.5 | null | 2008-08-21T11:43:22.900 | 2008-08-21T11:43:22.900 | null | null | 2,258 | null |
19,606 | 2 | null | 18,172 | 5 | null | I'm unclear as to what your actual problem is, so I'll throw out a few thoughts.
- [CopyFileEx with COPYFILERESTARTABLE](http://msdn.microsoft.com/en-us/library/aa363852.aspx)- - [TransmitFile](http://msdn.microsoft.com/en-us/library/ms740565%28VS.85%29.aspx)- [TeraCopy](http://www.codesector.com/teracopy.php)- [IsNet... | null | CC BY-SA 2.5 | null | 2008-08-21T10:54:09.727 | 2008-08-22T04:47:12.270 | 2008-08-22T04:47:12.270 | 1 | 2,199 | null |
19,661 | 2 | null | 19,553 | 1 | null | Instead of forcing someone to check the status, I think you should assume the programmer is aware of this risks of not doing so and has a reason for taking that course of action. You don't know how the function is going to be used in the future and placing a limitation like that only restricts the possibilities.
| null | CC BY-SA 2.5 | null | 2008-08-21T11:51:53.990 | 2008-08-21T11:51:53.990 | null | null | 1,942 | null |
19,665 | 2 | null | 19,654 | 0 | null | Well, python is a high level language.. its not hard to learn and if the guys already have programming knowledge it should be much easier to learn.. i like django.. i think it should be a nice try to use django ..
| null | CC BY-SA 2.5 | null | 2008-08-21T11:53:38.103 | 2008-08-21T11:53:38.103 | null | null | 1,094 | null |
19,662 | 2 | null | 13,485 | 1 | null | We have a shop as a client, with three stores connected to the same VPN
Two of the shops have a computer running as a "server" for that shop and the the third one has the "master database"
To synchronize all to the master we don't have the best solution, but it works: there is a dedicated PC running an application that... | null | CC BY-SA 2.5 | null | 2008-08-21T11:52:50.507 | 2008-08-21T11:52:50.507 | null | null | null | null |
19,658 | 2 | null | 19,656 | 2 | null | If the implementation has a parameterless constructor, you can do this using the System.Activator class. You will need to specify the assembly name in addition to the class name:
```
IStep step = System.Activator.CreateInstance(sAssemblyName, sClassName).Unwrap() as IStep;
```
[http://msdn.microsoft.com/en-us/librar... | null | CC BY-SA 2.5 | null | 2008-08-21T11:50:56.050 | 2008-08-21T12:39:30.443 | 2008-08-21T12:39:30.443 | 2,084 | 2,084 | null |
19,667 | 2 | null | 19,656 | 1 | null | Based on what others have pointed out, this is what I ended up writing:
| null | CC BY-SA 3.0 | null | 2008-08-21T11:54:53.933 | 2012-03-01T16:31:43.007 | 2012-03-01T16:31:43.007 | 2,260 | 2,260 | null |
19,668 | 2 | null | 19,654 | 4 | null | If the mandate of the new lead is to put the house in order, the current situation should likely be simplified as much as possible prior. If I had to bring things to order, I wouldn't want to have to manage an ongoing language conversion project on top of everything else, or at least I'd like some choice when initiati... | null | CC BY-SA 2.5 | null | 2008-08-21T11:56:00.593 | 2008-08-31T15:13:58.917 | 2008-08-31T15:13:58.917 | 279 | 279 | null |
19,669 | 2 | null | 19,656 | 0 | null | Well Assembly.CreateInstance would seem to be the way to go - the only problem with this is that it needs the fully qualified name of the type, i.e. including the namespace.
| null | CC BY-SA 2.5 | null | 2008-08-21T11:56:42.743 | 2008-08-21T11:56:42.743 | null | null | 1,908 | null |
19,653 | 1 | 19,678 | null | 1 | 1,335 | Recently, I've been dealing with an error with accessing MAPI via the .NET framework (as described in [this article](http://blogs.msdn.com/mstehle/archive/2007/10/03/fyi-why-are-mapi-and-cdo-1-21-not-supported-in-managed-net-code.aspx)). I am now left with a series of memory access violation errors.
To get past the is... | Is Visual C++ memory managed by the Dot Net framework | CC BY-SA 3.0 | null | 2008-08-21T11:47:11.630 | 2013-04-17T20:44:54.000 | 2013-04-17T20:42:43.947 | 1,454,806 | 33 | [
".net",
"visual-c++",
"memory"
] |
19,598 | 2 | null | 19,481 | 4 | null | > Another discussion (we've been having a lot of them these days!) in our work
is whether data binding is a bad idea or not.Personally, I think it is a Bad Thing™.
Strong opinion, but imho, you bring out all the wrong reasons.
1. It circumvents my well architectured MVP framework - with databinding, the view commu... | null | CC BY-SA 3.0 | null | 2008-08-21T10:41:52.347 | 2012-07-11T19:18:23.360 | 2012-07-11T19:18:23.360 | 106,224 | 1,712 | null |
19,663 | 2 | null | 19,656 | 8 | null | Your question is very confusing...
If you want to find types that implement IStep, then do this:
```
foreach (Type t in Assembly.GetCallingAssembly().GetTypes())
{
if (!typeof(IStep).IsAssignableFrom(t)) continue;
Console.WriteLine(t.FullName + " implements " + typeof(IStep).FullName);
}
```
If you know already... | null | CC BY-SA 2.5 | null | 2008-08-21T11:53:00.647 | 2008-08-21T11:58:41.883 | 2008-08-21T11:58:41.883 | 275 | 275 | null |
19,672 | 2 | null | 14,453 | 5 | null | I haven't done any proper benchmarks, but I tried out several other components,and found that [SpreadsheetGear](http://spreadsheetgear.com/) was considerably faster than XlsIO which I was using before. I've written up some of my findings in this [post](http://blog.functionalfun.net/2008/08/which-net-excel-io-component-... | null | CC BY-SA 3.0 | null | 2008-08-21T11:57:50.200 | 2014-04-07T08:36:46.283 | 2014-04-07T08:36:46.283 | 2,385,565 | 1,727 | null |
19,676 | 2 | null | 19,653 | 0 | null | Unless you are using Managed C++ (which it doesn't sound like you are) then no, the memory is not managed by the CLR.
The recommended method of talking to Exchange in .Net is via WebDAV.
| null | CC BY-SA 2.5 | null | 2008-08-21T11:59:38.260 | 2008-08-21T11:59:38.260 | null | null | 1,908 | null |
19,678 | 2 | null | 19,653 | 0 | null | I'm not entirely sure what you're asking, but i'll give it a shot.
Visual C++ is a pure C/C++ compiler so has none of .NET's memory management, nor any of its runtime -- You have to manually call new and delete.
.NET also provides C++/CLI, which is a slightly modified version of C++ that targets the .NET runtime, and... | null | CC BY-SA 3.0 | null | 2008-08-21T12:00:51.690 | 2013-04-17T20:44:54.000 | 2013-04-17T20:44:54.000 | 82,320 | 784 | null |
19,656 | 1 | 19,663 | null | 7 | 5,579 | I have an Interface called `IStep` that can do some computation (See "[Execution in the Kingdom of Nouns](http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html)"). At runtime, I want to select the appropriate implementation by class name.
| How to find an implementation of a C# interface in the current assembly with a specific name? | CC BY-SA 2.5 | 0 | 2008-08-21T11:49:08.020 | 2012-03-01T16:31:43.007 | 2010-10-08T07:22:45.727 | 2,260 | 2,260 | [
"c#",
"linq",
"reflection",
"linq-to-objects"
] |
19,670 | 2 | null | 19,516 | 1 | null | @burns
Ian's answer (+1) is correct . Using a many to many table `QUOTEMESSAGE` to join `QUOTE` to `MESSAGE` is the most correct model, but will leave orphaned `MESSAGE` records.
This is one of those cases where a trigger can be used. However, caution needs to be applied to ensure that the a single `MESSAGE` recor... | null | CC BY-SA 2.5 | null | 2008-08-21T11:56:57.347 | 2008-08-21T11:56:57.347 | null | null | 993 | null |
19,685 | 2 | null | 19,654 | 0 | null | I don't think it's a matter of a programming language as such.
What is the proficiency level of PHP in the team you're talking about? Are they doing spaghetti code or using some structured framework like Zend? If this is the first case then I absolutely understand the guy's interest in Python and Django. It this is t... | null | CC BY-SA 2.5 | null | 2008-08-21T12:03:43.320 | 2008-08-21T12:03:43.320 | null | null | 837 | null |
19,688 | 2 | null | 2,482 | 2 | null | For a great guide and reference for concurrency programming in C# (or .NET in general) I'd recommend the MSDN [What Every Dev Must Know About Multithreaded Apps](http://msdn.microsoft.com/msdnmag/issues/05/08/Concurrency/default.aspx) article by Vance Morrison on MSDN. It contains a great deal of best-practice informat... | null | CC BY-SA 2.5 | null | 2008-08-21T12:06:05.420 | 2008-08-21T12:06:05.420 | null | null | 2,114 | null |
19,693 | 2 | null | 14,674 | 1 | null | I know it's anachronistic. But the single best way I've found to handle the references issue is to have a folder mapped to a drive letter such as R: and then all projects build into or copy output into that folder also. Then all references are R:\SomeFile.dll etc. This gets you around the problem that sometimes referen... | null | CC BY-SA 2.5 | null | 2008-08-21T12:10:00.857 | 2008-08-21T12:10:00.857 | null | null | 1,120 | null |
19,696 | 2 | null | 9,472 | 1 | null | What binding are you using - I think if you stick to the basicHttp binding you should be able to generate a proxy using the "add web reference" approach from a .net 2 project?
Perhaps if you post the contract/interface definition it might help?
Cheers
Richard
| null | CC BY-SA 2.5 | null | 2008-08-21T12:12:47.667 | 2008-08-21T12:12:47.667 | null | null | null | null |
19,694 | 2 | null | 2,482 | 1 | null | I don't know what exactly you are looking for, but if you are doing WindowsForms development the following blog post is worth every minute reading:
[WinForms UI Thread Invokes: An In-Depth Review of Invoke/BeginInvoke/InvokeRequred](http://weblogs.asp.net/justin_rogers/articles/126345.aspx)
| null | CC BY-SA 2.5 | null | 2008-08-21T12:11:11.617 | 2008-08-21T12:11:11.617 | null | null | 2,078 | null |
19,705 | 2 | null | 8,472 | 9 | null | [Best captcha ever!](http://random.irb.hr/signup.php) Maybe you need something like this for sign-up to keep the riff-raff out.
| null | CC BY-SA 2.5 | null | 2008-08-21T12:16:40.140 | 2008-08-21T12:16:40.140 | null | null | 497 | null |
19,680 | 2 | null | 19,519 | 0 | null | We use virtualisation for testing out applications on Vista. Or rather customers do the testing and we use virtualisation to reproduce the bugs they complain about.
I guess the thing that would stop me from using lots of virtual instances of my favourite proprietary OS would be licencing. I presume Microsoft would wan... | null | CC BY-SA 2.5 | null | 2008-08-21T12:01:11.033 | 2008-08-21T12:01:11.033 | null | null | 1,105 | null |
19,692 | 2 | null | 19,654 | 2 | null | @darkdog:
Using a new language in production code is about more than easy syntax and high-level capability. You want to be familiar with core APIs and feel like you can fix something through logic instead of having to comb through the documentation.
I'm not saying transitioning to Python would be a bad idea for this ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:09:46.147 | 2008-08-21T12:09:46.147 | null | null | 1,344 | null |
19,712 | 2 | null | 19,519 | 1 | null | I use virtualized desktops for:
- -
| null | CC BY-SA 2.5 | null | 2008-08-21T12:23:15.160 | 2008-08-21T12:23:15.160 | null | null | 966 | null |
19,700 | 2 | null | 19,654 | 1 | null | I think the language itself is not an issue here, as python is really nice high level language with good and easy to find, thorough documentation.
From what I've seen, the Django framework is also a great tooklit for web development, giving much the same developer performance boost Rails is touted to give.
The real i... | null | CC BY-SA 2.5 | null | 2008-08-21T12:13:51.953 | 2008-08-21T12:13:51.953 | null | null | 1,712 | null |
19,715 | 2 | null | 19,654 | 15 | null | I recently introduced Python to my company, which does consulting work for the Post Office. I did this by waiting until there was a project for which I would be the only programmer, then getting permission to do this new project in Python. I then did another small project in Python with similarly impressive results. ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:25:21.210 | 2008-09-08T01:33:20.690 | 2008-09-08T01:33:20.690 | 1,694 | 1,694 | null |
19,718 | 2 | null | 17,117 | 0 | null | The libraries I am most interested in from TR1/TR2 are [threads](http://www.open-std.org/JTC1/sc22/wg21/docs/papers/2007/n2320.html) and the related [atomics](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html).
| null | CC BY-SA 2.5 | null | 2008-08-21T12:26:48.320 | 2008-08-21T12:26:48.320 | null | null | 342 | null |
19,686 | 2 | null | 14,674 | 0 | null | @David - believe it or not this is what we actually have just now, and yet it's still causing us problems!
We're making some changes though, which are forced upon us due to moving to TeamCity and multiple build agents - so we can't have references to directories outwith the current project, as I've mentioned in my pre... | null | CC BY-SA 2.5 | null | 2008-08-21T12:04:16.643 | 2008-08-21T12:04:16.643 | null | null | 1,193 | null |
19,708 | 1 | 19,716 | null | 0 | 1,220 | To grab the inode of a file in PHP, you can use this:
```
$fs = stat($file);
echo $fs['ino'];
```
The problem with this is EVERYWHERE says it's slow and you should avoid it. So the question becomes what's the fast(er) way to do it?
| Fast(er) way to get file inode using PHP | CC BY-SA 2.5 | null | 2008-08-21T12:22:44.570 | 2015-05-26T13:05:41.627 | null | null | 497 | [
"php",
"inode"
] |
19,724 | 2 | null | 19,721 | 4 | null | Should be sufficient, as long as you use a crazy-complex password for the admin account, and make sure your http server is security-patched and up-to-date.
Also, I hope firewall != Windows Firewall.
Edit: +1 for EHaskin's suggestion of changing RD port, if only to reduce the bruteforce spam that your FW will have to ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:30:45.393 | 2008-08-21T12:35:53.773 | 2008-08-21T12:35:53.773 | 227 | 227 | null |
19,730 | 2 | null | 19,725 | 0 | null | I've got myself into a horrible mess with COM before. I had to pick my way though the registry deleting each reference, unfortunately.
| null | CC BY-SA 2.5 | null | 2008-08-21T12:32:58.227 | 2008-08-21T12:32:58.227 | null | null | 1,116 | null |
19,725 | 1 | 19,740 | null | 14 | 15,790 | Right, initially ran:
```
c:\regsvr32 Amazing.dll
```
then, (accidentally - I might add) I must have run it again, and (indeed) again when new versions of 'Amazing.dll' were released. Yes - I know I should've run:
```
c:\regsvr32 /u Amazing.dll
```
beforehand - but hey! I forgot.
To cut to the chase, when add t... | How do I unregister COM dlls initially added with RegSvr32 when the /u arg doesn't work? | CC BY-SA 3.0 | 0 | 2008-08-21T12:30:49.107 | 2012-10-19T15:19:51.147 | 2012-10-19T15:19:51.147 | 505,893 | 2,266 | [
"visual-studio",
"com",
"regsvr32",
"dllregistration"
] |
19,721 | 1 | 19,736 | null | 3 | 639 | I've just put my new server up on an IP address with a domain pointing to it. I need to be able to remote admin it. I've opened the firewall for Remote Desktop and HTTP traffic. Is this going to be secure enough? I guess I should probably rename the administrator user...
| How do I secure my new web server (Server 2008)? | CC BY-SA 2.5 | null | 2008-08-21T12:28:47.193 | 2009-03-20T16:42:52.953 | 2008-09-14T15:14:35.393 | -1 | 2,086 | [
"security"
] |
19,717 | 2 | null | 18,943 | 0 | null | As long as all three of these things are true, you're out of luck:
1. Server needs web access
2. Users need absolute control over server (root)
3. You don't want users to have server's web access
If you can't remove #2 or #3, your only choice is to remove #1. Set up an internal server that hosts all the software u... | null | CC BY-SA 2.5 | null | 2008-08-21T12:26:08.617 | 2008-08-21T12:26:08.617 | null | null | 619 | null |
19,736 | 2 | null | 19,721 | 4 | null | The absolute minimum you should do is change the Remote Desktop port, change the Admin username, and have a very strong admin password.
| null | CC BY-SA 2.5 | null | 2008-08-21T12:33:33.577 | 2008-08-21T12:33:33.577 | null | null | 100 | null |
19,732 | 2 | null | 19,713 | 8 | null | No; use integers instead of booleans.
In principle such a thing could be written (cmpxchg, the underlying processor instruction, can operate on 8, 16, 32, and 64-bit operands on x86, 8, 16, 32, 64, and 128-bit operands on x64), but in practice most APIs stick to pointer and double pointer (32 and 64-bit on x86, 64 and... | null | CC BY-SA 2.5 | null | 2008-08-21T12:33:13.907 | 2008-08-21T12:33:13.907 | null | null | 2,131 | null |
19,726 | 2 | null | 12,982 | 1 | null | there is also an argument for separating the tiers - have a set of serializable objects that get passed to and from the web service and a translator to map and convert between that set and the business objects (which might have properties not suitable for passing over the wire)
Its the approach favoured by the web ser... | null | CC BY-SA 3.0 | null | 2008-08-21T12:31:34.190 | 2015-09-22T04:56:12.220 | 2015-09-22T04:56:12.220 | 1,540,450 | null | null |
19,728 | 1 | 19,774 | null | 9 | 731 | I'm leading a project where we'll be recording metrics data. I'd like to retain the data for years. However, I'd also like to keep the primary table from becoming bloated with data that, while necessary for long term trending, isn't required for short term reporting.
What is the best strategy for handling this situati... | What is the best strategy for retainment of large data sets? | CC BY-SA 3.0 | 0 | 2008-08-21T12:31:54.783 | 2015-10-19T10:15:57.590 | 2015-10-19T10:15:57.590 | 4,370,109 | 1,683 | [
"database-design",
"dataset"
] |
19,744 | 1 | 30,681 | null | 4 | 2,312 | Is it possible to create a trigger that will not be in a transaction?
I want to update data on a linked server with a trigger but due to firewall issues we can't create a distributed transaction between the two servers.
| Trigger without a transaction? | CC BY-SA 3.0 | null | 2008-08-21T12:36:42.540 | 2021-10-28T16:19:55.443 | 2017-08-04T14:14:13.357 | 1,836,618 | 1,545 | [
"sql-server",
"tsql",
"triggers"
] |
19,713 | 1 | 19,732 | null | 11 | 2,079 | Is there an equivalent for `Interlocked.Exchange` for boolean?
Such as an atomic exchange of values that returns the previous value and doesn't require locks?
| Interlocked.Exchange, but not for booleans? | CC BY-SA 3.0 | 0 | 2008-08-21T12:24:23.333 | 2015-04-06T22:12:10.780 | 2015-04-06T22:12:10.780 | null | null | [
".net",
"multithreading"
] |
19,746 | 1 | 35,250 | null | 54 | 30,085 | I'm trying to create a webapplication where I want to be able to plug-in separate assemblies. I'm using MVC preview 4 combined with Unity for dependency injection, which I use to create the controllers from my plugin assemblies. I'm using WebForms (default aspx) as my view engine.
If I want to use a view, I'm stuck on... | Views in separate assemblies in ASP.NET MVC | CC BY-SA 2.5 | 0 | 2008-08-21T12:37:23.490 | 2015-10-05T18:33:19.103 | 2012-07-13T06:39:20.700 | 727,208 | 909 | [
"c#",
"asp.net-mvc",
"plugins"
] |
19,755 | 2 | null | 19,744 | 2 | null | I know it's not helpful, so I'll probably get downvoted for this, but really, the solution is to fix the firewall problem.
I think if you use remote (not linked) servers (which are not the preferred option these days) then you can use SET REMOTE_PROC_TRANSACTIONS OFF to prevent the use of DTC for remote transactions, ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:44:42.490 | 2008-08-21T12:44:42.490 | null | null | 2,131 | null |
19,754 | 2 | null | 19,653 | 1 | null | The two previous answers have mentioned "Managed C++", this is an old bolt-on that they did to allow you to use managed C++ in a .NET environment. It wasn't a first class citizen - unlike C++/CLI ([link text](http://en.wikipedia.org/wiki/C%2B%2B_clr). But to answer your original question, no, Visual C++ is not managed ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:44:17.590 | 2008-08-21T12:44:17.590 | null | null | 986 | null |
19,760 | 2 | null | 19,721 | 0 | null | Any chance you can set up your server as a VPN endpoint? Then you would only have the VPN ports and the HTTP ports open. When you want to RDP to the server, you would connect to the VPN first and then you're good to go.
Only reason is, if my memory serves me right, RDP traffic is not encrypted.
This is how I run ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:46:38.133 | 2008-08-21T12:46:38.133 | null | null | 37 | null |
19,767 | 2 | null | 12,927 | 1 | null | Yes they cost money, and using them can occasionally be a bit awkward, but they do provide you with a great deal more real evidence rather than guesswork.
Human beings are universally bad at guessing where performance bottlenecks are. It just seems to be something our brains aren't build to do very well. It may seem ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:49:59.327 | 2008-08-21T12:49:59.327 | null | null | 1,000 | null |
19,716 | 2 | null | 19,708 | 1 | null | You could use [fileinode()](http://php.net/fileinode) but you should run benchmarks if you think it is slow.
| null | CC BY-SA 3.0 | null | 2008-08-21T12:25:25.080 | 2015-05-26T13:05:41.627 | 2015-05-26T13:05:41.627 | 2,441,442 | 1,951 | null |
19,766 | 1 | 19,804 | null | 34 | 86,952 | What would be the best way to have a list of items with a checkbox each in Java Swing?
I.e. a JList with items that have some text and a checkbox each?
| How do I make a list with checkboxes in Java Swing? | CC BY-SA 3.0 | 0 | 2008-08-21T12:49:12.400 | 2022-11-22T15:54:53.337 | 2015-05-04T08:19:55.423 | 785,593 | 1,827 | [
"java",
"swing",
"jcheckbox"
] |
19,743 | 2 | null | 19,728 | 1 | null | Either of those options are excellent, but it really depends on the problem domain. For things like cash balances or statistical data, I think that rolling up records and consolidating them is the best way, you can then move the rolled up records into a parallel archive table, keying them in such a way that you can "un... | null | CC BY-SA 2.5 | null | 2008-08-21T12:36:42.430 | 2008-08-21T12:36:42.430 | null | null | 1,030 | null |
19,772 | 1 | 19,778 | null | 90 | 52,455 | Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that does not really meet my needs at work because it's too heavy. I'd like a function-for-function identical wrapper on cmd.exe, but with highlighting, intellisense, and (critically) a tabbed interface. Powershell is okay, but the in... | CMD.exe replacement | CC BY-SA 2.5 | 0 | 2008-08-21T12:53:46.663 | 2016-03-29T14:00:41.280 | null | null | 1,490 | [
"command-line",
"terminal"
] |
19,770 | 2 | null | 19,725 | 4 | null | There's a tool by MS that is still floating around and has been since Win95 days which scans the registry and does stuff like finds COM keys that aren't pointing at a valid file anymore etc called RegClean (I found it here: [http://downloads.zdnet.com/abstract.aspx?assetid=881470&node=2094](http://downloads.zdnet.com/a... | null | CC BY-SA 2.5 | null | 2008-08-21T12:52:11.987 | 2008-08-21T12:52:11.987 | null | null | 1,120 | null |
19,740 | 2 | null | 19,725 | 14 | null | Your object's GUID's should not be changing. In other words, once you register the COM object, re-registering shouldn't be adding anything additional to the registry.
Unless you added additional COM interfaces or objects to the project.
In any case, if this is a one time deal (and it sounds like it is), open regedit ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:35:41.543 | 2008-08-21T12:35:41.543 | null | null | 1,683 | null |
19,774 | 2 | null | 19,728 | 4 | null | We use both methods at my work, but slightly different, we keep all sales data in the primary table for 30 days, then at night (part of the nightly jobs) the days sales are rolled up into summaries (n qty of x product sold today ect) in a separate table for reporting reasons, and sales over 30 days are archived into a ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:54:23.463 | 2008-08-21T12:54:23.463 | null | null | 2,098 | null |
19,773 | 1 | 19,784 | null | 3 | 1,574 | I have a huge web app that is having issues with memory leak in IE 6.
Fixing a memory leak in a 5 line code sample that demonstrates the problem is easy.
But if I have a very huge application, where should a start from?
| Huge Web App With Memory Leak in IE 6 | CC BY-SA 2.5 | 0 | 2008-08-21T12:54:18.037 | 2012-03-01T16:33:49.730 | 2008-08-31T00:43:46.933 | 305 | 1,100 | [
"memory-leaks",
"internet-explorer-6"
] |
19,786 | 1 | 19,920 | null | 2 | 4,412 | I am maintaining an app for a client that is used in two locations. One in England and one in Poland.
The database is stored in England and uses the format £1000.00 for currency, but the information is being gathered locally in Poland where 1000,00 is the format.
My question is, in VB6 is there a function that takes ... | Local Currency String conversion | CC BY-SA 3.0 | null | 2008-08-21T12:59:45.340 | 2019-12-16T07:19:00.203 | 2014-06-04T10:28:05.410 | 1,584,106 | 1,075 | [
"vb6",
"localization",
"internationalization"
] |
19,790 | 1 | 19,805 | null | 8 | 29,677 | By default each row of a Gridview maps to each row in a datatable or dataset attached to its datasource. But what if I want to display these rows in multiple columns. For example if it has 10 rows, 5 rows each should be displayed in 2 columns side by side. Also can I do this with the Infragistics grid. Is this possible... | Display rows in multiple columns in Asp.net Gridview | CC BY-SA 2.5 | 0 | 2008-08-21T13:00:56.787 | 2015-06-30T13:20:32.200 | 2008-08-26T07:06:08.690 | 1,688,440 | 1,688,440 | [
"asp.net",
"gridview",
"infragistics",
"ultrawebgrid"
] |
19,791 | 2 | null | 19,728 | 4 | null | If you are using SQL server 2005, this may be a good candidate for using [partitioned tables](http://msdn.microsoft.com/en-us/library/ms345146.aspx).
| null | CC BY-SA 2.5 | null | 2008-08-21T13:02:24.130 | 2008-08-21T13:02:24.130 | null | null | 2,173 | null |
19,784 | 2 | null | 19,773 | 7 | null | Check out [Drip](http://sourceforge.net/projects/ieleak). That usually takes the guesswork out of IE memory leaks.
If for some reason Drip doesn't find it, take a close look at any JavaScript code that works with events. That is almost always the source of any significant memory leak in a browser.
Destroying a DOM ... | null | CC BY-SA 2.5 | null | 2008-08-21T12:59:03.173 | 2008-08-21T13:12:32.173 | 2008-08-21T13:12:32.190 | 60 | 60 | null |