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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18,741 | 2 | null | 18,717 | 6 | null | I think at some point must be responsible for ensuring valid relationships.
For example, [Ruby on Rails](http://en.wikipedia.org/wiki/Ruby_on_Rails) does not use foreign keys, but it validates all the relationships itself. If you only ever access your database from that Ruby on Rails application, this is fine.
Howev... | null | CC BY-SA 3.0 | null | 2008-08-20T20:28:30.590 | 2013-08-10T19:29:11.827 | 2013-08-10T19:29:11.827 | 63,550 | 234 | null |
18,754 | 1 | 18,831 | null | 41 | 31,124 | I'm writing some documentation in Markdown, and creating a separate file for each section of the doc. I would like to be able to convert all the files to HTML in one go, but I can't find anyone else who has tried the same thing. I'm on a Mac, so I would think a simple bash script should be able to handle it, but I've... | How can I convert Markdown documents to HTML en masse? | CC BY-SA 3.0 | 0 | 2008-08-20T20:33:28.423 | 2022-09-08T16:40:12.173 | 2014-05-11T16:24:14.987 | 488,657 | 2,185 | [
"bash",
"markdown"
] |
18,758 | 2 | null | 18,717 | 16 | null | > Suppose a programmer is actually doing this in the right manner already
Making such a supposition seems to me to be an extremely bad idea; in general software is phenomenally buggy.
And that's the point, really. Developers can't get things right, so ensuring the database can't be filled with bad data is a Good Thi... | null | CC BY-SA 2.5 | null | 2008-08-20T20:35:10.730 | 2008-08-20T20:35:10.730 | null | null | 2,131 | null |
18,753 | 2 | null | 18,696 | 2 | null | Interesting problem! I've not done any low-level (think Win32) Windows programming in a while, but here's what I would do.
Use a named pipe and have your application listen to it. Using this named pipe as a communication medium, implement a real simple protocol whereby you can query the application for the name of a c... | null | CC BY-SA 2.5 | null | 2008-08-20T20:33:28.237 | 2008-08-20T20:33:28.237 | null | null | 2,095 | null |
18,759 | 2 | null | 18,717 | 14 | null | Personally, I am in favor of foreign keys because it formalizes the relationship between the tables. I realize that your question presupposes that the programmer is not introducing data that would violate referential integrity, but I have seen way too many instances where data referential integrity is violated, despit... | null | CC BY-SA 2.5 | null | 2008-08-20T20:35:18.793 | 2008-08-21T12:12:54.953 | 2008-08-21T12:12:54.953 | 1,875 | 1,875 | null |
18,766 | 2 | null | 9,589 | 1 | null | I'll also second CMake. I've been using it for quite a while on a multi-platform project and I'm very satisfied with it.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:40:08.533 | 2008-08-20T20:40:08.533 | null | null | 1,582 | null |
18,762 | 2 | null | 18,719 | 0 | null | You might want to look at using the "shadow" utility. This allows you to essentially proxy into an existing remote desktop session. You could log into the console of the machine with the account you need, then users could open non-console remote desktop sessions to the machine (or to another machine) then use shadow t... | null | CC BY-SA 2.5 | null | 2008-08-20T20:38:09.067 | 2008-08-20T20:38:09.067 | null | null | 332 | null |
18,765 | 1 | 18,786 | null | 17 | 15,621 | I'm currently working on creating a new C# project that needs to interact with an older C++ application. There is an error enumeration that already exists in the C++ app that I need to use in the C# app.
.
All that being said my question is this:
Is there a way for me to taken an enumeration declared like so:
```
t... | Importing C++ enumerations into C# | CC BY-SA 3.0 | 0 | 2008-08-20T20:39:36.833 | 2018-08-01T10:38:37.953 | 2013-12-19T18:38:26.843 | 2,124,004 | 2,191 | [
"c#",
"c++"
] |
18,769 | 2 | null | 18,719 | 0 | null | Possible Solution from [here](http://www.2000trainers.com/tweaking-xp/disable-system-locking-on-windows-xp/).
> To disable the Lock Computer button,
open Regedit and browse to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\
System and
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentV... | null | CC BY-SA 2.5 | null | 2008-08-20T20:41:08.500 | 2008-08-20T20:41:08.500 | null | null | 1,293 | null |
18,757 | 1 | null | null | 14 | 1,370 | The Add view and the Edit view are often incredibly similar that it is unwarranted to write 2 views. As the app evolves you would be making the same changes to both.
However, there are usually subtle differences. For instance, a field might be read-only once it's been added, and if that field is a DropDownList you no ... | Using ASP.NET MVC, how to best avoid writing both the Add View and Edit View? | CC BY-SA 2.5 | 0 | 2008-08-20T20:34:12.540 | 2012-07-13T06:39:05.240 | 2012-07-13T06:39:05.240 | 727,208 | 1,851 | [
"c#",
"asp.net-mvc"
] |
18,772 | 1 | 18,796 | null | 0 | 11,023 | I forgot my password for Sql Server 2005. Windows Authentication is not enabled so I cannot login. How can I remove the current instance and create a new db instance? Or is there a better solution exists?
| How to create a new instance of Sql Server 2005 | CC BY-SA 2.5 | 0 | 2008-08-20T20:42:04.643 | 2008-11-17T21:53:06.630 | 2008-11-17T21:53:06.630 | 3,743 | 31,505 | [
"sql-server",
"sql-server-2005"
] |
18,760 | 2 | null | 18,717 | 22 | null | Yes.
1. They keep you honest
2. They keep new developers honest
3. You can do ON DELETE CASCADE
4. They help you to generate nice diagrams that self explain the links between tables
| null | CC BY-SA 3.0 | null | 2008-08-20T20:37:08.820 | 2013-08-10T19:30:46.550 | 2013-08-10T19:30:46.550 | 63,550 | 350 | null |
18,775 | 2 | null | 18,754 | -2 | null | I use this in a .bat file:
```
@echo off
for %i in (*.txt) python markdown.py "%i"
```
| null | CC BY-SA 2.5 | null | 2008-08-20T20:42:30.167 | 2008-08-20T20:42:30.167 | null | null | 2,148 | null |
18,764 | 1 | 18,906 | null | 76 | 43,937 | Since both a `Table Scan` and a `Clustered Index Scan` essentially scan all records in the table, why is a Clustered Index Scan supposedly better?
As an example - what's the performance difference between the following when there are many records?:
```
declare @temp table(
SomeColumn varchar(50)
)
insert into @t... | What's the difference between a Table Scan and a Clustered Index Scan? | CC BY-SA 3.0 | 0 | 2008-08-20T20:38:50.283 | 2016-10-15T18:49:21.750 | 2013-12-19T18:37:14.807 | 2,124,004 | 357 | [
"sql",
"sql-server",
"indexing"
] |
18,782 | 2 | null | 18,764 | -3 | null | A table scan has to examine every single row of the table. The clustered index scan only needs to scan the index. It doesn't scan every record in the table. That's the point, really, of indices.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:44:58.130 | 2008-08-20T20:44:58.130 | null | null | 2,131 | null |
18,779 | 2 | null | 18,655 | 4 | null | I found your question really interesting.
Usually I need entities objects to encapsulate the business logic of an application. It would be really complicated and inadequate to push this logic into the data layer.
What would you do to avoid these entities objects? What solution do you have in mind?
| null | CC BY-SA 2.5 | null | 2008-08-20T20:44:15.107 | 2008-08-20T20:44:15.107 | null | null | 296 | null |
18,774 | 2 | null | 18,765 | 2 | null | Simple answer is going to be no. Sorry, you are going to have to re-declare.
I have, in the past however, written scripts to import my C++ enums to a C# format in a enums.cs file and run it as part of the build, that way everything syncs.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:42:17.687 | 2008-08-20T20:42:17.687 | null | null | 194 | null |
18,780 | 2 | null | 18,772 | 0 | null | Have you tried connecting when logged on as domain/server-local Administrator?
| null | CC BY-SA 2.5 | null | 2008-08-20T20:44:27.947 | 2008-08-20T20:44:27.947 | null | null | 414 | null |
18,771 | 2 | null | 18,601 | 18 | null | Unit testing will be achievable if you appropriately. As Rob Cooper implied, . All other stuff logic and persistence layers should be kept in separate classes and then you can test those individually.
To test the GUI some people like [selenium](http://selenium.openqa.org/). Others complain that is a pain to set up.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:41:31.337 | 2009-09-26T16:58:04.440 | 2009-09-26T16:58:04.440 | 47,886 | 1,116 | null |
18,786 | 2 | null | 18,765 | 12 | null | Check out the PInvoke Interop Assistant tool [http://www.codeplex.com/clrinterop/Release/ProjectReleases.aspx?ReleaseId=14120](http://www.codeplex.com/clrinterop/Release/ProjectReleases.aspx?ReleaseId=14120). Its a useful tool for generating PInvoke signatures for native methods.
If I feed it your enum it generates... | null | CC BY-SA 2.5 | null | 2008-08-20T20:45:28.380 | 2008-08-20T20:45:28.380 | null | null | 1,254 | null |
18,783 | 1 | null | null | 129 | 38,952 | When you have a query or stored procedure that needs performance tuning, what are some of the first things you try?
| Favourite performance tuning tricks | CC BY-SA 3.0 | 0 | 2008-08-20T20:45:15.260 | 2022-09-09T14:06:07.450 | 2014-08-27T11:44:18.820 | 2,357,766 | 357 | [
"sql",
"sql-server",
"database",
"performance"
] |
18,789 | 2 | null | 18,655 | 7 | null | @Dan, sorry, that's not the kind of thing I'm looking for. I know the theory. Your statement "is a very bad idea" is not backed up by a real example. We are trying to develop software in less time, with less people, with less mistakes, and we want the ability to easily make changes. Your multi-layer model, in my ex... | null | CC BY-SA 2.5 | null | 2008-08-20T20:46:59.937 | 2008-08-20T20:46:59.937 | null | null | 1,219 | null |
18,792 | 2 | null | 18,783 | 3 | null | Look at the where clause - verify use of indexes / verify nothing silly is being done
```
where SomeComplicatedFunctionOf(table.Column) = @param --silly
```
| null | CC BY-SA 2.5 | null | 2008-08-20T20:48:24.037 | 2008-08-20T20:48:24.037 | null | null | 1,573 | null |
18,793 | 2 | null | 18,783 | 6 | null | Assuming MySQL here, use EXPLAIN to find out what is going on with the query, make sure that the indexes are being used as efficiently as possible and try to eliminate file sorts. [High Performance MySQL: Optimization, Backups, Replication, and More](http://www.amazon.co.uk/High-Performance-MySQL-Optimization-Replicati... | null | CC BY-SA 2.5 | null | 2008-08-20T20:48:53.037 | 2008-08-20T20:48:53.037 | null | null | 2,183 | null |
18,796 | 2 | null | 18,772 | 2 | null | Assuming you are a member of the Windows Admininstrator group, you can put the server in Single User mode, you could try this -
[http://blogs.msdn.com/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx](http://blogs.msdn.com/raulga/archive/2007/07/12/dis... | null | CC BY-SA 2.5 | null | 2008-08-20T20:49:25.703 | 2008-08-20T20:49:25.703 | null | null | 1,831 | null |
18,795 | 2 | null | 18,655 | 3 | null | I would also like to add to [Dan's answer](https://stackoverflow.com/questions/18655/why-do-we-need-entity-objects#18660) that separating both models could enable your application to be run on different database servers or even database models.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:49:14.127 | 2008-08-20T20:49:14.127 | 2017-05-23T12:01:28.620 | -1 | 1,242 | null |
18,800 | 2 | null | 18,783 | 3 | null | I'll generally start with the joins - I'll knock each one of them out of the query one at a time and re-run the query to get an idea if there's a particular join I'm having a problem with.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:52:02.297 | 2008-08-20T20:52:02.297 | null | null | 1,194 | null |
18,797 | 2 | null | 18,783 | 2 | null | @[DavidM](https://stackoverflow.com/questions/18783/sql-what-are-your-favorite-performance-tricks#18793)
> Assuming MySQL here, use EXPLAIN to find out what is going on with the query, make sure that the indexes are being used as efficiently as possible...
In SQL Server, execution plan gets you the same thing - it te... | null | CC BY-SA 2.5 | null | 2008-08-20T20:50:54.763 | 2008-08-20T20:50:54.763 | 2017-05-23T12:17:21.910 | -1 | 357 | null |
18,802 | 2 | null | 18,783 | 1 | null | Index the table(s) by the clm(s) you filter by
| null | CC BY-SA 2.5 | null | 2008-08-20T20:52:43.930 | 2008-08-20T20:52:43.930 | null | null | 350 | null |
18,798 | 2 | null | 18,765 | 0 | null | If you had declared the enum like:
```
namespace blah
{
enum DEVICE_ERR_CODES
{
eDEVICEINT_ERR_FATAL = 0x10001,
eDEVICEINT_ERR_OTHER = 0x10002,
};
}
```
and in another file:
```
DEVICE_ERR_CODES eDeviceIntErrCodes;
```
and named the enum file with a .cs extension, you might be able to ... | null | CC BY-SA 2.5 | null | 2008-08-20T20:51:23.467 | 2008-08-20T20:51:23.467 | null | null | 645 | null |
18,811 | 2 | null | 18,803 | 21 | null | Generic work-flow and DFDs can be very useful for complex processes. All other diagramming (ESPECIALLY UML) has, in my experience, without exception been a painful waste of time and effort.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:56:36.527 | 2008-08-20T20:56:36.527 | null | null | 414 | null |
18,806 | 2 | null | 18,655 | 2 | null | @jdecuyper, one maxim I repeat to myself often is "if your business logic is not in your database, it is only a recommendation". I think Paul Nielson said that in one of his books. Application layers and UI come and go, but data usually lives for a very long time.
How do I avoid entity objects? Stored procedures mo... | null | CC BY-SA 2.5 | null | 2008-08-20T20:54:15.190 | 2008-08-20T20:54:15.190 | null | null | 1,219 | null |
18,812 | 2 | null | 18,783 | 4 | null | Sometimes in SQL Server if you use an OR in a where clause it will really jack with performance. Instead of using the OR just do two selects and union them together. You get the same results at 1000x the speed.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:56:36.747 | 2008-08-20T20:56:36.747 | null | null | 1,545 | null |
18,803 | 1 | 18,839 | null | 126 | 33,927 | In college I've had numerous design and [UML](http://en.wikipedia.org/wiki/Unified_Modeling_Language) oriented courses, and I recognize that UML can be used to benefit a software project, especially [use-case](http://en.wikipedia.org/wiki/Use_case) mapping, but is it really practical? I've done a few co-op work terms,... | Is UML practical? | CC BY-SA 2.5 | 0 | 2008-08-20T20:53:05.040 | 2019-09-07T04:08:57.767 | 2008-08-23T17:55:57.093 | 2,134 | 2,134 | [
"uml",
"class-design",
"diagram"
] |
18,810 | 2 | null | 18,717 | 1 | null | We don't currently use foreign keys. And for the most part we don't regret it.
That said - we're likely to start using them a lot more in the near future for several reasons, both of them for similar reasons:
1. Diagramming. It's so much easier to produce a diagram of a database if there are foreign key relationship... | null | CC BY-SA 3.0 | null | 2008-08-20T20:55:32.600 | 2013-08-10T19:32:06.213 | 2013-08-10T19:32:06.213 | 63,550 | 1,194 | null |
18,787 | 1 | 31,726 | null | 7 | 5,240 | When a controller renders a view based on a model you can get the properties from the ViewData collection using the indexer (ie. ViewData["Property"]). However, I have a shared user control that I tried to call using the following:
```
return View("Message", new { DisplayMessage = "This is a test" });
```
and on my... | Asp.net MVC User Control ViewData | CC BY-SA 2.5 | 0 | 2008-08-20T20:46:23.573 | 2019-04-01T20:07:27.827 | 2019-04-01T20:07:27.827 | 100,297 | 105 | [
"asp.net",
"asp.net-mvc",
"viewdata",
"viewusercontrol"
] |
18,813 | 2 | null | 18,655 | 59 | null | I think it comes down to how complicated the "logic" of the application is, and where you have implemented it. If all your logic is in stored procedures, and all your application does is call those procedures and display the results, then developing entity objects is indeed a waste of time. But for an application whe... | null | CC BY-SA 2.5 | null | 2008-08-20T20:56:51.520 | 2008-12-10T09:07:56.337 | 2008-12-10T09:07:56.337 | 1,175 | 1,175 | null |
18,807 | 2 | null | 18,764 | 5 | null | [http://msdn.microsoft.com/en-us/library/aa216840(SQL.80).aspx](http://msdn.microsoft.com/en-us/library/aa216840(SQL.80).aspx)
The Clustered Index Scan logical and physical operator scans the clustered index specified in the Argument column. When an optional WHERE:() predicate is present, only those rows that satisfy ... | null | CC BY-SA 2.5 | null | 2008-08-20T20:54:30.073 | 2008-08-20T20:54:30.073 | null | null | 414 | null |
18,816 | 2 | null | 18,717 | 4 | null | They are not strictly necessary, in the way that seatbelts are not strictly necessary. But they can really save you from doing something stupid that messes up your database.
It's so much nicer to debug a FK constraint error than have to reconstruct a delete that broke your application.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:57:14.543 | 2008-08-20T20:57:14.543 | null | null | 116 | null |
18,815 | 2 | null | 18,783 | 2 | null | Not necessarily a SQL performance trick per se but definately related:
A good idea would be to use memcached where possible as it would be much faster just fetching the precompiled data directly from memory rather than getting it from the database. There's also a flavour of MySQL that got memcached built in (third pa... | null | CC BY-SA 2.5 | null | 2008-08-20T20:56:56.357 | 2008-08-20T20:56:56.357 | null | null | 1,993 | null |
18,819 | 2 | null | 18,803 | 1 | null | UML has its place. It becomes increasingly important as the size of the project grows. If you have a long running project, then it is best to document everything in UML.
| null | CC BY-SA 2.5 | null | 2008-08-20T20:58:29.283 | 2008-08-20T20:58:29.283 | null | null | 380 | null |
18,820 | 2 | null | 18,783 | 1 | null | - - -
| null | CC BY-SA 2.5 | null | 2008-08-20T20:58:50.140 | 2008-08-20T20:58:50.140 | null | null | 414 | null |
18,824 | 2 | null | 18,783 | 2 | null | Make sure your index lengths are as small as possible. This allows the DB to read more keys at a time from the file system, thus speeding up your joins. I assume this works with all DB's, but I know it's a specific recommendation for MySQL.
| null | CC BY-SA 2.5 | null | 2008-08-20T21:01:10.323 | 2008-08-20T21:01:10.323 | null | null | 1,227 | null |
18,822 | 2 | null | 18,783 | 3 | null | On all of my temp tables, I like to add unique constraints (where appropriate) to make indexes, and primary keys (almost always).
```
declare @temp table(
RowID int not null identity(1,1) primary key,
SomeUniqueColumn varchar(25) not null,
SomeNotUniqueColumn varchar(50) null,
unique(SomeUniqueColumn)
... | null | CC BY-SA 2.5 | null | 2008-08-20T21:00:37.377 | 2008-08-20T21:00:37.377 | null | null | 357 | null |
18,827 | 2 | null | 18,803 | -3 | null | UML is just one of methods for communication within people.
Whiteboard is better.
| null | CC BY-SA 2.5 | null | 2008-08-20T21:02:43.767 | 2008-08-20T21:02:43.767 | null | null | 1,556 | null |
18,829 | 2 | null | 18,803 | 2 | null | I see sequence diagrams and activity diagrams used fairly often. I do a lot of work with "real-time" and embedded systems that interact with other systems, and sequence diagrams are very helpful in visualizing all the interactions.
I like to do use-case diagrams, but I haven't met too many people who think they are v... | null | CC BY-SA 2.5 | null | 2008-08-20T21:02:56.137 | 2008-08-20T21:02:56.137 | null | null | 1,175 | null |
18,832 | 2 | null | 18,655 | 0 | null | I think that you are just used to writing a specific kind of application, and solving a certain kind of problem. You seem to be attacking this from a "database first" perspective. There are lots of developers out there where data is persisted to a DB but performance is not a top priority. In lots of cases putting an... | null | CC BY-SA 2.5 | null | 2008-08-20T21:03:20.707 | 2008-08-20T21:03:20.707 | null | null | 1,471 | null |
18,831 | 2 | null | 18,754 | 23 | null | This is how you would do it in Bash.
```
for i in ./*.markdown; do perl markdown.pl --html4tags $i > $i.html; done;
```
Of course, you need the [Markdown script](http://daringfireball.net/projects/markdown/).
| null | CC BY-SA 3.0 | null | 2008-08-20T21:03:20.397 | 2011-11-10T21:57:07.680 | 2011-11-10T21:57:07.680 | 437 | 437 | null |
18,830 | 2 | null | 18,787 | 2 | null | Of course after I create this question I immediately find the answer after a few more searches on Google
[http://forums.asp.net/t/1197059.aspx](http://forums.asp.net/t/1197059.aspx)
Apparently this happens because of the wrapper class. Even so, it seems like any property passed should get added to the ViewData colle... | null | CC BY-SA 2.5 | null | 2008-08-20T21:03:10.070 | 2008-08-20T21:03:10.070 | null | null | 105 | null |
18,828 | 2 | null | 18,803 | 16 | null | I'd have to disagree, UML is used all over the place - anywhere a IT project is being designed UML will usually be there.
Now whether it is being used is another matter.
As Stu said, I find both Use Cases (along with the use case descriptions) and activity diagrams to be the most helpful from a developer point of vi... | null | CC BY-SA 2.5 | null | 2008-08-20T21:02:56.090 | 2008-08-20T21:02:56.090 | null | null | 1,908 | null |
18,834 | 2 | null | 18,655 | 27 | null | Theory says that highly cohesive, loosely coupled implementations are the way forward.
So I suppose you are questioning that approach, namely separating concerns.
Should my aspx.cs file be interacting with the database, calling a sproc, and understanding IDataReader?
In a team environment, especially where you have... | null | CC BY-SA 2.5 | null | 2008-08-20T21:03:50.317 | 2008-08-20T21:09:06.200 | 2008-08-20T21:09:06.200 | 1,911 | 1,911 | null |
18,838 | 2 | null | 18,655 | 3 | null | What if you need to scale your app by load balancing more than one web server? You could install the full app on all web servers, but a better solution is to have the web servers talk to an application server.
But if there aren't any entity objects, they won't have very much to talk about.
I'm not saying that you sho... | null | CC BY-SA 2.5 | null | 2008-08-20T21:04:41.483 | 2008-08-20T21:04:41.483 | null | null | 1,851 | null |
18,836 | 1 | 18,837 | null | 17 | 3,494 | I'm looking for shell scripts files installed on my system, but doesn't work:
```
$ find /usr -name *.sh
```
But I know there are a ton of scripts out there. For instance:
```
$ ls /usr/local/lib/*.sh
/usr/local/lib/tclConfig.sh
/usr/local/lib/tkConfig.sh
```
Why doesn't work?
| Why doesn't **find** find anything? | CC BY-SA 2.5 | 0 | 2008-08-20T21:03:54.543 | 2014-09-05T04:09:31.820 | 2008-08-25T15:00:54.533 | 116 | 1,438 | [
"bash",
"unix",
"shell",
"ksh"
] |
18,835 | 2 | null | 18,783 | 1 | null | I like to use
```
isnull(SomeColThatMayBeNull, '')
```
Over
```
coalesce(SomeColThatMayBeNull, '')
```
When I don't need the multiple argument support that coalesce gives you.
[http://blog.falafel.com/2006/04/05/SQLServerArcanaISNULLVsCOALESCE.aspx](http://blog.falafel.com/2006/04/05/SQLServerArcanaISNULLVsCOALE... | null | CC BY-SA 2.5 | null | 2008-08-20T21:03:53.000 | 2008-08-20T21:03:53.000 | null | null | 357 | null |
18,839 | 2 | null | 18,803 | 50 | null | In a sufficiently there are some places where some `UML` is considered useful.
The useful diagrams for a system, vary by applicability.
But the most widely used ones are:
- - - -
There are many enterprises who swear by them and many who outright reject them as an utter waste of time and effort.
It's best not... | null | CC BY-SA 4.0 | null | 2008-08-20T21:04:43.560 | 2019-09-07T04:08:57.767 | 2019-09-07T04:08:57.767 | 1,824,361 | 1,311 | null |
18,855 | 2 | null | 18,661 | 2 | null | didn't see the values for wm_gettext or wm_gettextlength in that article, so just in case..
```
const int WM_GETTEXT = 0x0D;
const int WM_GETTEXTLENGTH = 0x0E;
```
| null | CC BY-SA 2.5 | null | 2008-08-20T21:08:33.737 | 2008-08-20T21:08:33.737 | null | null | 1,147 | null |
18,843 | 2 | null | 18,836 | 15 | null | On some systems (Solaris, for example), there's no default action, so you need to add the -print command.
```
find /usr -name '*.foo' -print
```
| null | CC BY-SA 2.5 | null | 2008-08-20T21:05:08.847 | 2008-08-26T17:49:06.740 | 2008-08-26T17:49:06.740 | 116 | 116 | null |
18,858 | 1 | null | null | 4 | 778 | Does anyone here know of good batch file code indenters or beautifiers?
Specifically for PHP, JS and SGML-languages.
Preferably with options as to style.
| Batch code indenters and beautifiers | CC BY-SA 2.5 | null | 2008-08-20T21:10:20.147 | 2011-02-16T10:34:46.093 | 2011-02-16T10:34:46.093 | 2,118 | 2,118 | [
"php",
"javascript",
"html",
"coding-style"
] |
18,845 | 2 | null | 18,783 | 0 | null | Don't prefix Stored Procedure names with "sp_" because system procedures all start with "sp_", and SQL Server will have to search harder to find your procedure when it gets called.
| null | CC BY-SA 2.5 | null | 2008-08-20T21:05:57.363 | 2008-08-20T21:16:41.520 | 2008-08-20T21:16:41.520 | 357 | 357 | null |
18,837 | 2 | null | 18,836 | 54 | null | Try quoting the wildcard:
```
$ find /usr -name \*.sh
```
or:
```
$ find /usr -name '*.sh'
```
If you happen to have a file that matches in the current working directory, the wildcard will be expanded before find sees it. If you happen to have a file named tkConfig.sh in your working directory, the command wou... | null | CC BY-SA 2.5 | null | 2008-08-20T21:04:01.003 | 2008-08-20T21:04:01.003 | null | null | 1,438 | null |
18,859 | 2 | null | 18,803 | 14 | null | I will qualify my answer by mentioning that I don't have experience in large (IBM-like) corporate development environments.
The way I view UML and the [Rational Unified Process](http://en.wikipedia.org/wiki/IBM_Rational_Unified_Process) is that it's more about what you're going to do than actually what you're going ... | null | CC BY-SA 2.5 | null | 2008-08-20T21:10:37.103 | 2008-08-20T21:10:37.103 | null | null | 357 | null |
18,841 | 2 | null | 18,754 | 73 | null | Use [pandoc](https://github.com/jgm/pandoc) — it's a commandline tool that lets you convert from one format to another. This tool supports Markdown to HTML and back.
E.g. to generate HTML from Markdown, run:
```
pandoc -f markdown index.md > index.html
```
| null | CC BY-SA 3.0 | null | 2008-08-20T21:05:03.713 | 2017-05-21T01:29:30.740 | 2017-05-21T01:29:30.740 | 15,168 | null | null |
18,865 | 2 | null | 18,783 | 18 | null | Slightly off topic but if you have control over these issues...
High level and High Impact.
- - - - - - - -
| null | CC BY-SA 2.5 | null | 2008-08-20T21:14:11.477 | 2008-08-20T21:14:11.477 | null | null | 1,293 | null |
18,861 | 1 | 18,884 | null | 4 | 672 | So I am writing a registration form and I need the display name to be only numbers, letters and underscores.
Have a look at my code and tell me what I'm doing wrong.
```
<form method="post" action="/" onsubmit="return check_form()">
<input type="text" id="display-name" name="display-name" maxlength="255" />
... | What did I do wrong here? [Javascript Regex] | CC BY-SA 4.0 | null | 2008-08-20T21:11:34.853 | 2018-05-02T06:37:46.523 | 2018-05-02T06:37:46.523 | 1,221,792 | 428,190 | [
"javascript",
"regex"
] |
18,869 | 1 | null | null | 7 | 7,626 | I am running a Qt 4.5 commercial snapshot and want to use a plugin that I downloaded (it's a .so file) in my `QWebView`. Is there a specific location where I need to place this file? Can I grab it using the `QWebPluginFactory`?
| How to install a plugin for QtWebKit | CC BY-SA 3.0 | null | 2008-08-20T21:16:24.030 | 2015-10-22T16:21:02.127 | 2015-10-22T16:21:02.127 | 5,240,004 | 1,449 | [
"c++",
"linux",
"qt",
"user-interface",
"qtwebkit"
] |
18,864 | 2 | null | 18,655 | 21 | null | For me it boils down to I don't want my application to be concerned with how the data is stored. I'll probably get slapped for saying this...but your application is not your data, data is an artifact of the application. I want my application to be thinking in terms of Customers, Orders and Items, not a technology lik... | null | CC BY-SA 2.5 | null | 2008-08-20T21:13:39.450 | 2008-08-20T21:13:39.450 | null | null | 1,975 | null |
18,870 | 2 | null | 18,765 | 15 | null | In C/C++ you can #include a .cs file which contains the enumeration definition. Careful use of preprocessor directives takes care of the syntax differences between C# and C.
Example:
```
#if CSharp
namespace MyNamespace.SharedEnumerations
{
public
#endif
enum MyFirstEnumeration
{
Autodetect = -1,
Windows200... | null | CC BY-SA 2.5 | null | 2008-08-20T21:16:33.703 | 2008-08-20T21:16:33.703 | null | null | 1,006 | null |
18,874 | 2 | null | 18,861 | 6 | null | My regexp would go along the lines of: `/^[a-zA-Z0-9_]+$/`
edit: I think it's the lack of a line end `$` that makes it fail.
| null | CC BY-SA 3.0 | null | 2008-08-20T21:18:23.027 | 2016-02-08T13:24:27.110 | 2016-02-08T13:24:27.110 | 92,701 | 2,118 | null |
18,875 | 2 | null | 18,858 | 1 | null | The following page has code on it to tidy Javascript (written in javascript as well):
[http://www.howtocreate.co.uk/tutorials/jsexamples/JSTidy.html](http://www.howtocreate.co.uk/tutorials/jsexamples/JSTidy.html)
There are various ways to tidy SGML based files (i.e. XML) - HTMLTidy will often do the trick, and there ... | null | CC BY-SA 2.5 | null | 2008-08-20T21:18:43.993 | 2008-08-20T21:18:43.993 | null | null | 1,908 | null |
18,876 | 2 | null | 18,757 | 4 | null | I don't like the Views to become too complex, and so far I have tended to have separate views for Edit and Add. I use a user control to store the common elements to avoid repetition. Both of the views will be centered around the same ViewData, and I have a marker on my data to say whether the object is new or an existi... | null | CC BY-SA 2.5 | null | 2008-08-20T21:18:52.340 | 2008-08-20T21:18:52.340 | null | null | 1,982 | null |
18,856 | 2 | null | 3,088 | 28 | null | I recommend Logo (aka the turtle) to get the basic concepts down. It provides a good sandbox with immediate graphical feedback, and you can demostrate loops, variables, functions, conditionals, etc. [This page](http://mckoss.com/logo/) provides an excellent tutorial.
After Logo, move to Python or Ruby. I recommend Py... | null | CC BY-SA 3.0 | null | 2008-08-20T21:09:00.913 | 2012-03-28T19:16:27.700 | 2012-03-28T19:16:27.700 | 1,219,121 | 2,188 | null |
18,873 | 2 | null | 18,655 | 2 | null | I have been thinking about this same thing a lot lately; I was a heavy user of CSLA for a while, and I love the purity of saying that "all of your business logic (or at least as much as is reasonably possible) is encapsulated in business entities".
I have seen the business entity model provide a lot of value in cases... | null | CC BY-SA 2.5 | null | 2008-08-20T21:18:19.610 | 2008-08-20T21:18:19.610 | null | null | 2,194 | null |
18,889 | 1 | 18,902 | null | 7 | 15,664 | Is anyone working on or know if there exists a SQL 2k8 Dialect for NHibernate?
| SQL 2008 Dialect Support for NHibernate | CC BY-SA 2.5 | 0 | 2008-08-20T21:25:07.940 | 2009-06-09T15:50:21.060 | 2008-10-14T05:41:25.843 | 8,454 | 1,975 | [
"nhibernate",
"sql-server-2008"
] |
18,877 | 2 | null | 18,093 | 2 | null | Why do you need to? Do you really need to limit users in the way with an integration server. I think that's why CC.Net doesn't have that sort of support built in.
You can always see who forced a build, and control it that way.
I find that continuous integration works best with regular builds and regular unit test run... | null | CC BY-SA 2.5 | null | 2008-08-20T21:19:05.397 | 2008-08-20T21:19:05.397 | null | null | 905 | null |
18,881 | 2 | null | 18,861 | 0 | null | By 'not working' I take it you mean it is letting invalid entries through (rather than not letting valid entries through).
As @Annan has said, this would probably be due to the lack of the `$` character at the end of the expression, as currently it only requires a single valid character at the start of the value, and ... | null | CC BY-SA 3.0 | null | 2008-08-20T21:21:31.600 | 2016-02-08T13:25:44.837 | 2016-02-08T13:25:44.837 | 92,701 | 1,908 | null |
18,896 | 2 | null | 18,675 | -1 | null | You can write a custom installer class which can change the security permissions of the folder. This would assume the installation is done by a user who has permission to change file/directory security.
The best option is to not write to directories under Program Files at all.
| null | CC BY-SA 2.5 | null | 2008-08-20T21:27:17.420 | 2008-08-20T21:27:17.420 | null | null | 507 | null |
18,879 | 2 | null | 18,772 | 2 | null | My read of the question was that the server is set up to use SQL authentication only, and perhaps you don't know the sa password or any other SQL login credentials? If so, you might be able to change the authentication mode. For SQL Server 2005 default instances, it's stored in the registry at:
HKEY_LOCAL_MACHINE\SOFT... | null | CC BY-SA 2.5 | null | 2008-08-20T21:20:12.057 | 2008-08-20T21:20:12.057 | null | null | 741 | null |
18,890 | 2 | null | 18,655 | 10 | null | I would like to answer with an example similar to the one you proposed.
On my company I had to build a simple CRUD section for products, I build all my entities and a separate DAL. Later another developer had to change a related table and he even renamed several fields. The only file I had to change to update my form ... | null | CC BY-SA 2.5 | null | 2008-08-20T21:25:25.537 | 2008-08-20T21:25:25.537 | null | null | 2,148 | null |
18,893 | 2 | null | 18,655 | 0 | null | Interesting question. A couple thoughts:
1. How would you unit test if all of your business logic was in your database?
2. Wouldn't changes to your database structure, specifically ones that affect several pages in your app, be a major hassle to change throughout the app?
| null | CC BY-SA 2.5 | null | 2008-08-20T21:26:43.337 | 2008-08-20T21:26:43.337 | null | null | 1,574 | null |
18,903 | 2 | null | 18,861 | 0 | null | I tested your script and meddled with the javascript. This seem to work:
```
<form method="post" action="/" onsubmit="return check_form()">
<input type="text" id="display-name" name="display-name" maxlength="255" />
<input type="submit" />
</form>
<script type="text/javascript">
<!--
var name_regex = ... | null | CC BY-SA 3.0 | null | 2008-08-20T21:31:50.467 | 2014-12-15T13:39:46.227 | 2014-12-15T13:39:46.227 | 1,835,379 | 1,993 | null |
18,908 | 2 | null | 18,533 | 2 | null | DataSets are great for demos.
I wouldn't know what to do with one if you made me use it.
I use ObservableCollection
Then again i'm in the client app space, WPF and Silverlight. So passing a dataset or datatable through a service is ... gross.
DataReaders are fast, since they are a forward only stream of the result... | null | CC BY-SA 2.5 | null | 2008-08-20T21:32:47.360 | 2008-08-20T21:32:47.360 | null | null | 580 | null |
18,892 | 2 | null | 18,861 | 0 | null | What does "doesn't work" mean? Does it reject valid display names? Does it accept invalid display names? Which ones?
Per @Annan, leaving off the `$` would make the regexp accept invalid display names like `abc123!@#`.
If the code is rejecting valid display names, it may be because the parentheses are being matched li... | null | CC BY-SA 2.5 | null | 2008-08-20T21:26:32.353 | 2008-08-20T21:26:32.353 | null | null | 1,412 | null |
18,909 | 2 | null | 17,845 | 1 | null | One intuition is that if you have a very large number of entities, tuple stores can save yourself the trouble of having your indexes routinely knocked out of memory as you switch between tables, and instead always have the first couple levels of the tuple index in RAM.
| null | CC BY-SA 2.5 | null | 2008-08-20T21:33:00.310 | 2008-08-20T21:33:00.310 | null | null | 279 | null |
18,901 | 2 | null | 18,858 | 1 | null | For HTML/XML HTML Tidy is the best option:
[http://tidy.sourceforge.net/](http://tidy.sourceforge.net/)
| null | CC BY-SA 2.5 | null | 2008-08-20T21:28:46.217 | 2008-08-20T21:28:46.217 | null | null | 2,148 | null |
18,919 | 2 | null | 18,918 | 1 | null | I believe the built in ASP.NET server only works on localhost. You'll have to use IIS.
| null | CC BY-SA 2.5 | null | 2008-08-20T21:42:31.863 | 2008-08-20T21:42:31.863 | null | null | 1,338 | null |
18,902 | 2 | null | 18,889 | 8 | null | This was [asked on the NHibernate Google Group recently](http://groups.google.com/group/nhusers/browse_thread/thread/de3d59012cd5835b/50c50677b250f97b) - apparently the SQL 2005 dialect should work against SQL 2008.
Definitive location of the dialects - source control is [here](https://nhibernate.svn.sourceforge.net/s... | null | CC BY-SA 2.5 | null | 2008-08-20T21:29:21.690 | 2008-08-20T21:44:21.873 | 2008-08-20T21:44:21.873 | 2,084 | 2,084 | null |
18,912 | 1 | 6,921,193 | null | 203 | 206,813 | I know in JavaScript, double as hashes, but I have been unable to find a built-in function to get the keys:
```
var h = {a:'b', c:'d'};
```
I want something like
```
var k = h.keys() ; // k = ['a', 'c'];
```
It is simple to write a function myself to iterate over the items and add the keys to an array that I return,... | How can I find the keys of an object? | CC BY-SA 4.0 | 0 | 2008-08-20T21:35:59.257 | 2022-06-21T11:14:18.303 | 2021-04-23T12:16:55.467 | 238 | 238 | [
"javascript",
"object",
"key"
] |
18,918 | 1 | 7,394,935 | null | 47 | 25,227 | Im testing an ASP.NEt site. When I execute it, it starts the ASP.NET Development Server and opens up a page.
Now I want to test it in the intranet I have.
1. Can I use this server or I need to configure IIS in this machine?
2. Do I need to configure something for it to work?
I've changed the localhost to the cor... | Can I access ASP.NET Development server in an intranet? | CC BY-SA 2.5 | 0 | 2008-08-20T21:41:09.230 | 2012-10-20T09:48:04.583 | null | null | 1,013 | [
"asp.net"
] |
18,924 | 2 | null | 18,920 | 2 | null | It depends on what browser you use, but Internet Explorer, for example, would take you to the root directory of your harddrive (eg. `C:/`), while browsers such as Firefox does nothing.
| null | CC BY-SA 3.0 | null | 2008-08-20T21:46:13.583 | 2017-06-09T10:01:52.607 | 2017-06-09T10:01:52.607 | 1,055,241 | 1,993 | null |
18,927 | 2 | null | 18,172 | 14 | null | I've used [Robocopy](http://en.wikipedia.org/wiki/Robocopy) for this with excellent results. By default, it will retry every 30 seconds until the file gets across.
| null | CC BY-SA 2.5 | null | 2008-08-20T21:47:57.030 | 2008-08-20T21:47:57.030 | null | null | 4 | null |
18,925 | 2 | null | 18,918 | 20 | null | No, you can't. It's set up so it only works on localhost, and I couldn't find any workarounds to make it work.
But, here's what I've been doing - I created the website on a specific port in IIS and opened that port up so it's visible on the network. I pointed that IIS website to my website's root folder (the one with ... | null | CC BY-SA 2.5 | null | 2008-08-20T21:47:30.213 | 2008-08-20T21:47:30.213 | null | null | 5 | null |
18,929 | 2 | null | 18,912 | 14 | null | This is the best you can do, as far as I know...
```
var keys = [];
for (var k in h)keys.push(k);
```
| null | CC BY-SA 2.5 | null | 2008-08-20T21:49:23.203 | 2008-08-20T21:49:23.203 | null | null | 2,031 | null |
18,920 | 1 | 18,924 | null | 10 | 13,043 | When opening a file from your hard drive into your browser, where is the document root? To illustrate, given the following HTML code, if the page is opened from the local machine `(file:///)` then where should the `css` file be for the browser to find it?
```
<link href="/temp/test.css" rel="stylesheet" type="text/cs... | Can you set, or where is, the local document root? | CC BY-SA 3.0 | 0 | 2008-08-20T21:43:23.607 | 2017-08-04T17:23:36.943 | 2017-06-09T10:01:31.057 | 1,055,241 | 1,858 | [
"html",
"css",
"directory"
] |
18,928 | 2 | null | 18,783 | 19 | null |
1. Have a pretty good idea of the optimal path of running the query in your head.
2. Check the query plan - always.
3. Turn on STATS, so that you can examine both IO and CPU performance. Focus on driving those numbers down, not necessarily the query time (as that can be influenced by other activity, cache, etc.).
4. L... | null | CC BY-SA 2.5 | null | 2008-08-20T21:48:53.547 | 2008-08-20T21:48:53.547 | null | null | 2,199 | null |
18,930 | 2 | null | 18,912 | 6 | null | I believe you can loop through the properties of the object using for/in, so you could do something like this:
```
function getKeys(h) {
Array keys = new Array();
for (var key in h)
keys.push(key);
return keys;
}
```
| null | CC BY-SA 2.5 | null | 2008-08-20T21:51:08.613 | 2008-08-20T21:51:08.613 | null | null | 521 | null |
18,940 | 2 | null | 13,498 | 1 | null | Thanks from me, too :)
Maybe it's because all your devices clocks are synchronized to a time server, so they all have the exactly correct atomic-clock time, and all the devices notify you within a couple of seconds of each other, so the "dismiss" synchronization just doesn't happen fast enough.
| null | CC BY-SA 2.5 | null | 2008-08-20T21:54:53.487 | 2008-08-20T21:54:53.487 | null | null | 4 | null |
18,939 | 2 | null | 18,918 | 3 | null | You can recompile Cassini to get it to work - there's a fairly easy to remove check for localhost in there. Or, I'm pretty sure [Ultidev's Cassini](http://www.ultidev.com/products/Cassini/) doesn't have this restriction. Both of these are easier to setup than IIS.
But, yeah, the builtin WebDev.WebServer doesn't work..... | null | CC BY-SA 2.5 | null | 2008-08-20T21:54:22.817 | 2008-08-20T21:54:22.817 | null | null | 2,199 | null |
18,934 | 2 | null | 18,932 | 158 | null | There's a good article on [removing duplicates](http://support.microsoft.com/kb/139444) on the Microsoft Support site. It's pretty conservative - they have you do everything in separate steps - but it should work well against large tables.
I've used self-joins to do this in the past, although it could probably be pret... | null | CC BY-SA 3.0 | null | 2008-08-20T21:53:14.940 | 2017-06-19T23:36:49.097 | 2017-06-19T23:36:49.097 | 3,731,444 | 5 | null |
18,884 | 2 | null | 18,861 | 14 | null | Your regex
```
/^([a-zA-Z0-9_])+/
```
Looks for
1. Start of string(check), followed by
2. 1 or more letters, numbers, or underscore (check)
And then whatever comes after it doesn't matter. This regex will match anything at all so long as it begins with a letter, number, or underscore
If you put a `$` at the e... | null | CC BY-SA 3.0 | null | 2008-08-20T21:22:48.820 | 2014-12-15T13:39:05.327 | 2014-12-15T13:39:05.327 | 1,835,379 | 234 | null |
18,942 | 2 | null | 18,093 | 3 | null | @Keith:
We are leveraging CC.NET to both run a CI build, as well as being able to use the Force Build feature to do a Build + Deploy. That is why we want hands off the dashboard.
I found this morning that I was able to place CCNET in a virtual directory within another web app, This allowed me to setup Forms Authentic... | null | CC BY-SA 3.0 | null | 2008-08-20T21:55:41.830 | 2012-08-11T16:03:23.180 | 2012-08-11T16:03:23.180 | 1,477,076 | 1,965 | null |