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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
39,235 | 2 | null | 39,059 | 3 | null | Martin's answer is correct on Windows Server 2003:
> You will have to assign the "Lock pages in memory" privilege to any user that runs your > application. This includes administrators
1. Select Control Panel -> Administrative Tools -> Local Security Policy
2. Select Local Policies -> User Rights Assignment
3. Double ... | null | CC BY-SA 2.5 | null | 2008-09-02T11:10:10.670 | 2008-09-02T13:52:15.693 | 2008-09-02T13:52:15.693 | 988 | 988 | null |
39,243 | 1 | 39,311 | null | 0 | 130 | Is there any query which can return me the number of revisions made to the structure of a database table?
Secondly, how can I determine the number of pages (in terms of size) present in mdf or ldf files?
| Query to identify the number of revisions made to a table | CC BY-SA 2.5 | null | 2008-09-02T11:14:36.133 | 2017-07-04T08:45:41.473 | null | null | 4,021 | [
"sql-server"
] |
39,231 | 2 | null | 39,222 | 0 | null | Why not use the C++ standard exceptions instead of MSFT's proprietary extension? C++ has an exception handling concept.
```
struct my_exception_type : public logic_error {
my_exception_type(char const* msg) : logic_error(msg) { }
};
try {
throw my_exception_type("An error occurred");
} catch (my_exception_typ... | null | CC BY-SA 2.5 | null | 2008-09-02T11:07:37.913 | 2008-09-02T11:07:37.913 | null | null | 1,968 | null |
39,222 | 1 | 39,238 | null | 7 | 2,856 | I'm working on porting a Visual C++ application to GCC (should build on MingW and Linux).
The existing code uses `__try { ... } __except(1) { ... }` blocks in a few places so that almost nothing (short of maybe out of memory type errors?) would make the program exit without doing some minimal logging.
What are the op... | Portably handle exceptional errors in C++ | CC BY-SA 2.5 | 0 | 2008-09-02T10:57:10.873 | 2009-07-24T18:54:15.203 | 2009-07-22T20:01:19.550 | 163 | 163 | [
"exception",
"visual-c++",
"gcc",
"cross-platform",
"portability"
] |
39,238 | 2 | null | 39,222 | 12 | null | try { xxx } catch(...) { xxx } would be more portable but might not catch as much. It depends on compiler settings and environments.
Using the default VC++ settings, asynchronous (SEH) errors are not delivered to the C++ EH infrastructure; to catch them you need to use SEH handlers (__try/__except) instead. VC++ all... | null | CC BY-SA 2.5 | null | 2008-09-02T11:11:01.103 | 2008-09-02T11:11:01.103 | null | null | 2,131 | null |
39,240 | 1 | 39,316 | null | 2 | 1,470 | I have lots of article store in MS SQL server 2005 database in a table called Articles-
```
"Articles (ArticleID, ArticleTitle, ArticleContent)"
```
Now I want some SP or SQL query which could return me similar Article against any user's input (very much like "Similar Posts" in blogs OR "Related Questions" in stacko... | "Similar Posts" like functionality using MS SQL Server? | CC BY-SA 2.5 | 0 | 2008-09-02T11:12:35.000 | 2008-10-08T22:25:23.273 | 2008-10-08T22:25:23.273 | 15,401 | 191 | [
"sql",
"sql-server",
"database"
] |
39,233 | 1 | null | null | 2 | 6,181 | I wrote a Visual Basic macro for archiving attachments for Outlook 2007, but did not find a totally satisfactory way for showing a directory picker from the Outlook macro. Now, I don't know much about either Windows APIs or VB(A) programming, but the "standard" Windows file dialog I see most often in Microsoft applicat... | Directory picker for Visual Basic macro in MS Outlook 2007 | CC BY-SA 3.0 | 0 | 2008-09-02T11:09:51.450 | 2020-06-28T07:15:21.800 | 2020-06-28T07:15:21.800 | 100,297 | 4,163 | [
"vba",
"outlook",
"outlook-2007",
"filedialog"
] |
39,249 | 2 | null | 39,229 | 1 | null | You do
SharpDevelop - It doesn't really stand up to Visual Studio. Thou I found it to be useful at times since it has support for Visual Basic. And at times I could load solutions for projects that were not installed on my VS. But the really USEFUL features that I found were : Conversion between C# <-> VB Code, PInvok... | null | CC BY-SA 2.5 | null | 2008-09-02T11:20:02.423 | 2008-09-02T11:26:04.767 | 2008-09-02T11:26:04.767 | 4,204 | 4,204 | null |
39,254 | 1 | 39,645 | null | 7 | 6,044 | When looking at a SSI printenv dump I see a variable URI_REQUEST.
When reading the Apache mod_include docs I see DOCUMENT_URI which they define as "The (%-decoded) URL path of the document requested by the user."
Anyone know the difference between the two?
TIA.
| What's the difference between DOCUMENT_URI and URI_REQUEST in SSI? | CC BY-SA 2.5 | null | 2008-09-02T11:22:31.733 | 2008-09-20T01:19:13.983 | 2008-09-20T01:19:13.983 | 2,974 | 2,974 | [
"apache",
"ssi"
] |
39,252 | 2 | null | 27,607 | 0 | null | In the [upcoming version of the C++ standard](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2723.pdf), I could not find any explicit restriction with respect to the fact that a predicate should always return the same value for the same input. I looked into section 25 (paragraphs 7 to 10).
Methods returning... | null | CC BY-SA 2.5 | null | 2008-09-02T11:21:20.067 | 2008-09-02T11:21:20.067 | null | null | 4,177 | null |
39,257 | 2 | null | 39,240 | 0 | null | First of all you need to define what article similarity means.
For example you can associate some meta information with articles, like tags.
To be able to find similar articles you need to extract some features from them, for example you can build full text index.
You can take advantage of full text search capability ... | null | CC BY-SA 2.5 | null | 2008-09-02T11:26:10.397 | 2008-09-02T11:37:18.640 | 2008-09-02T11:37:18.640 | 1,196 | 1,196 | null |
39,269 | 2 | null | 39,243 | 2 | null | I think you need to create a `trigger` and store all changes to the table in a separate table. You can then use this table to get the revision history.
| null | CC BY-SA 3.0 | null | 2008-09-02T11:32:10.133 | 2017-07-04T08:45:41.473 | 2017-07-04T08:45:41.473 | 5,423,108 | 202 | null |
39,270 | 2 | null | 39,240 | 0 | null | I think the question is what 'similar' means to you. If you create a field for user to input some kind of tags, it becomes much more easier to query.
| null | CC BY-SA 2.5 | null | 2008-09-02T11:32:13.613 | 2008-09-02T11:32:13.613 | null | null | 3,221 | null |
39,276 | 1 | 39,278 | null | 40 | 56,657 | Is there any free or commercial component written in .NET (no COM interop) that will work with most twain scanners?
| .NET Scanning API | CC BY-SA 2.5 | 0 | 2008-09-02T11:34:06.930 | 2015-02-10T19:47:01.457 | 2008-09-22T02:36:29.400 | 3,937 | 4,171 | [
"c#",
".net",
"twain",
"scanning"
] |
39,267 | 2 | null | 33,306 | 0 | null | The container itself is allocated where you decide (it can be the stack, the heap, an object's member, etc) but the memory it uses is, by default, as others described, taken on the Free Store (managed through new and delete) which is not the same as the heap (managed through malloc/free).
[Don't mix the two!](http://w... | null | CC BY-SA 2.5 | null | 2008-09-02T11:31:15.690 | 2008-09-02T11:31:15.690 | null | null | 4,177 | null |
39,278 | 2 | null | 39,276 | 10 | null | In my company we use [Pegasus](http://www.pegasusimaging.com). It's great.
| null | CC BY-SA 2.5 | null | 2008-09-02T11:35:10.873 | 2009-11-17T21:19:52.497 | 2009-11-17T21:19:52.497 | 34,397 | 1,154 | null |
39,266 | 2 | null | 38,674 | 4 | null | None, really.
As others have said, the best solution is to have something in between. I personally prefer [amfphp](http://www.amfphp.org/) for larger datasets and plain xml for smaller stuff, especially since they introduced E4X (way better XML handling) in ActionScript 3.
However, since Flash can do socket communi... | null | CC BY-SA 2.5 | null | 2008-09-02T11:30:25.473 | 2008-09-02T11:30:25.473 | null | null | 914 | null |
39,280 | 2 | null | 39,276 | 7 | null | Take a look at [CodeProject: .NET TWAIN image scanning](http://www.codeproject.com/KB/dotnet/twaindotnet.aspx) That might give you a good start.
| null | CC BY-SA 2.5 | null | 2008-09-02T11:35:55.757 | 2008-09-02T11:35:55.757 | null | null | 41 | null |
39,251 | 2 | null | 38,005 | 1 | null | OK, I am going to give myself one possible solution.
Inserts/Updates were never an issue; you can wrap the business logic in a Save/Update method; e.g.
```
public class EmployeesDAL
{
...
SaveEmployee(Employee employee)
{
//data formatting
employee.FirstName = employee.FirstName.Trim();
... | null | CC BY-SA 2.5 | null | 2008-09-02T11:20:40.630 | 2008-09-02T11:20:40.630 | null | null | 4,050 | null |
39,268 | 2 | null | 39,229 | 3 | null | The vast majority of .net developers use Visual Studio, but there are a couple of alternatives.
[Visual Studio Express Editions](http://www.microsoft.com/Express/) are free and give you a cut down version of Visual Studio which you can use with a single language, i.e. VB or C# or C++.
[SharpDevelop](http://www.icsha... | null | CC BY-SA 3.0 | null | 2008-09-02T11:31:26.140 | 2013-02-14T01:55:08.580 | 2013-02-14T01:55:08.580 | 1,195,542 | 3,464 | null |
39,282 | 2 | null | 38,674 | 1 | null | You should look at this [article](http://www.adobe.com/devnet/dreamweaver/articles/dreamweaver_flash_prototype.html). Also you could look into [Flex Data Services](http://labs.adobe.com/wiki/index.php/Flex_Enterprise_Services). Usually Flex is more suited for application that need a lot of access to data, but for simpl... | null | CC BY-SA 2.5 | null | 2008-09-02T11:37:01.760 | 2008-09-02T11:37:01.760 | null | null | 4,204 | null |
39,288 | 1 | 39,293 | null | 20 | 6,286 | I have heard umpteen times that we 'should not mix business logic with other code' or statements like that. I think every single code I write (processing steps I mean) consists of logic that is related to the business requirements..
Can anyone tell me what exactly consists of business logic? How can it be distinguishe... | What exactly consists of 'Business Logic' in an application? | CC BY-SA 2.5 | 0 | 2008-09-02T11:40:00.427 | 2009-09-17T20:30:49.253 | 2008-09-02T11:46:46.993 | 832 | 184 | [
"business-logic-layer"
] |
39,283 | 2 | null | 39,276 | 8 | null | Microsoft have an API all about scanning. It's called [Windows Image Acquisition](https://msdn.microsoft.com/en-us/library/windows/desktop/ms630368%28v=vs.85%29.aspx) and you can read a great Coding4Fun article about it by none other than Scott Hanselman [here](http://blogs.msdn.com/coding4fun/archive/2006/10/31/912546... | null | CC BY-SA 3.0 | null | 2008-09-02T11:37:20.120 | 2015-02-10T19:47:01.457 | 2015-02-10T19:47:01.457 | 985,851 | 615 | null |
39,291 | 2 | null | 39,243 | 0 | null | `SQL Server` doesn't keep track of changes so it can't tell you this.
The only way you may be able to do this is if you had a copy of all the scripts applied to the database.
In order to be able to capture this information in the future you should look at `DDL triggers (v2005+)` which will enable you to record change... | null | CC BY-SA 3.0 | null | 2008-09-02T11:42:13.417 | 2017-07-04T08:45:17.577 | 2017-07-04T08:45:17.577 | 5,423,108 | 1,755 | null |
39,287 | 2 | null | 39,006 | 0 | null | Well, it seems the problem there is the way (and order) in which you assign the ports.
Basically, *:80 means "use port 80 for all hosts in this configuration". When you do this, Apache tries to bind that host to 0.0.0.0:80, which means that host will receive every single packet coming to the machine through port 80, ... | null | CC BY-SA 2.5 | null | 2008-09-02T11:39:54.437 | 2008-09-02T11:39:54.437 | null | null | 2,384 | null |
39,293 | 2 | null | 39,288 | 49 | null | Simply define what you are doing in plain English. When you are saying things businesswise, like "make those suffer", "steal that money", "destroy this portion of earth" you are talking about business layer. To make it clear, things that get you excited go here.
When you are saying "show this here", "do not show that"... | null | CC BY-SA 2.5 | null | 2008-09-02T11:43:39.403 | 2009-09-17T20:30:49.253 | 2009-09-17T20:30:49.253 | 21,981 | 31,505 | null |
39,294 | 2 | null | 39,288 | 0 | null | For me, " " makes up all the entities that represent data applicable to the problem domain, as well as the logic that decides on "what do do with the data"..
So it should really consist of "data transport" (not access) and "data manipulation".. Actually data access (stuff hitting the DB) should be in a different laye... | null | CC BY-SA 2.5 | null | 2008-09-02T11:43:43.413 | 2008-09-02T11:43:43.413 | null | null | 832 | null |
39,295 | 2 | null | 39,104 | 3 | null | That's probably the way to do it, without resorting to something more advanced like using setuptools to install the files where they belong.
Notice there's a problem with that approach, because on OSes with real a security framework (UNIXes, etc.) the user running your script might not have the rights to access the DB... | null | CC BY-SA 2.5 | null | 2008-09-02T11:43:45.550 | 2008-09-02T11:43:45.550 | null | null | 2,384 | null |
39,299 | 2 | null | 39,288 | 0 | null | If it contains anything about things like form, button, etc.. it's not a business logic, it's presentation layer. If it contains persistence to file or database, it's DAL. Anything in between is business logic. In reality, anything non-UI sometimes gets called "business logic," but it should be something that concerns ... | null | CC BY-SA 2.5 | null | 2008-09-02T11:46:41.627 | 2008-09-02T11:46:41.627 | null | null | 3,827 | null |
39,290 | 2 | null | 39,007 | 1 | null | It looks like the slowdown is due to ReSharper. From a bit more Googling I [found](http://codeclimber.net.nz/archive/2008/08/06/how-to-disable-resharper-for-a-file-ctrl-8.aspx) that pressing + will turn ReSharper off for the current file (+ again to turn it back on). If I do this for the slow Xaml files, my problems pr... | null | CC BY-SA 4.0 | null | 2008-09-02T11:41:55.087 | 2021-06-14T22:30:57.393 | 2021-06-14T22:30:57.393 | 9,454,010 | 1,367 | null |
39,286 | 2 | null | 24,886 | 18 | null | Here's an additional observation if you're worried about micro optimisation. Decrementing loops can 'possibly' be more efficient than incrementing loops (depending on instruction set architecture e.g. ARM), given:
```
for (i = 0; i < 100; i++)
```
On each loop you you will have one instruction each for:
1. Adding ... | null | CC BY-SA 3.0 | null | 2008-09-02T11:39:43.797 | 2015-10-06T18:59:26.967 | 2015-10-06T18:59:26.967 | 3,313,438 | 4,071 | null |
39,297 | 2 | null | 39,281 | 1 | null | We have had similar requirements, and what we found was that often times the user just wants to what has been changed, not necessarily roll back any changes.
I'm not sure what your use case is, but what we have done was create and Audit table that is automatically updated with changes to an business entity, includ... | null | CC BY-SA 2.5 | null | 2008-09-02T11:43:55.190 | 2008-09-02T11:43:55.190 | null | null | 1,768 | null |
39,281 | 1 | 39,360 | null | 131 | 44,124 | We have a requirement in project to store all the revisions(Change History) for the entities in the database. Currently we have 2 designed proposals for this:
e.g. for "Employee" Entity
```
-- Holds Employee Entity
"Employees (EmployeeId, FirstName, LastName, DepartmentId, .., ..)"
-- Holds the Employee Revisions ... | Database Design for Revisions? | CC BY-SA 3.0 | 0 | 2008-09-02T11:36:38.517 | 2020-11-01T16:11:18.443 | 2018-01-10T17:31:00.733 | 4,464,702 | 191 | [
"sql",
"database",
"database-design",
"versioning"
] |
39,303 | 2 | null | 39,281 | 0 | null | It sounds like you want to track changes to specific entities over time, e.g. ID 3, "bob", "123 main street", then another ID 3, "bob" "234 elm st", and so on, in essence being able to puke out a revision history showing every address "bob" has been at.
The best way to do this is to have an "is current" field on each ... | null | CC BY-SA 2.5 | null | 2008-09-02T11:47:14.667 | 2008-09-02T11:47:14.667 | null | null | 3,660 | null |
39,304 | 1 | 39,314 | null | 3 | 1,162 | In C++, there isn't a de-facto standard logging tool. In my experience, shops roll their own. This creates a bit of a problem, however, when trying to create reusable software components. If everything in your system depends on the logging component, this makes the software less reusable, basically forcing any downs... | Do C++ logging frameworks sacrifice reusability? | CC BY-SA 3.0 | 0 | 2008-09-02T11:47:46.010 | 2013-12-02T13:03:26.003 | 2013-12-02T13:03:26.003 | 2,432,317 | 1,541 | [
"c++",
"logging",
"code-reuse"
] |
39,296 | 2 | null | 39,281 | 7 | null | The way that I've seen this done in the past is have
```
Employees (EmployeeId, DateModified, < Employee Fields > , boolean isCurrent );
```
You never "update" on this table (except to change the valid of isCurrent), just insert new rows. For any given EmployeeId, only 1 row can have isCurrent == 1.
The complexity... | null | CC BY-SA 2.5 | null | 2008-09-02T11:43:50.463 | 2008-09-03T02:14:52.943 | 2008-09-03T02:14:52.943 | 3,839 | 3,839 | null |
39,309 | 2 | null | 39,194 | 6 | null | A Java application bundle on OS X is nothing more than a directory containing your .jars and a number of configuration files. The SetFile tool sets a custom HFS filesystem property on the directory to tell finder that it is an app, but giving it a ".app" extension serves the same purpose. I don't think there's anythi... | null | CC BY-SA 2.5 | null | 2008-09-02T11:48:56.990 | 2008-09-02T11:48:56.990 | null | null | 998 | null |
39,306 | 2 | null | 24,886 | 126 | null | From [Efficiency versus intent](http://www.drdobbs.com/architecture-and-design/efficiency-versus-intent/228700184) by Andrew Koenig :
> First, it is far from obvious that `++i` is more efficient than `i++`, at least where integer variables are concerned.
And :
> So the question one should be asking is not which of t... | null | CC BY-SA 3.0 | null | 2008-09-02T11:48:15.977 | 2015-10-06T19:20:01.910 | 2015-10-06T19:20:01.910 | 3,313,438 | 2,797 | null |
39,308 | 2 | null | 39,281 | 3 | null | If you want to do the first one you might want to use XML for the Employees table too. Most newer databases allow you to query into XML fields so this is not always a problem. And it might be simpler to have one way to access employee data regardless if it's the latest version or an earlier version.
I would try the se... | null | CC BY-SA 3.0 | null | 2008-09-02T11:48:34.510 | 2013-03-06T21:52:57.977 | 2013-03-06T21:52:57.977 | 1,399,920 | 3,320 | null |
39,314 | 2 | null | 39,304 | 5 | null | Yes. But dependency injection will help in this case.
You can create an abstract logging base-class and create implementations for the logging-frameworks you want to use. Your components are just dependent on the abstract base-class. And you inject the implementations along with al their dependencies as needed.
| null | CC BY-SA 2.5 | null | 2008-09-02T11:51:29.290 | 2008-09-02T11:51:29.290 | null | null | 3,320 | null |
39,315 | 2 | null | 39,288 | 2 | null | I dont like the BLL+DAL names of the layers, they are more confusing than clarifying.
Call it DataServices and DataPersistence. This will make it easier.
Services manipulate, persistence tier CRUDs (Create, Read, Update, Delete)
| null | CC BY-SA 2.5 | null | 2008-09-02T11:51:37.717 | 2008-09-02T11:51:37.717 | null | null | 960 | null |
39,311 | 2 | null | 39,243 | 1 | null | You can get last modify date or creation date of object in `SQL Server`.
For examle info on tables:
```
SELECT * FROM sys.objects WHERE type='U'
```
[More info on msdn](http://msdn.microsoft.com/en-us/library/ms190324.aspx)
Number of pages can be fetched from `sys.database_files`.
[Check documentation](http://msd... | null | CC BY-SA 3.0 | null | 2008-09-02T11:49:20.857 | 2017-07-04T08:44:56.920 | 2017-07-04T08:44:56.920 | 5,423,108 | 3,911 | null |
39,313 | 2 | null | 39,281 | 9 | null | Ramesh, I was involved in development of system based on first approach.
It turned out that storing revisions as XML is leading to a huge database growth and significantly slowing things down.
My approach would be to have one table per entity:
```
Employee (Id, Name, ... , IsActive)
```
where is a sign of the lates... | null | CC BY-SA 2.5 | null | 2008-09-02T11:49:28.767 | 2008-09-02T12:40:59.343 | 2008-09-02T12:40:59.343 | 1,196 | 1,196 | null |
39,300 | 2 | null | 39,281 | 62 | null | I think the key question to ask here is 'Who / What is going to be using the history'?
If it's going to be mostly for reporting / human readable history, we've implemented this scheme in the past...
Create a table called 'AuditTrail' or something that has the following fields...
```
[ID] [int] IDENTITY(1,1) NOT NULL... | null | CC BY-SA 2.5 | null | 2008-09-02T11:46:44.827 | 2008-09-02T12:52:01.750 | 2008-09-02T12:52:01.750 | 475 | 475 | null |
39,310 | 2 | null | 38,870 | 5 | null | Option 2 uses a simple compund key, option 1 uses a [surrogate key](http://en.wikipedia.org/wiki/Surrogate_key). Option 2 is preferred in most scenarios and is close to the relational model in that it is a good candidate key.
There are situations where you may want to use a surrogate key (Option 1)
1. You are not cer... | null | CC BY-SA 4.0 | null | 2008-09-02T11:49:10.543 | 2021-11-14T07:28:56.697 | 2021-11-14T07:28:56.697 | 484,127 | 3,893 | null |
39,326 | 2 | null | 37,573 | 0 | null | I recommend learning Rails and Ruby itself first, and then picking up something like InstantRails. Having too many layers when learning something new can make it hard to know what features are part of which language, and potentially confuse you when trying to determine where a bug is occurring.
| null | CC BY-SA 2.5 | null | 2008-09-02T11:58:18.400 | 2008-09-02T11:58:18.400 | null | null | 1,611 | null |
39,321 | 2 | null | 39,006 | 4 | null | > NameVirtualHost *:80I get this error:Only one usage of each socket address (protocol/network address/port) is normally >permitted. : make_sock: could not bind to address 0.0.0.0:80
I think this might be because you have somthing else listening to port 80. Do you have any other servers (or for example Skype) running?... | null | CC BY-SA 2.5 | null | 2008-09-02T11:56:29.810 | 2008-09-02T11:56:29.810 | null | null | 2,953 | null |
39,336 | 2 | null | 39,331 | 0 | null | I think using SQL query analyzer would be a good start.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:02:33.710 | 2008-09-02T12:02:33.710 | null | null | 1,196 | null |
39,316 | 2 | null | 39,240 | 1 | null | Something like this might work, a kind of ranking system. You would probably have to split the string in your application to build a SQL string, but I have used similar to build an effective site search.
```
Select
Top 10
ArticleID,
ArticleTitle,
ArticleContent
From
Articles
Order By
(Case When ArticleTitle = 'Article... | null | CC BY-SA 2.5 | null | 2008-09-02T11:52:02.130 | 2008-09-02T11:52:02.130 | null | null | 383 | null |
39,319 | 2 | null | 39,288 | 0 | null | Business logic is pure abstraction, it exists independent of the materialization/visualization of the data in front of your user, and independent of the persistence of the underlying data.
For example, in Tax Preparation software, one responsibility of the business logic classes would computation of tax owed. They wo... | null | CC BY-SA 2.5 | null | 2008-09-02T11:53:52.170 | 2008-09-02T11:53:52.170 | null | null | 1,042 | null |
39,333 | 2 | null | 39,288 | 5 | null | To simplify things to a single line...
Business Logic would be code that doesn't depend on/won't change with a specific UI/implementation detail..
It is a code-representation of the rules, processes, etc. that are defined by/reflect the business being modelled.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:01:53.760 | 2008-09-02T12:01:53.760 | null | null | 1,695 | null |
39,325 | 2 | null | 38,068 | 2 | null | The pseudo-typedef antipattern mentioned by Shog9 would work - though it's not recommended to use an ANTIPATTERN - but it does not address your intentions. The goal of pseudo-typedef is to reduce clutter in declaration and improve readability.
What you want is to be able to replace a group of generics declarations by... | null | CC BY-SA 2.5 | null | 2008-09-02T11:58:04.127 | 2008-09-02T11:58:04.127 | null | null | 4,213 | null |
39,330 | 2 | null | 39,288 | 12 | null | It's probably easier to start by saying what business logic. Database or disk access isn't business logic. UI isn't business logic. Network communications aren't business logic.
To me, business logic is the rules that describe how a business operates, not how a software architecture operates. Business logic also has ... | null | CC BY-SA 2.5 | null | 2008-09-02T11:59:53.623 | 2008-09-02T11:59:53.623 | null | null | 3,464 | null |
39,342 | 2 | null | 39,331 | 0 | null | In Oracle you can look at the [explain plan](http://www.oracle-base.com/articles/8i/ExplainPlanUsage.php) to compare variations on your query
| null | CC BY-SA 2.5 | null | 2008-09-02T12:05:11.270 | 2008-09-02T12:05:11.270 | null | null | 3,590 | null |
39,331 | 1 | 39,344 | null | 13 | 5,565 | What techniques can be applied effectively to improve the performance of SQL queries? Are there any general rules that apply?
| What generic techniques can be applied to optimize SQL queries? | CC BY-SA 2.5 | 0 | 2008-09-02T11:59:59.240 | 2013-05-17T14:48:40.187 | null | null | 184 | [
"sql",
"performance"
] |
39,343 | 2 | null | 33,545 | 1 | null | [OpenOffice](http://openoffice.org) has a [Basic](http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide) interpreter which is largely compatible with VBA. This may help you with your Access applications. The OpenOffice versions should run on both Windows and Linux.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:05:30.723 | 2008-09-02T12:05:30.723 | null | null | 3,464 | null |
39,348 | 2 | null | 39,254 | 2 | null | REQUEST_URI includes the Query String (?q=testing...) where DOCUMENT_URI does not.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:07:47.193 | 2008-09-02T12:07:47.193 | null | null | 2,443 | null |
39,345 | 2 | null | 39,331 | 0 | null | Make sure that you have the right indexes on the table. if you frequently use a column as a way to order or limit your dataset an index can make a big difference. I saw in a recent article that select distinct can really slow down a query, especially if you have no index.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:06:55.667 | 2008-09-02T12:06:55.667 | null | null | 4,108 | null |
39,349 | 2 | null | 39,331 | 0 | null | The obvious optimization for SELECT queries is ensuring you have indexes on columns used for joins or in WHERE clauses.
Since adding indexes can slow down data writes you do need to monitor performance to ensure you don't kill the DB's write performance, but that's where using a good query analysis tool can help you b... | null | CC BY-SA 2.5 | null | 2008-09-02T12:08:16.117 | 2008-09-02T12:08:16.117 | null | null | 2,562 | null |
39,346 | 2 | null | 39,304 | 1 | null | Yes, Mendelt is right. We do exactly this in our products. Everything depends on the ILogger abstract interface, but it does not depend on anything else. Typically an executable or a high-level DLL will be the one to construct an actual implemented Logger interface and inject it.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:06:56.947 | 2008-09-02T12:06:56.947 | null | null | 3,114 | null |
39,350 | 2 | null | 32,227 | 1 | null | Unless you have a really good reason to do this, then this generally is a bad idea. It makes it very difficult to optimize and scale the database.
If you absolutely must do it, then Travis's suggestion is fine for small tables, but its not really going to scale that well.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:09:06.970 | 2008-09-02T12:09:06.970 | null | null | 3,839 | null |
39,356 | 2 | null | 39,194 | 0 | null | One way is to generate a zip file with the App using for example Ant. In ant you can specify that the file in Contents/MacOS should have execute-permissions using something like filemode="755".
| null | CC BY-SA 2.5 | null | 2008-09-02T12:11:38.947 | 2008-09-02T12:11:38.947 | null | null | 4,220 | null |
39,344 | 2 | null | 39,331 | 19 | null | - - - - - - -
| null | CC BY-SA 2.5 | null | 2008-09-02T12:06:43.170 | 2008-09-02T12:06:43.170 | null | null | 2,902 | null |
39,359 | 2 | null | 39,331 | 0 | null | - - -
| null | CC BY-SA 2.5 | null | 2008-09-02T12:12:28.850 | 2008-09-02T12:12:28.850 | null | null | 3,911 | null |
39,354 | 2 | null | 39,331 | 3 | null | The biggest thing you can do is to look for table scans in sql server query analyzer (make sure you turn on "show execution plan"). Otherwise there are a myriad of articles at MSDN and elsewhere that will give good advice.
As an aside, when I started learning to optimize queries I ran sql server query profiler against... | null | CC BY-SA 2.5 | null | 2008-09-02T12:11:10.117 | 2008-09-02T12:11:10.117 | null | null | 2,757 | null |
39,357 | 1 | 40,819 | null | 5 | 1,568 | Which features and services in Vista can you remove with nLite (or tool of choice) to make a Virtual PC-image of Vista as small as possible?
The VPC must work with development in Visual Studio.
A normal install of Vista today is like 12-14 GB, which is silly when I got it to work with Visual Studio at 4 GB. But with ... | Windows Vista Virtual PC-image for Visual Studio-development minimized | CC BY-SA 2.5 | 0 | 2008-09-02T12:12:03.080 | 2021-12-24T13:50:52.693 | 2008-09-02T13:32:28.113 | 2,429 | 2,429 | [
"windows-vista",
"virtual-pc"
] |
39,358 | 2 | null | 39,281 | 17 | null | We have implemented a solution very similar to the solution that Chris Roberts suggests, and that works pretty well for us.
Only difference is that we only store the new value. The old value is after all stored in the previous history row
```
[ID] [int] IDENTITY(1,1) NOT NULL,
[UserID] [int] NULL,
[EventDate] [datet... | null | CC BY-SA 3.0 | null | 2008-09-02T12:12:17.870 | 2012-04-24T12:58:43.010 | 2012-04-24T12:58:43.010 | 475 | 4,116 | null |
39,369 | 2 | null | 37,310 | 0 | null | @cem-catikkas I think it would be more correct to compare the getClass().getName() values. In the case that MyInterfaceImpl1 class is subclassed your test could be broken, as the subclass is instanceof MyInterfaceImpl1. I would rewrite as follow:
```
IMyInterface fromFactory = factory.create(...);
Assert.assertEqual... | null | CC BY-SA 2.5 | null | 2008-09-02T12:22:57.703 | 2008-09-02T12:22:57.703 | null | null | 4,213 | null |
39,365 | 1 | 39,472 | null | 41 | 24,124 | Typically I develop my websites on trunk, then merge changes to a testing branch where they are put on a 'beta' website, and then finally they are merged onto a live branch and put onto the live website.
With a Facebook application things are a bit tricky. As you can't view a Facebook application through a normal web ... | Developing and Testing a Facebook application | CC BY-SA 2.5 | 0 | 2008-09-02T12:18:59.130 | 2020-03-24T07:33:52.800 | 2008-09-09T22:13:51.183 | -1 | 2,990 | [
"testing",
"web-applications",
"facebook"
] |
39,362 | 2 | null | 39,194 | 0 | null | Having worked on the Mac port of [NITE](http://nite.sourceforge.net), I can say that jar packages for other platforms should work equally well on Mac. I would still recommend finding a mac for testing (or even announcing mac support was in beta) as we discovered a few mac-only quirks during the port (to go with the win... | null | CC BY-SA 4.0 | null | 2008-09-02T12:16:15.190 | 2018-12-20T13:02:07.813 | 2018-12-20T13:02:07.813 | 1,997,093 | 1,404 | null |
39,374 | 1 | null | null | 5 | 1,131 | How do you write code that is easily read by other people and who have had no hand in writing any part of it?
| How do you write code that is easily read by other people who have had no hand in writing any part of it? | CC BY-SA 3.0 | null | 2008-09-02T12:29:46.377 | 2014-02-03T12:58:03.250 | 2011-12-13T13:38:48.570 | 300,311 | 4,021 | [
"readability"
] |
39,372 | 2 | null | 39,364 | 1 | null | The fact that it only happens sporadically makes me think this is less of a programming issue, and more of a sysadmin issue - if it were a defect in the implementation, you'd expect it to fail consistently considering the error is "No such file or directory". Two guesses
- There are multiple front-end web servers, and... | null | CC BY-SA 2.5 | null | 2008-09-02T12:27:00.203 | 2008-09-02T12:27:00.203 | null | null | 1,200 | null |
39,360 | 2 | null | 39,281 | 42 | null |
1. Do not put it all in one table with an IsCurrent discriminator attribute. This just causes problems down the line, requires surrogate keys and all sorts of other problems.
2. Design 2 does have problems with schema changes. If you change the Employees table you have to change the EmployeeHistories table and all the... | null | CC BY-SA 3.0 | null | 2008-09-02T12:13:47.380 | 2018-04-20T22:04:45.400 | 2018-04-20T22:04:45.400 | 875,915 | 3,893 | null |
39,381 | 2 | null | 3,260 | 0 | null | Is there a qualitative difference between the desired peak and the unwanted second peak? If both peaks are "sharp" -- i.e. short in time duration -- when looking at the signal in the frequency domain (by doing FFT) you'll get energy at most bands. But if the "good" peak reliably has energy present at frequencies not ex... | null | CC BY-SA 2.5 | null | 2008-09-02T12:33:16.163 | 2008-09-02T17:33:22.120 | 2008-09-02T17:33:22.120 | 4,069 | 4,069 | null |
39,380 | 2 | null | 39,374 | 4 | null | Keep code nice, clear and simple. Don't comment what you're doing when it's obvious (for instance I know what a foreach or if does, I don't normally need an explanation).
Code tricks (such as auto properties) that make simple things take up fewer lines are good too.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:33:05.743 | 2008-09-02T12:33:05.743 | null | null | 905 | null |
39,382 | 2 | null | 39,374 | 0 | null | Probably the most important point is to keep your syntax consistent. I would also have a look at the design guidelines for the language you are writing in.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:33:35.570 | 2008-09-02T12:33:35.570 | null | null | 202 | null |
39,376 | 2 | null | 34,486 | 1 | null | The same thing in prototype:
```
function loadPage(pagePath, displayElement) {
new Ajax.Updater(displayElement, pagePath);
}
```
[Ajax.Updater in Prototype API](http://prototypejs.org/api/ajax/updater)
| null | CC BY-SA 2.5 | null | 2008-09-02T12:31:25.950 | 2008-09-02T12:31:25.950 | null | null | 4,192 | null |
39,363 | 2 | null | 39,003 | 11 | null | I disagree with [Jon Limjap](https://stackoverflow.com/questions/39003/nunit-how-to-test-all-classes-that-implement-a-particular-interface#39036) when he says,
> It is not a contract on either a.) how the method should be implemented and b.) what that method should be doing exactly (it only guarantees the return type)... | null | CC BY-SA 2.5 | null | 2008-09-02T12:16:24.957 | 2008-10-06T17:46:35.070 | 2017-05-23T12:18:27.453 | -1 | 1,190 | null |
39,385 | 2 | null | 23,228 | 2 | null | Another reason for `String.Format` is the similarity to function `printf` from C. It was supposed to let C developers have an easier time switching languages.
| null | CC BY-SA 3.0 | null | 2008-09-02T12:34:17.817 | 2015-04-08T03:15:52.487 | 2015-04-08T03:15:52.487 | 445,131 | 3,632 | null |
39,389 | 1 | 39,393 | null | 3 | 22,195 | I need to add a web part zone to a wiki page. I'm opening the page using SharePoint Designer, but there doesn't seem to be an obvious way (such as a menu) to add a Web Part Zone.
| How to add a web part zone in SharePoint using SharePoint Designer | CC BY-SA 2.5 | 0 | 2008-09-02T12:35:58.933 | 2013-04-26T12:41:20.703 | 2008-10-07T12:53:50.277 | 1,533 | 1,533 | [
"sharepoint",
"moss",
"sharepoint-designer"
] |
39,386 | 2 | null | 39,374 | 9 | null | The best way to ensure that others can read your code is to make sure that it is clear and concise. Namely,
- - -
Beyond that you start to get in to the areas that might be a bit subjective, most people should agree on these items.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:34:59.030 | 2008-09-02T12:34:59.030 | null | null | 1,185 | null |
39,387 | 2 | null | 39,364 | 3 | null | for a start I think your include path should maybe have a trailing slash. Here is an example of mine :
```
set_include_path('../library/ZendFramework-1.5.2/library/:../application/classes/:../application/classes/excpetions/:../application/forms/');
```
You bootstrap file will be included by another file (probably an... | null | CC BY-SA 2.5 | null | 2008-09-02T12:35:03.197 | 2008-09-02T12:35:03.197 | null | null | 1,349,865 | null |
39,390 | 2 | null | 39,374 | 1 | null |
1. Document the code as to why it does what it does.
2. Make sure that all variables functions etc. are named consistently and descriptively
3. Use white space to group logical portions of code together, so it flows while reading.
4. Place the functions/methods etc. in a logical order.
5. (this one is my personal pref... | null | CC BY-SA 2.5 | null | 2008-09-02T12:37:17.963 | 2008-09-02T12:37:17.963 | null | null | 1,942 | null |
39,364 | 1 | 39,387 | null | 2 | 37,621 | I have inherited a client site which crashes every 3 or 4 days. It is built using the zend-framework with which I have no knowledge.
The following code:
```
<?php
// Make sure classes are in the include path.
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'lib' . PATH_SEPARATOR . 'app' . DI... | Failed to load Zend/Loader.php. Trying to work out why? | CC BY-SA 3.0 | null | 2008-09-02T12:16:50.977 | 2015-06-05T17:10:39.217 | 2015-06-05T17:10:39.217 | 4,248,328 | 319 | [
"php",
"zend-framework"
] |
39,383 | 2 | null | 37,271 | 0 | null | I think it depends on what you need. Let's see the options:
1) Descarded imediatelly! I'll not even justify. :)
2) If you need a simple, quick, one-method persistence, stick with it. It will persist the complete data graph as it is! Beware of how long you'll be maintaning the persisted objects. As yourself pointed ou... | null | CC BY-SA 2.5 | null | 2008-09-02T12:33:48.533 | 2008-09-02T12:33:48.533 | null | null | 4,213 | null |
39,391 | 1 | 39,449 | null | 11 | 21,777 | If I create an HTTP `java.net.URL` and then call `openConnection()` on it, does it necessarily imply that an HTTP post is going to happen? I know that `openStream()` implies a GET. If so, how do you perform one of the other HTTP verbs without having to work with the raw socket layer?
| Does new URL(...).openConnection() necessarily imply a POST? | CC BY-SA 3.0 | 0 | 2008-09-02T12:37:27.107 | 2016-11-28T04:43:12.093 | 2016-02-03T12:44:57.590 | 1,619,036 | 4,223 | [
"java",
"http",
"url"
] |
39,371 | 1 | null | null | 15 | 7,122 | How do you handle database exceptions in your application?
Are you trying to validate data prior passing it to DB or just relying on DB schema validation logic?
Do you try to recover from some kind of DB errors (e.g. timeouts)?
Here are some approaches:
1. Validate data prior passing it to DB
2. Left validation to D... | Database exception handling best practices | CC BY-SA 3.0 | 0 | 2008-09-02T12:25:35.263 | 2014-10-15T07:09:25.157 | 2017-05-23T12:04:26.480 | -1 | 1,196 | [
"database",
"exception",
"architecture"
] |
39,395 | 1 | 39,404 | null | 29 | 79,896 | How can I calculate the value of PI using C#?
I was thinking it would be through a recursive function, if so, what would it look like and are there any math equations to back it up?
I'm not too fussy about performance, mainly how to go about it from a learning point of view.
| How do I calculate PI in C#? | CC BY-SA 2.5 | 0 | 2008-09-02T12:39:12.623 | 2018-05-12T08:36:47.787 | 2009-01-23T12:17:24.387 | 16,587 | 383 | [
"c#",
"pi"
] |
39,397 | 2 | null | 35,745 | 0 | null | > When I have used Doxygen it has produced a full list of callers and callees. I think you have to turn it on.
I did that of course, but like I mentioned, doxygen does not consider interfaces between objects as they are defined in the IDL. It "only" shows direct C++ calls.
Don't get me wrong, it is already amazing wh... | null | CC BY-SA 2.5 | null | 2008-09-02T12:40:18.410 | 2008-09-02T12:40:18.410 | null | null | 1,398 | null |
39,403 | 1 | 39,410 | null | 1 | 2,339 | Is there a way to take over the Entity Framework class builder? I want to be able to have my own class builder so i can make some properties to call other methods upon materialization or make the entity classes partial.
| How to customize Entity Framework classes? | CC BY-SA 2.5 | null | 2008-09-02T12:42:54.893 | 2012-06-01T04:59:30.117 | null | null | 4,171 | [
".net",
"entity-framework"
] |
39,394 | 2 | null | 39,374 | 6 | null | This question is subjective, and should be avoided on StackOverflow, as per the [FAQ](https://stackoverflow.com/faq)
> Avoid asking questions that are
, argumentative, or require
extended discussion. This is a place
for questions that can be answered!
## The short answer would be:
- Avoid excessive comment... | null | CC BY-SA 2.5 | null | 2008-09-02T12:39:12.157 | 2010-06-04T07:19:04.800 | 2017-05-23T10:32:50.377 | -1 | 832 | null |
39,392 | 1 | 39,543 | null | 7 | 3,817 | Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of data on a web-page with XSL over ASP.NET MVC?
The two alternatives are:
1. ASP.NET (MVC/WebForms) with XSL Getting the data from the database and transforming it to XML which is then displayed on the different pages with XSL-tem... | ASP.NET MVC vs. XSL | CC BY-SA 2.5 | null | 2008-09-02T12:37:34.890 | 2012-05-04T00:47:22.833 | 2012-05-04T00:47:22.833 | 356,045 | 2,429 | [
"asp.net-mvc",
"xslt"
] |
39,406 | 2 | null | 39,371 | 1 | null | In general, I try to validate data as soon as possible after it has been entered. This is so that I can give helpful messages to the user earlier than after they have clicked "submit" or the equivalent.
By the time that it comes to making the db call I am hopefull that the data I am passing should be fairly good.
I try... | null | CC BY-SA 2.5 | null | 2008-09-02T12:44:47.667 | 2008-09-02T12:44:47.667 | null | null | 3,590 | null |
39,401 | 2 | null | 39,395 | 1 | null | Calculate like this:
```
x = 1 - 1/3 + 1/5 - 1/7 + 1/9 (... etc as far as possible.)
PI = x * 4
```
You have got Pi !!!
This is the simplest method I know of.
The value of PI slowly converges to the actual value of Pi (3.141592165......). If you iterate more times, the better.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:41:54.070 | 2008-09-02T12:58:23.310 | 2008-09-02T12:58:23.310 | 184 | 184 | null |
39,405 | 2 | null | 39,374 | 4 | null | Buy & read [Code Complete 2](https://rads.stackoverflow.com/amzn/click/com/0735619670). There's loads of stuff in there about writing easy to read / maintain code.
| null | CC BY-SA 2.5 | null | 2008-09-02T12:44:40.537 | 2008-09-02T12:44:40.537 | null | null | 1,349,865 | null |
39,410 | 2 | null | 39,403 | 3 | null | Actually they are already in partial classes. See [MSDN](http://msdn.microsoft.com/en-us/library/bb738612.aspx)
| null | CC BY-SA 3.0 | null | 2008-09-02T12:46:57.910 | 2012-06-01T04:59:30.117 | 2012-06-01T04:59:30.117 | 67,097 | 2,313 | null |
39,398 | 2 | null | 39,331 | 8 | null | Learn what's really going on under the hood - you should be able to understand the following concepts in detail:
- - - - [Fill factor](https://stackoverflow.com/questions/10919/how-do-you-measure-sql-fill-factor-value)- - - -
| null | CC BY-SA 2.5 | null | 2008-09-02T12:40:24.650 | 2008-09-02T12:40:24.650 | 2017-05-23T12:13:34.533 | -1 | 905 | null |
39,419 | 1 | 39,441 | null | 55 | 144,973 | In Visual C++ a DWORD is just an unsigned long that is machine, platform, and SDK dependent. However, since DWORD is a double word (that is 2 * 16), is a DWORD still 32-bit on 64-bit architectures?
| How large is a DWORD with 32- and 64-bit code? | CC BY-SA 3.0 | 0 | 2008-09-02T12:50:26.340 | 2022-08-15T20:21:03.327 | 2016-09-30T14:26:16.387 | 2,060,725 | 44,972 | [
"c++",
"winapi",
"64-bit",
"dword"
] |
39,393 | 2 | null | 39,389 | 10 | null | from: [http://office.microsoft.com/en-us/sharepointdesigner/HA101513941033.aspx](http://office.microsoft.com/en-us/sharepointdesigner/HA101513941033.aspx)
> Insert a Web Part zone
1. In Office SharePoint Designer 2007, open the page where you want to insert the Web Part zone.
2. If the Web Parts task pane is not alrea... | null | CC BY-SA 2.5 | null | 2008-09-02T12:38:31.957 | 2008-09-02T12:38:31.957 | null | null | 202 | null |
39,399 | 1 | null | null | 40 | 53,718 | I have a struts-based webapp, and I would like the default "welcome" page to be an action. The only solutions I have found to this seem to be variations on making the welcome page a JSP that contains a redirect to the action. For example, in `web.xml`:
```
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>... | How can I set the welcome page to a struts action? | CC BY-SA 2.5 | 0 | 2008-09-02T12:40:47.520 | 2017-05-30T10:40:45.213 | 2014-12-30T10:08:49.780 | 573,032 | 3,913 | [
"java",
"jsp",
"struts2",
"struts"
] |