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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32,690 | 2 | null | 32,664 | 15 | null | Probably the closest you can do is
```
static bool IntegerFunction<T>(T value) where T: struct
```
Not sure if you could do the following
```
static bool IntegerFunction<T>(T value) where T: struct, IComparable
, IFormattable, IConvertible, IComparable<T>, IEquatable<T>
```
For something so specific, why not jus... | null | CC BY-SA 2.5 | null | 2008-08-28T16:12:33.070 | 2008-08-28T16:12:33.070 | null | null | 598 | null |
32,692 | 2 | null | 32,668 | 152 | null | When working with CSS finally drives you mad the padded cell that they will put you in has the padding on the of the walls.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:13:09.030 | 2008-08-28T16:13:09.030 | null | null | 1,127,460 | null |
32,670 | 2 | null | 32,338 | 2 | null | Java has a few - some of the most popular static analysis tools have this built in along with many other useful rules.
Ones I have used, in the (purely subjective) order that I was happiest with:
- [PMD](http://pmd.sourceforge.net/)[CPD](http://pmd.sourceforge.net/cpd.html)- [Checkstyle](http://checkstyle.sourceforge... | null | CC BY-SA 2.5 | null | 2008-08-28T16:06:28.360 | 2008-08-28T16:06:28.360 | null | null | 1,853 | null |
32,689 | 1 | 32,714 | null | 3 | 2,152 | Currently, if I want to output a SQL script for a table in my database, in Management Studio, I can right click and output a create script.
Is there an equivalent to output an SQL script for a database's maintenance plan?#
Edit
The company I work for has 4 servers, 3 servers and no sign of integration, each one r... | In MS SQL Server 2005, is there a way to export, the complete maintenance plan of a database as a SQL Script? | CC BY-SA 2.5 | null | 2008-08-28T16:12:06.427 | 2008-11-17T21:48:02.897 | 2008-11-17T21:48:02.910 | 3,743 | 978 | [
"sql",
"sql-server",
"sql-server-2005"
] |
32,688 | 2 | null | 14,530 | 27 | null | LINQ will bloat the procedure cache
If an application is using LINQ to SQL and the queries involve the use of strings that can be highly variable in length, the SQL Server procedure cache will become bloated with one version of the query for every possible string length. For example, consider the following very simple... | null | CC BY-SA 3.0 | null | 2008-08-28T16:11:55.537 | 2015-05-21T23:29:14.830 | 2015-05-21T23:29:14.830 | 2,450,507 | 740 | null |
32,699 | 2 | null | 32,664 | 2 | null | I was wondering the same as samjudson, why only to integers? and if that is the case, you might want to create a helper class or something like that to hold all the types you want.
If all you want are integers, don't use a generic, that is not generic; or better yet, reject any other type by checking its type.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:14:20.900 | 2008-08-28T16:14:20.900 | null | null | 2,684 | null |
32,693 | 2 | null | 32,637 | 7 | null | I did this exact same thing with [jquery consuming the JSON API](http://ralphwhitbeck.com/2007/11/20/PullingTwitterUpdatesWithJSONAndJQuery.aspx) here is the linkify function:
```
String.prototype.linkify = function() {
return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/, function(m) {
... | null | CC BY-SA 2.5 | null | 2008-08-28T16:13:18.047 | 2010-11-11T15:14:52.810 | 2010-11-11T15:14:52.810 | 648 | 648 | null |
32,696 | 2 | null | 32,668 | 3 | null | I've just learnt it over time - the box model is fairly simple but the main reason people find it hard is because `body` doesn't visibly break the model.
Really, if you give `body` a margin and a background you should see it surrounded by a white strip. However this isn't the case - `body`'s padding is the same as mar... | null | CC BY-SA 2.5 | null | 2008-08-28T16:13:49.230 | 2008-08-28T16:13:49.230 | null | null | 2,025 | null |
32,704 | 2 | null | 31,053 | 68 | null | It might be faster if you use this.
```
(?<!\r)\n
```
It basically looks for any \n that is not preceded by a \r. This would most likely be faster, because in the other case, almost every letter matches [^\r], so it would capture that, and then look for the \n after that. In the example I gave, it would only stop... | null | CC BY-SA 2.5 | null | 2008-08-28T16:16:15.527 | 2008-08-28T16:16:15.527 | null | null | 1,862 | null |
32,703 | 2 | null | 32,649 | 4 | null | I've gotten this error in a circumstance completely unrelated to what the error message describes.
What I did was load a LINQ object via one DataContext, and then tried to SubmitChanges() for the object via a different DataContext - gave this exact same error.
What I had to do was call DataContext.Table.Attach(myOldO... | null | CC BY-SA 2.5 | null | 2008-08-28T16:15:58.383 | 2008-08-28T16:15:58.383 | null | null | 35 | null |
32,658 | 2 | null | 32,529 | 22 | null | Incase anyone else needs this in the future:
```
class DirectoryRestrictedFileSystemView extends FileSystemView
{
private final File[] rootDirectories;
DirectoryRestrictedFileSystemView(File rootDirectory)
{
this.rootDirectories = new File[] {rootDirectory};
}
DirectoryRestrictedFileSyste... | null | CC BY-SA 2.5 | null | 2008-08-28T15:57:59.020 | 2008-08-28T15:57:59.020 | null | null | 2,443 | null |
32,706 | 2 | null | 9,033 | 17 | null | I love using the @ character for SQL queries. It keeps the sql nice and formatted and without having to surround each line with a string delimiter.
```
string sql = @"SELECT firstname, lastname, email
FROM users
WHERE username = @username AND password = @password";
```
| null | CC BY-SA 2.5 | null | 2008-08-28T16:17:15.883 | 2008-08-28T16:17:15.883 | null | null | 3,453 | null |
32,687 | 2 | null | 32,664 | 99 | null | There's no constraint for this. It's a real issue for anyone wanting to use generics for numeric calculations.
I'd go further and say we need
```
static bool GenericFunction<T>(T value)
where T : operators( +, -, /, * )
```
Or even
```
static bool GenericFunction<T>(T value)
where T : Add, Subtract
```
... | null | CC BY-SA 2.5 | null | 2008-08-28T16:11:43.620 | 2008-08-28T16:33:13.147 | 2008-08-28T16:33:13.147 | 905 | 905 | null |
32,711 | 2 | null | 32,633 | 33 | null | Place `debugger;` in your external script file on the line you want to break on.
| null | CC BY-SA 3.0 | null | 2008-08-28T16:18:42.557 | 2014-08-08T08:51:00.387 | 2014-08-08T08:51:00.387 | 68,283 | 1,790 | null |
32,705 | 2 | null | 32,649 | 24 | null | Here's a way to see where the conflicts are (this is an MSDN example, so you'll need to heavily customize):
```
try
{
db.SubmitChanges(ConflictMode.ContinueOnConflict);
}
catch (ChangeConflictException e)
{
Console.WriteLine("Optimistic concurrency error.");
Console.WriteLine(e.Message);
Console.ReadLi... | null | CC BY-SA 2.5 | null | 2008-08-28T16:16:19.787 | 2008-08-28T16:16:19.787 | null | null | 1,975,282 | null |
32,708 | 2 | null | 32,649 | 19 | null | These (which you could add in a partial class to your datacontext might help you understand how this works:
```
public void SubmitKeepChanges()
{
try
{
this.SubmitChanges(ConflictMode.ContinueOnConflict);
}
catch (ChangeConflictException e)
{
foreach (ObjectChangeConflict occ in thi... | null | CC BY-SA 2.5 | null | 2008-08-28T16:17:33.683 | 2008-08-28T16:17:33.683 | null | null | 224 | null |
32,714 | 2 | null | 32,689 | 2 | null | You can't export them as scripts, but if your intention is to migrate them between server instances then you can import and export them as follows:
Connect to Integration Services and expand Stored Packages>MSDB>Maintenance Plans. You can then right click on the plan and select import or export
| null | CC BY-SA 2.5 | null | 2008-08-28T16:20:07.843 | 2008-08-28T16:20:07.843 | null | null | 770 | null |
32,712 | 2 | null | 32,586 | 1 | null | I like the answer on [jGuru](http://www.jguru.com/faq/view.jsp?EID=1297118) that lists the option of using [JNI](http://en.wikipedia.org/wiki/Java_Native_Interface) to get the answer. This might prove to be faster than shelling out and you may encounter other situations such as this that need to be implemented specific... | null | CC BY-SA 2.5 | null | 2008-08-28T16:19:14.693 | 2008-08-28T16:19:14.693 | null | null | 1,741 | null |
32,715 | 1 | 32,812 | null | 18 | 12,135 | When using the app_offline.htm feature of ASP.NET, it only allows html, but no images. Is there a way to get images to display ?
| Is there a way to get images to display with ASP.NET and app_offline.htm? | CC BY-SA 2.5 | 0 | 2008-08-28T16:20:19.387 | 2022-06-20T07:54:47.907 | 2008-08-28T17:53:09.740 | 820 | 820 | [
"asp.net",
"iis-6"
] |
32,716 | 2 | null | 32,280 | 4 | null | Also not of immediate use, but related to the mention of Spec#... There's a proposal to add "null-safe types" to a future version of Java: ["Enhanced null handling - Null-safe types"](http://docs.google.com/View?docid=dfn5297z_2kjj2fk).
Under the proposal, your method would become
```
public class MetricsCalculator {... | null | CC BY-SA 2.5 | null | 2008-08-28T16:20:36.127 | 2008-08-28T16:20:36.127 | null | null | 1,412 | null |
32,718 | 1 | 32,743 | null | 3 | 7,976 | How do you set the Windows time zone on the local machine programmatically in C#? Using an interactive tool is not an option because the remote units have no user interface or users. The remote machine is running .NET 2.0 and Windows XP Embedded and a local app that communicates with a central server (via web service... | Setting time zone remotely in C# | CC BY-SA 2.5 | 0 | 2008-08-28T16:21:21.973 | 2010-01-29T11:42:34.343 | 2008-08-28T17:18:04.660 | 1,414 | 3,457 | [
"c#",
".net",
"windows",
"localization",
"timezone"
] |
32,722 | 2 | null | 32,689 | 0 | null | I don't think you can do that with Maintenance Plans, because those are DTS packages, well now they are called SSIS (SQL Server Integration Services).
There was a stored procedure from which you could add maintenance plans, but I think that it may be deprecated. (sp_add_maintenance_plan). I don't have a SQL 2005 to t... | null | CC BY-SA 2.5 | null | 2008-08-28T16:22:29.070 | 2008-08-28T16:22:29.070 | null | null | 2,684 | null |
32,726 | 2 | null | 32,668 | 1 | null | Create yourself a commented base stylesheet which you can use as a template whenever you need to create a new site or edit an existing site.
You can add to it as you grow in knowledge and apply it to various different browsers to see how various things behave.
You'll also be able to add in comments or examples about ... | null | CC BY-SA 2.5 | null | 2008-08-28T16:24:24.087 | 2008-08-28T16:24:24.087 | null | null | 1,970 | null |
32,733 | 1 | 32,807 | null | 5 | 3,089 | I would like to intercept the event in a .NET Windows Forms TabControl when the user has changed tab by double-clicking the tab (instead of just single-clicking it).
Do you have any idea of how I can do that?
| .NET : Double-click event in TabControl | CC BY-SA 2.5 | null | 2008-08-28T16:28:25.280 | 2011-09-21T19:39:29.297 | null | null | 1,508 | [
"c#",
".net",
"vb.net",
"winforms",
"tabcontrol"
] |
32,742 | 2 | null | 26,799 | 0 | null | I use SuperDuper! and backup my Virtual Machine to another external drive (i have two).
All the code is on a SVN server.
I have a clean VM in case mine fails. But in either case it takes me a couple of hours to install WinXP+Vstudio. i don't use anything else in that box.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:34:45.857 | 2008-08-28T16:34:45.857 | null | null | 2,684 | null |
32,727 | 2 | null | 32,664 | 16 | null | Unfortunately you are only able to specify struct in the where clause in this instance. It does seem strange you can't specify Int16, Int32, etc. specifically but I'm sure there's some deep implementation reason underlying the decision to not permit value types in a where clause.
I guess the only solution is to do a r... | null | CC BY-SA 2.5 | null | 2008-08-28T16:24:34.150 | 2008-08-28T16:24:34.150 | null | null | 3,394 | null |
32,686 | 2 | null | 32,537 | 2 | null | > I am thinking more along the lines of Ruby, ...
Well for Ruby the `irb` interactive prompt is a great tool for "practicing" something simple. Here are the things I'll mention about the irb to give you an idea of effective use:
- . You are allowed a `.irbrc` file that will be automatically executed when launching ... | null | CC BY-SA 3.0 | null | 2008-08-28T16:11:07.473 | 2017-09-13T06:16:06.790 | 2017-09-13T06:16:06.790 | 6,761,181 | 792 | null |
32,743 | 2 | null | 32,718 | 3 | null | [SetTimeZoneInformation](http://msdn.microsoft.com/en-us/library/ms724944.aspx) should do what you need. You'll need to use [P/Invoke](http://pinvoke.net/default.aspx/kernel32/SetTimeZoneInformation.html) to get at it.
Note also that you'll need to possess and enable the SE_TIME_ZONE_NAME privilege.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:34:55.950 | 2008-08-28T16:34:55.950 | null | null | null | null |
32,749 | 2 | null | 32,747 | 224 | null | ```
DateTime.Now.ToString("M/d/yyyy");
```
[http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx](http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx)
| null | CC BY-SA 3.0 | null | 2008-08-28T16:37:44.680 | 2013-05-22T16:13:21.720 | 2013-05-22T16:13:21.720 | 179,669 | 3,043 | null |
32,717 | 1 | 188,237 | null | 4 | 1,252 | I just finished setting up an out-of-place build system for our existing C++ code using inherited property sheets, a feature that seems to be specific to the Visual C++ product. Building out-of-place requires that many of the project settings be changed, and the inherited property sheets allowed me to change all the ne... | Out-of-place builds with C# | CC BY-SA 2.5 | null | 2008-08-28T16:21:03.800 | 2008-10-09T17:09:15.890 | null | null | 3,114 | [
"c#",
"msbuild",
"build-process"
] |
32,744 | 1 | 32,776 | null | 15 | 3,634 | For the past few weeks, I've been trying to learn about just how email works. I understand the process of a client receiving mail from a server using POP pretty well. I also understand how a client computer can use SMTP to ask an SMTP server to send a message. However, I'm still missing something...
The way I under... | What protocols and servers are involved in sending an email, and what are the steps? | CC BY-SA 3.0 | 0 | 2008-08-28T16:35:52.143 | 2021-03-06T16:15:35.623 | 2012-07-04T18:58:50.643 | 1,001,985 | 1,615 | [
"email",
"smtp",
"pop3"
] |
32,751 | 2 | null | 32,747 | 17 | null | ```
DateTime.Now.ToString("dd/MM/yyyy");
```
| null | CC BY-SA 3.0 | null | 2008-08-28T16:38:49.123 | 2011-10-31T05:49:59.993 | 2011-10-31T05:49:59.993 | 709,202 | 1,736 | null |
32,750 | 1 | 32,841 | null | 6 | 12,681 | I have a `byte[]` array, the contents of which represent a TIFF file (as in, if I write out these bytes directly to a file using the `BinaryWriter` object, it forms a perfectly valid TIFF file) and I'm trying to turn it into a System.Drawing.Image object so that I can use it for later manipulation (feeding into a multi... | How can I take a byte array of a TIFF image and turn it into a System.Drawing.Image object? | CC BY-SA 2.5 | 0 | 2008-08-28T16:38:10.827 | 2014-02-17T20:10:15.710 | 2008-09-10T00:13:46.527 | -1 | 2,577 | [
"c#",
".net",
"image",
"tiff"
] |
32,752 | 2 | null | 32,747 | 5 | null | ```
DateTime.Now.Date.ToShortDateString()
```
I think this is what you are looking for
| null | CC BY-SA 3.0 | null | 2008-08-28T16:39:21.900 | 2016-04-10T04:38:59.363 | 2016-04-10T04:38:59.363 | 1,402,846 | 2,486 | null |
32,759 | 2 | null | 32,747 | 4 | null | Or without the year:
```
DateTime.Now.ToString("M/dd")
```
| null | CC BY-SA 3.0 | null | 2008-08-28T16:41:29.273 | 2016-04-10T04:38:51.783 | 2016-04-10T04:38:51.783 | 1,402,846 | 1,358 | null |
32,758 | 2 | null | 32,747 | 8 | null | ```
DateTime.Now.Date.ToShortDateString()
```
is culture specific.
It is best to stick with:
```
DateTime.Now.ToString("d/MM/yyyy");
```
| null | CC BY-SA 3.0 | null | 2008-08-28T16:41:25.450 | 2012-09-24T19:14:00.060 | 2012-09-24T19:14:00.060 | 63,550 | 1,736 | null |
32,764 | 2 | null | 32,747 | 8 | null | ```
string today = DateTime.Today.ToString("M/d");
```
| null | CC BY-SA 2.5 | null | 2008-08-28T16:42:07.477 | 2008-08-28T16:42:07.477 | null | null | 3,447 | null |
32,694 | 1 | null | null | 3 | 13,822 | I'm trying to use for authentication on a st of machines. I had to change one of the user ID numbers for a user account on the NIS server (I changed the userid for `username` from 500 to 509 to avoid a conflict with a local user account with id 500 on the clients). The problem is that it has not updated properly on th... | "ypcat" and "ypmatch username passwd" don't agree after change on server | CC BY-SA 3.0 | 0 | 2008-08-28T16:13:19.467 | 2017-01-03T22:57:30.437 | 2012-04-26T01:28:40.580 | 1,332,690 | 742 | [
"linux",
"nis"
] |
32,760 | 2 | null | 32,747 | 9 | null | If you want it without the year:
```
DateTime.Now.ToString("MM/DD");
```
DateTime.ToString() has a lot of cool format strings:
[http://msdn.microsoft.com/en-us/library/aa326721.aspx](http://msdn.microsoft.com/en-us/library/aa326721.aspx)
| null | CC BY-SA 2.5 | null | 2008-08-28T16:41:40.507 | 2008-08-28T16:41:40.507 | null | null | 1,965 | null |
32,765 | 2 | null | 32,744 | 1 | null | Step 2 to 3 (i.e. Gmail to Hotmail) would normally happen through SMTP (or ESMTP - extended SMTP).
Hotmail doesn't send anything to a client via POP3. It's important to understand some of the nuances here. The client contacts Hotmail via POP3 and requests its mail. (i.e. the client initiates the discussion).
| null | CC BY-SA 3.0 | null | 2008-08-28T16:42:23.670 | 2012-07-04T19:01:35.400 | 2012-07-04T19:01:35.400 | 1,001,985 | 1,087 | null |
32,769 | 2 | null | 32,494 | 1 | null | The "error bar" functionality is provided in JetBrains ReSharper. I'm not sure if it does highlighting of references to the currently selected identifier.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:44:53.947 | 2008-08-28T16:44:53.947 | null | null | null | null |
32,754 | 2 | null | 32,744 | 5 | null | You're looking for the Mail Transfer Agent, Wikipedia has [a nice article](http://en.wikipedia.org/wiki/Mail_transfer_agent) on the topic.
> Within Internet message handling services (MHS), a message transfer agent or mail transfer agent (MTA) or mail relay is software that transfers electronic mail messages from one c... | null | CC BY-SA 3.0 | null | 2008-08-28T16:40:26.140 | 2012-07-04T19:00:46.180 | 2020-06-20T09:12:55.060 | -1 | 2,025 | null |
32,770 | 2 | null | 32,694 | 1 | null | OK, I found the problem, I also had to restart the NIS service on the server to get it to refresh everything (`"service ypserv restart"`)
| null | CC BY-SA 2.5 | null | 2008-08-28T16:45:06.817 | 2008-08-28T16:45:06.817 | null | null | 742 | null |
32,709 | 1 | 32,778 | null | 21 | 3,397 | Haven't fired up reflector to look at the difference but would one expect to see the exact same compiled code when comparing `Func<T, bool>` vs. `Predicate<T>`
I would imagine there is no difference as both take a generic parameter and return bool?
| Isn't Func<T, bool> and Predicate<T> the same thing after compilation? | CC BY-SA 2.5 | 0 | 2008-08-28T16:17:52.090 | 2013-02-23T21:40:31.120 | 2012-04-18T13:52:23.340 | 41,956 | 2,993 | [
"c#",
".net",
"predicate",
"func"
] |
32,775 | 2 | null | 32,744 | 2 | null | The first server will look at DNS for a MX record of Hotmail server. MX is a special record that defines a mail server for a certain domain. Knowing IP address of Hotmail server, GMail server will sent the message using SMTP protocol and will wait for an answer. If Hotmail server goes down, GMail server wiil try to res... | null | CC BY-SA 2.5 | null | 2008-08-28T16:47:29.853 | 2008-08-28T16:47:29.853 | null | null | 3,221 | null |
32,771 | 2 | null | 32,360 | 1 | null | @bosnic:
> You have a table CLIENT that has a 1:1 relationship with table SALES_OFFICE because, for example, the logic of your system says so.
What your app logic says, and what your data model say are 2 different things. There is nothing wrong with enforcing that relationship with your business logic code, but it h... | null | CC BY-SA 2.5 | null | 2008-08-28T16:45:19.747 | 2008-08-28T16:45:19.747 | null | null | 2,199 | null |
32,778 | 2 | null | 32,709 | 18 | null | They share the same signature, but they're still different types.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:48:26.357 | 2008-08-28T16:48:26.357 | null | null | 3,426 | null |
32,777 | 1 | 32,785 | null | 15 | 3,150 | I've found a few (unfortunately, they are bookmarked at home and I'm at work, so no links), but I was wondering if anyone had any opinions about any of them (love it, hate it, whatever) so I could make a good decision. I think I'm going to use Cygwin for my Unix commands on Windows, but I'm not sure how well that's goi... | What is the best and most complete implementation of Unix system commands for Windows? | CC BY-SA 3.0 | 0 | 2008-08-28T16:48:23.843 | 2013-05-09T16:19:48.080 | 2013-05-09T16:08:31.880 | 1,777,846 | 572 | [
"windows",
"unix",
"command-line"
] |
32,776 | 2 | null | 32,744 | 18 | null | The SMTP server at Gmail (which accepted the message from Thunderbird) will route the message to the final recipient.
It does this by using DNS to find the MX (mail exchanger) record for the domain name part of the destination email address (hotmail.com in this example). The DNS server will return an IP address which ... | null | CC BY-SA 2.5 | null | 2008-08-28T16:47:51.113 | 2008-08-28T17:29:24.493 | 2008-08-28T17:29:24.493 | 2,599 | 2,599 | null |
32,784 | 2 | null | 31,935 | 1 | null | Use a timer control that will be fired after a certain number of milliseconds (for page to load). In the timer tick event refresh the update panel.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:49:36.197 | 2008-08-28T16:49:36.197 | null | null | 3,465 | null |
32,766 | 1 | 32,865 | null | 7 | 4,173 | Every few days VS2008 decides to get mad at me and fails to generate a designer file claiming it cannot find the file specified and that it's missing an assembly. Here's the scenario:
The aspx page has a reference to a custom user control (inheriting UserControl) which references another assembly in the backend. The... | generation of designer file failed | CC BY-SA 2.5 | 0 | 2008-08-28T16:42:42.797 | 2012-03-08T02:57:16.913 | null | null | 3,460 | [
"visual-studio",
"visual-studio-2008"
] |
32,785 | 2 | null | 32,777 | 5 | null | These work very well for me: [http://unxutils.sourceforge.net/](http://unxutils.sourceforge.net/).
Cygwin is not so good on Vista or 64 bit, so I stopped using it a while back.
| null | CC BY-SA 3.0 | null | 2008-08-28T16:50:57.113 | 2013-05-09T16:19:48.080 | 2013-05-09T16:19:48.080 | 1,777,846 | 1,219 | null |
32,780 | 1 | 32,797 | null | 1 | 1,144 | Recently we got a new server at the office purely for testing purposes. It is set up so that we can access it from any computer.
However today our ip got blocked from one of our other sites saying that our ip has been suspected of having a virus that sends spam emails. we learned this from the cbl [http://cbl.abuseat... | Restrict the server access from LAN only | CC BY-SA 3.0 | null | 2008-08-28T16:48:46.930 | 2017-11-28T20:17:47.857 | 2017-11-28T20:17:47.857 | 5,251,104 | 1,925 | [
"server",
"router",
"lan",
"wan"
] |
32,792 | 2 | null | 32,777 | 1 | null | Linux/BSD :)
| null | CC BY-SA 2.5 | null | 2008-08-28T16:53:32.800 | 2008-08-28T16:53:32.800 | null | null | 1,797 | null |
32,791 | 2 | null | 32,280 | 0 | null | Thwrowing C# `ArgumentException`, or Java `IllegalArgumentException` right at the beginning of the method looks to me as the clearest of solutions.
One should always be careful with Runtime Exceptions - exceptions that are not declared on the method signature. Since the compiler doesn't enforce you to catch these it'... | null | CC BY-SA 2.5 | null | 2008-08-28T16:53:18.263 | 2008-08-28T16:53:18.263 | null | null | 3,087 | null |
32,790 | 1 | 33,008 | null | 25 | 21,152 | For various reasons calling `System.exit` is frowned upon when writing , so how can I notify the calling process that not everything is going according to plan?
The 1 is a `standin` for any non-zero exit code.
| Alternatives to System.exit(1) | CC BY-SA 3.0 | 0 | 2008-08-28T16:52:44.067 | 2020-03-24T07:03:25.617 | 2014-11-30T10:27:07.903 | 3,867,570 | 2,443 | [
"java",
"process"
] |
32,793 | 2 | null | 32,790 | 0 | null | It's frowned upon for exits. If "not everything is going according to plan", then System.exit is fine.
Update: I should add that I assume your '1' has meaning that is documented somewhere.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:53:44.843 | 2008-08-28T18:13:28.117 | 2008-08-28T18:13:28.117 | 3,043 | 3,043 | null |
32,794 | 2 | null | 32,513 | 0 | null | I don't have access to the server itself, so I can't check that. I can only chmod files and folder from my FTP client.
I think my hosting provider needs to grant write permission to the network service account on the App_Data folder.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:54:08.043 | 2008-08-28T16:54:08.043 | null | null | 2,972 | null |
32,783 | 2 | null | 26,799 | 0 | null | I use xcopy to copy all my personal files to an external hard drive on startup.
Here's my startup.bat:
xcopy d:\files f:\backup\files /D /E /Y /EXCLUDE:BackupExclude.txt
This recurses directories, only copies files that have been modified and suppresses the message to replace an existing file, the list of files/fold... | null | CC BY-SA 2.5 | null | 2008-08-28T16:49:33.967 | 2008-08-28T16:49:33.967 | null | null | 1,952 | null |
32,800 | 2 | null | 32,744 | 2 | null | If you really want to know how email works you could read the [SMTP RFC](http://www.lesnikowski.com/mail/Rfc/rfc2821.txt) or the [POP3 RFC](http://www.lesnikowski.com/mail/Rfc/rfc1939.txt).
| null | CC BY-SA 2.5 | null | 2008-08-28T16:55:20.613 | 2008-08-28T16:55:20.613 | null | null | 1,736 | null |
32,804 | 2 | null | 32,790 | 1 | null | It can be dangerous / problematic in web servlet environments also.
Throwing an Exception is generally considered the other alternative.
| null | CC BY-SA 2.5 | null | 2008-08-28T16:57:02.950 | 2008-08-28T16:57:02.950 | null | null | 1,087 | null |
32,801 | 2 | null | 32,598 | 2 | null | I believe as long as the use of the relevant SVN tools is enabled, you should have no problem - like others said, you can always set up a server later on.
My tip then, is to make sure you can use [ToroiseSVN](http://tortoisesvn.net/downloads) and the Collabnet subversion client.
One major tip to ease the setup of an ... | null | CC BY-SA 2.5 | null | 2008-08-28T16:55:28.897 | 2008-08-28T16:55:28.897 | null | null | 1,596 | null |
32,803 | 1 | 32,806 | null | 4 | 268 | This question comes on the heels of the question asked [here](https://stackoverflow.com/questions/371/how-do-you-make-sure-email-you-send-programmatically-is-not-automatically-marke).
The email that comes from our web server comes from an IP address that is different than that for the Exchange server. Is this okay if ... | Email Delivery Question | CC BY-SA 2.5 | null | 2008-08-28T16:56:51.920 | 2008-10-05T06:21:58.993 | 2017-05-23T12:13:34.533 | -1 | 2,535 | [
"email",
"email-spam"
] |
32,806 | 2 | null | 32,803 | 3 | null | Short answer: Yes
| null | CC BY-SA 2.5 | null | 2008-08-28T16:58:23.787 | 2008-08-28T16:58:23.787 | null | null | 1,087 | null |
32,805 | 2 | null | 32,777 | 0 | null | [Why vote down this question](https://stackoverflow.com/questions/32777/what-is-the-best-and-most-complete-implementation-of-unix-system-commands#32792)? It's obviously meant to be tongue in cheek is it worth the voter and the receiver losing rep over? Can't you people leave anything at zero and mark up the answers y... | null | CC BY-SA 2.5 | null | 2008-08-28T16:57:58.687 | 2008-08-28T16:57:58.687 | 2017-05-23T12:33:26.220 | -1 | 269 | null |
32,807 | 2 | null | 32,733 | 3 | null | The MouseDoubleClick event of the TabControl seems to respond just fine to double-clicking. The only additional step I would do is set a short timer after the TabIndexChanged event to track that a new tab has been selected and ignore any double-clicks that happen outside the timer. This will prevent double-clicking o... | null | CC BY-SA 2.5 | null | 2008-08-28T16:58:31.870 | 2008-08-28T16:58:31.870 | null | null | 2,470 | null |
32,797 | 2 | null | 32,780 | 1 | null | I assume that this server is behind a router? You should be able to block `WAN` connections to the server on the router and still leave it open to accepting `LAN` connection. Or you could restrict the `IPs` that can connect to the server to the development machines on the network.
| null | CC BY-SA 3.0 | null | 2008-08-28T16:54:44.903 | 2015-04-17T06:59:58.390 | 2015-04-17T06:59:58.390 | 720,133 | 3,460 | null |
32,811 | 2 | null | 32,790 | 2 | null | Our company's policy is that it's OK (even preferred) to call System.exit(-1), but only in init() methods. I would definitely think twice before calling it during a program's normal flow.
| null | CC BY-SA 2.5 | null | 2008-08-28T17:03:15.273 | 2008-08-28T17:03:15.273 | null | null | 1,471 | null |
32,810 | 2 | null | 32,766 | 0 | null | You might try archiving a template of a new file with its designer equivalent. If VS coughs then you can do an "Add Existing" option with the file you already have.
It seems, however, to be an issue with your installation of VS2008 so you might try reinstalling it.
| null | CC BY-SA 2.5 | null | 2008-08-28T17:03:13.607 | 2008-08-28T17:03:13.607 | null | null | 64 | null |
32,808 | 2 | null | 32,280 | 0 | null | The best way to handle this really would be the use of exceptions. Ultimately, the asserts are going to end up giving a experience to the end user but provide no way for the developer calling your code to handle the situation before showing an exception to the end user. Ultimatley, you want to ensure that you test for... | null | CC BY-SA 2.5 | null | 2008-08-28T16:59:05.923 | 2008-08-28T16:59:05.923 | null | null | 1,559 | null |
32,814 | 1 | 32,996 | null | 14 | 8,879 | I'm using an older version of ASP.NET AJAX due to runtime limitations, Placing a ASP.NET Validator inside of an update panel does not work. Is there a trick to make these work, or do I need to use the ValidatorCallOut control that comes with the AJAX toolkit?
| ASP.NET Validators inside an UpdatePanel | CC BY-SA 2.5 | 0 | 2008-08-28T17:03:59.610 | 2016-01-12T14:00:19.643 | 2008-11-03T15:26:55.923 | 6,461 | 1,965 | [
"asp.net",
"asp.net-ajax",
"updatepanel"
] |
32,813 | 2 | null | 32,744 | 1 | null | All emails are transferred using SMTP (or ESMTP).
The important thing to understand is that the when you send message to someguy@hotmail.com this message's destination is not his PC. The destination is someguy's inbox folder at hotmail.com server.
After the message arrives at it's destination. The user can check if h... | null | CC BY-SA 2.5 | null | 2008-08-28T17:03:57.987 | 2011-02-14T11:23:39.733 | 2011-02-14T11:23:39.733 | 1,534 | 1,534 | null |
32,812 | 2 | null | 32,715 | 13 | null | Yes, it just can't come from the site that has the app_offline.htm file. The image would have to be hosted elsewhere.
| null | CC BY-SA 2.5 | null | 2008-08-28T17:03:27.160 | 2008-08-28T17:03:27.160 | null | null | 1,627 | null |
32,816 | 2 | null | 32,493 | 1 | null | is probably your biggest asset. Like creative writing, and even programming, and they have done will give you to put in your toolbox.
But in the sense of graphic design (photoshop, illustrator, etc), just like programmers don't enjoy reinventing the wheel, I don't think artwork is any different. Search the web f... | null | CC BY-SA 2.5 | null | 2008-08-28T17:04:26.253 | 2008-08-28T17:04:26.253 | null | null | 568 | null |
32,817 | 2 | null | 32,790 | 1 | null | Throwing exceptions is the best way to send information about a certain error up and out of the app.
A number doesn't tell you as much as:
```
Exception at thread 'main': FileNotFoundException "The file 'foo' doesn't exist"
```
(or something close to that)
| null | CC BY-SA 2.5 | null | 2008-08-28T17:05:22.447 | 2008-08-28T17:05:22.447 | null | null | 2,598 | null |
32,819 | 2 | null | 32,747 | 23 | null | Not to be horribly pedantic, but if you are internationalising the code it might be more useful to have the facility to get the short date for a given culture, e.g.:-
```
using System.Globalization;
using System.Threading;
...
var currentCulture = Thread.CurrentThread.CurrentCulture;
try {
Thread.CurrentThread.Cur... | null | CC BY-SA 2.5 | null | 2008-08-28T17:05:48.403 | 2008-08-28T17:05:48.403 | null | null | 3,394 | null |
32,829 | 2 | null | 32,733 | 0 | null | How about subclassing the TabControl class and adding your own DoubleClick event?
| null | CC BY-SA 2.5 | null | 2008-08-28T17:10:55.677 | 2008-08-28T17:10:55.677 | null | null | 1,747 | null |
32,827 | 2 | null | 24,580 | 2 | null | As of [Visual Studio 2005](http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_2005), all of the project files (at least for .NET based projects) are actual [MSBuild](http://en.wikipedia.org/wiki/MSBuild) files, so you can call MSBuild on the command line and pass it the project file.
The bottom line is... | null | CC BY-SA 3.0 | null | 2008-08-28T17:09:14.947 | 2013-08-30T08:34:01.387 | 2013-08-30T08:34:01.387 | 63,550 | 1,559 | null |
32,779 | 2 | null | 32,718 | 0 | null | Try this...
First, you need to find, in the registry, the that represents the zone you want ("Central Standard Time" is an example). Those are located here:
> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Time Zones
So, with that in mind, create a batch file, "SetTimeZone.bat" with the following ... | null | CC BY-SA 2.5 | null | 2008-08-28T16:48:38.117 | 2008-08-28T16:48:38.117 | null | null | 1,790 | null |
32,747 | 1 | 32,749 | null | 114 | 394,738 | How do I get today's date in C# in mm/dd/yyyy format?
I need to set a string variable to today's date (preferably without the year), but there's got to be a better way than building it month-/-day one piece at a time.
BTW: I'm in the US so M/dd would be correct, e.g. September 11th is 9/11.
[kronoz's answer](https... | How do I get today's date in C# in mm/dd/yyyy format? | CC BY-SA 3.0 | 0 | 2008-08-28T16:37:10.860 | 2019-01-08T10:10:17.863 | 2017-05-23T12:10:40.127 | -1 | 730 | [
"c#",
"date"
] |
32,835 | 1 | 32,859 | null | 10 | 4,783 | So I'm interested in hearing different thoughts about what is the best way to go about unit testing XNA Game/Applications. Astute googlers can probably figure out why I'm asking, but I didn't want to bias the topic :-)
| XNA Unit Testing | CC BY-SA 2.5 | 0 | 2008-08-28T17:12:57.887 | 2009-11-06T21:26:01.233 | null | null | 3,433 | [
"unit-testing",
"xna"
] |
32,732 | 2 | null | 26,148 | 3 | null | Here's where I'd start:
1. Get Process Explorer and show %Time in JIT, %Time in GC, CPU Cycles Delta, CPU Time, CPU %, and Threads.
2. You'll also want kernel and user time, and a couple of representative stack traces but I think you have to hit Properties to get snapshots.
3. Compare before and after shots.
A cou... | null | CC BY-SA 2.5 | null | 2008-08-28T16:27:51.647 | 2008-08-28T16:27:51.647 | null | null | 2,199 | null |
32,850 | 2 | null | 2,767 | 4 | null | [MZTools](http://mztools.com/index.aspx) is great too.
| null | CC BY-SA 2.5 | null | 2008-08-28T17:19:15.190 | 2008-08-28T17:19:15.190 | null | null | 1,559 | null |
32,849 | 2 | null | 32,777 | 2 | null | [Powershell](http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx) is what you are looking for, it contains aliases for a lot of UNIX commands and a lot more besides.
John
| null | CC BY-SA 2.5 | null | 2008-08-28T17:17:46.970 | 2008-08-28T17:17:46.970 | null | null | 3,305 | null |
32,841 | 2 | null | 32,750 | 2 | null | The assumption below is not correct, I had a chance to fire up my IDE later and tested with and without Write and both populated the MemoryStream correctly.
I think you need to write to your MemeoryStream first.
As if my memory (no pun intended) serves me correctly this:
```
MemoryStream ms = new MemoryStream(byteA... | null | CC BY-SA 2.5 | null | 2008-08-28T17:15:42.530 | 2008-08-29T07:18:44.407 | 2008-08-29T07:18:44.407 | 1,970 | 1,970 | null |
32,830 | 2 | null | 32,493 | 2 | null | I'm no artist and I'm colorblind, but I have been able to do fairly well with track creation for Motocross Madness and other games of that type ([http://twisteddirt.com](http://twisteddirt.com) & [http://dirttwister.com](http://dirttwister.com)).
Besides being familiar with the toolset I believe it helps to bring out... | null | CC BY-SA 2.5 | null | 2008-08-28T17:11:24.070 | 2008-08-28T17:11:24.070 | null | null | 791 | null |
32,707 | 2 | null | 32,519 | 3 | null | Have you tried explicitly enabling double-buffering on the JList and/or the components that it is drawing over? (with:[setDoubleBuffered(boolean aFlag)](http://java.sun.com/javase/6/docs/api/javax/swing/JComponent.html#setDoubleBuffered(boolean)))
Another thought is that you need to exit the function immediately afte... | null | CC BY-SA 2.5 | null | 2008-08-28T16:17:19.207 | 2008-08-28T16:17:19.207 | null | null | 3,446 | null |
32,854 | 2 | null | 32,845 | -1 | null | I don't think a complete system restore would be a good plan. Two reasons that quickly come to mind:
- -
| null | CC BY-SA 2.5 | null | 2008-08-28T17:22:18.350 | 2008-08-28T17:22:18.350 | null | null | 1,358 | null |
32,818 | 2 | null | 32,777 | 0 | null | I use Cygwin alot.
I use it for any mvn commands, find, grep, perl scp and all the other stuff i got used to use all the years I only worked on FreeBSD desktops and servers.
I have my old .vimrc, .zshrc, my .ssh/config and all the other nice stuff. I use rxvt.exe instead of cmd.exe which made all the difference for ... | null | CC BY-SA 2.5 | null | 2008-08-28T17:05:29.263 | 2008-08-28T17:05:29.263 | null | null | 86 | null |
32,860 | 2 | null | 11,520 | 1 | null | [MZ-Tools](http://mztools.com/index.aspx) is really good as well.
| null | CC BY-SA 2.5 | null | 2008-08-28T17:25:56.593 | 2008-08-28T17:25:56.593 | null | null | 1,559 | null |
32,845 | 1 | 32,995 | null | 4 | 1,520 | Is it "taboo" to programatically create system restore points? I would be doing this before I perform a software update. If there is a better method to create a restore point with just my software's files and data, please let me know.
I would like a means by which I can get the user back to a known working state if ... | Creating System Restore Points - Thoughts? | CC BY-SA 2.5 | 0 | 2008-08-28T17:16:54.650 | 2016-04-08T16:40:51.720 | 2008-08-28T17:35:32.950 | 35 | 1,490 | [
"system-restore"
] |
32,864 | 2 | null | 32,718 | 0 | null | You will run the risk of having incorrect data if you do not use UTC to transmit dates... If you change time zones on the device... you're dates will be even further off.
You may want to use UTC and then calculate time in each timezone.
| null | CC BY-SA 2.5 | null | 2008-08-28T17:27:20.567 | 2008-08-28T17:27:20.567 | null | null | 580 | null |
32,857 | 2 | null | 32,044 | 20 | null | this might be way more than you need, but there is a django module called 'mptt' - this stores a hierarchical tree structure in an sql database, and includes templates for display in the view code. you might be able to find something useful there.
here's the link : [django-mptt](https://github.com/django-mptt/django-... | null | CC BY-SA 3.0 | null | 2008-08-28T17:23:22.073 | 2013-07-12T21:52:12.500 | 2013-07-12T21:52:12.500 | 1,011,749 | null | null |
32,858 | 2 | null | 15,056 | 1 | null | This is one I created which allows you to easily change the Target Framework Version of all projects in a solution: [http://geekswithblogs.net/sdorman/archive/2008/07/18/visual-studio-2008-and-targetframeworkversion.aspx](https://web.archive.org/web/20170713162713/http://geekswithblogs.net:80/sdorman/archive/2008/07/18... | null | CC BY-SA 4.0 | null | 2008-08-28T17:23:48.720 | 2022-07-21T14:05:58.490 | 2022-07-21T14:05:58.490 | 4,751,173 | 1,559 | null |
32,851 | 1 | 72,557 | null | 20 | 17,833 | I'm working on a messaging/notification system for our products. Basic requirements are:
- -
The libraries will be written in C#. Spring.NET just released a milestone build with lots of nice messaging abstraction, which is great - I plan on using it extensively. My basic question comes down to the question of mes... | Multicasting, Messaging, ActiveMQ vs. MSMQ? | CC BY-SA 2.5 | 0 | 2008-08-28T17:21:21.627 | 2022-12-12T17:40:48.837 | null | null | 96 | [
"msmq",
"messaging",
"activemq"
] |
32,865 | 2 | null | 32,766 | 9 | null | We've had similar problems before, unfortunately I don't remember the exact solution.
If your using a "Web Site" project (no project file) then start by checking that both your page and your control both set the ClassName property in the first line of your aspx/ascx file and that you specify the full name of the clas... | null | CC BY-SA 2.5 | null | 2008-08-28T17:27:42.517 | 2008-08-28T17:27:42.517 | null | null | 3,422 | null |
32,824 | 1 | 34,004 | null | 25 | 7,128 | While writing a custom IHttpHandler I came across a behavior that I didn't expect concerning the HttpCachePolicy object.
My handler calculates and sets an entity-tag (using the SetETag method on the HttpCachePolicy associated with the current response object). If I set the cache-control to public using the SetCacheabi... | Why does HttpCacheability.Private suppress ETags? | CC BY-SA 2.5 | 0 | 2008-08-28T17:08:58.990 | 2012-03-30T00:12:35.920 | 2017-05-23T10:31:02.393 | -1 | 2,114 | [
"c#",
"asp.net",
"http",
"caching"
] |
32,866 | 2 | null | 32,715 | 3 | null | If you're willing to do a little more work you can easily create a custom page to take the application offline.
One possible solution:
- -
Then in Global.asax
```
public void Application_Start(object sender, EventArgs e)
{
Application["OfflineMessage"] = "This website is offline.";
Application["IsOffli... | null | CC BY-SA 3.0 | null | 2008-08-28T17:28:08.850 | 2012-07-04T18:53:40.567 | 2012-07-04T18:53:40.567 | 1,001,985 | 1,375 | null |
32,871 | 1 | 32,980 | null | 7 | 4,497 | I have a swf with loads text into a Sprite that resizes based on the content put into - I'd like though for the ones that are longer than the page to have the browser use its native scroll bars rather than handle it in actionscript (very much like [http://www.nike.com/nikeskateboarding/v3/](http://www.nike.com/nikeskat... | How can I resize a swf during runtime to have the browser create html scrollbars? | CC BY-SA 2.5 | null | 2008-08-28T17:31:13.960 | 2012-07-11T12:54:30.240 | 2008-08-31T12:15:00.810 | 914 | 3,435 | [
"javascript",
"apache-flex",
"actionscript-3",
"flash"
] |
32,874 | 2 | null | 32,845 | 2 | null | No, it's not Taboo - in fact, I'd encourage it. The OS manages how much hard drive takes, and I'd put money down on Microsoft spending more money & time testing System Restore than you the money & time you're putting into testing your setup application.
| null | CC BY-SA 2.5 | null | 2008-08-28T17:34:40.753 | 2008-08-28T18:07:24.823 | 2008-08-28T18:07:24.823 | 35 | 35 | null |