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,947
2
null
18,932
11
null
Here is another good article on [removing duplicates](http://www.xaprb.com/blog/2007/02/06/how-to-delete-duplicate-rows-with-sql-part-2/). It discusses why its hard: "" The temp table solution, and two mysql examples. In the future are you going to prevent it at a database level, or from an application perspective. ...
null
CC BY-SA 2.5
null
2008-08-20T21:58:00.983
2008-08-20T21:58:00.983
null
null
1,611
null
18,932
1
18,949
null
1,366
1,345,643
I need to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows). The rows, of course, will not be perfect duplicates because of the existence of the `RowID` identity field. ``` RowID int not null identity(1,1) primary key, Col1 varchar(20) not null, Col2 varchar(2048) not null, Col3 tinyint n...
How can I remove duplicate rows?
CC BY-SA 4.0
0
2008-08-20T21:51:29.780
2022-10-07T22:09:19.863
2022-08-16T15:54:18.640
2,756,409
357
[ "sql-server", "tsql", "duplicates" ]
18,952
1
18,977
null
19
24,438
Every project invariably needs some type of reporting functionality. From a foreach loop in your language of choice to a full blow BI platform. > To get the job done what tools, widgets, platforms has the group used with success, frustration and failure?
What is your reporting tool of choice?
CC BY-SA 2.5
0
2008-08-20T22:01:16.513
2011-04-18T18:49:40.770
2008-10-01T08:10:17.827
2,902
1,293
[ "sql", "reporting", "business-intelligence" ]
18,943
1
null
null
13
12,259
Typically in a large network a computer needs to operate behind an authenticated proxy - any connections to the outside world require a username/password which is often the password a user uses to log into email, workstation etc. This means having to put the network password in the `apt.conf` file as well as typically...
Obscuring network proxy password in plain text files on Linux/UNIX-likes
CC BY-SA 2.5
0
2008-08-20T21:56:21.033
2017-05-31T13:38:18.313
2008-08-24T00:22:46.867
199
199
[ "linux", "security", "unix", "proxy", "apt" ]
18,955
1
20,255
null
3
7,190
Is there a way to disable entering multi-line entries in a Text Box (i.e., I'd like to stop my users from doing ctrl-enter to get a newline)?
Disabling multi-line fields in MS Access
CC BY-SA 2.5
null
2008-08-20T22:02:38.880
2020-02-22T04:38:02.117
null
null
685
[ "ms-access" ]
18,958
2
null
18,719
1
null
Logging in over RDP shouldn't affect whether the console locks. If you don't log out of RDP (just closing the client keeps your session pending), then your session will be locked. You can solve that with idle timeouts in Terminal Services Manager. If your console is locking, that's a seperate policy in Local Computer ...
null
CC BY-SA 2.5
null
2008-08-20T22:05:19.780
2008-08-20T22:05:19.780
null
null
2,199
null
18,964
2
null
18,717
1
null
The best thing about foreign key constraints (and constraints in general, really) are that you can rely on them when writing your queries. A lot of queries can become a lot more complicated if you can't rely on the data model holding "true". In code, we'll generally just get an exception thrown somewhere - but in [SQL...
null
CC BY-SA 3.0
null
2008-08-20T22:10:22.670
2013-08-10T19:33:00.967
2013-08-10T19:33:00.967
63,550
2,199
null
18,941
2
null
18,912
82
null
For production code requiring a large compatibility with client browsers I still suggest [Ivan Nevostruev's answer](https://stackoverflow.com/questions/18912/how-can-i-find-the-keys-of-a-hash/6921193#6921193) with shim to ensure `Object.keys` in older browsers. However, it's possible to get the exact functionality requ...
null
CC BY-SA 4.0
null
2008-08-20T21:55:40.643
2021-04-22T11:41:47.187
2021-04-22T11:41:47.187
63,550
2,118
null
18,965
2
null
18,783
1
null
I look out for: - - - - - - - -
null
CC BY-SA 2.5
null
2008-08-20T22:12:15.987
2008-08-20T22:12:15.987
null
null
993
null
18,956
2
null
18,757
2
null
I personally just prefer to use the if/else right there in the view. It helps me see everything going on in view at once. If you want to avoid the tag soup though, I would suggest creating a helper method. ``` <%= Helper.ProfessionField() %> string ProfessionField() { if(IsNewItem) { return /* some drop dow...
null
CC BY-SA 2.5
null
2008-08-20T22:02:52.873
2008-08-20T22:02:52.873
null
null
1,208
null
18,973
2
null
18,952
5
null
For a lot of projects we use ActiveReports.
null
CC BY-SA 2.5
null
2008-08-20T22:18:55.160
2008-08-20T22:18:55.160
null
null
380
null
18,969
2
null
10,933
1
null
Is your Subversion repository hosted inside of Apache (rather than svnserve)? If so, and your needs are very simple, you can access the repository directly through a web browser. Just take the repository URL, plop it in the browser, and you'll see a very rudimentary web navigation interface (basically the built-in Apac...
null
CC BY-SA 2.5
null
2008-08-20T22:15:11.330
2008-08-20T22:15:11.330
null
null
9
null
18,972
2
null
18,955
0
null
not entirely sure about that one, you should be able to remove the line breaks when you render the content though, or even run a vbscript to clear it out, you just need to check for chr(13) or vbCrLf.
null
CC BY-SA 2.5
null
2008-08-20T22:18:12.150
2008-08-20T22:18:12.150
null
null
2,208
null
18,906
2
null
18,764
87
null
In a table without a clustered index (a heap table), data pages are not linked together - so traversing pages requires a [lookup into the Index Allocation Map](http://msdn.microsoft.com/en-us/library/ms188270.aspx). A clustered table, however, has it's [data pages linked in a doubly linked list](http://msdn.microsoft....
null
CC BY-SA 3.0
null
2008-08-20T21:32:33.960
2016-10-15T18:49:21.750
2016-10-15T18:49:21.750
442,351
2,199
null
18,975
2
null
18,959
1
null
Partitions have UUIDs associated with them. I don't know how to find these in Windows but in linux you can find the UUID for each partition with: > sudo vol_id -u device (e.g. /dev/sda1) If there is an equivilent function in Windows you could simply store the UUIDs for whatever partition they pick then iterate throug...
null
CC BY-SA 2.5
null
2008-08-20T22:20:05.093
2008-08-20T22:25:21.430
2008-08-20T22:25:21.430
1,666
1,666
null
18,938
2
null
3,088
2
null
If your brother has access to iTunes, he can download video lectures of an introductory computer science course given by Richard Buckland at the University of New South Wales. He's an engaging instructor and covers fundamentals of computing and the C language. If nothing else, tell your brother to play the vids in the ...
null
CC BY-SA 2.5
null
2008-08-20T21:54:17.840
2008-08-20T21:54:17.840
null
null
null
null
18,959
1
18,975
null
3
5,063
I'm writing an application that on some stage performs low-level disk operations in Linux environment. The app actually consists of 2 parts, one runs on Windows and interacts with a user and another is a linux part that runs from a LiveCD. User makes a choice of Windows drive letters and then a linux part performs acti...
How to match linux device path to windows drive name?
CC BY-SA 2.5
null
2008-08-20T22:06:11.120
2010-02-03T18:13:01.327
2008-09-11T14:13:59.713
-1
2,206
[ "c++", "linux", "drives" ]
18,974
2
null
18,952
2
null
If you have all the money in the world, go with Cognos. They provide a data cube that essentially makes the reporting "developer free" and the end user can create reports, dashboards, anything they like. For the "common man", I've grown quite fond of the ComponentOne reports for .NET library/tools. It has a similar fe...
null
CC BY-SA 2.5
null
2008-08-20T22:19:52.460
2008-08-20T22:19:52.460
null
null
71
null
18,977
2
null
18,952
29
null
For knocking out fairly "run of the mill" reports, SQL Reporting Services is really quite impressive. For complicated analysis, loading the data (maybe pre-aggregated) into an Excel Pivot table is usually adequate for most users. I've found you can spend a lot of time (and money) building a comprehensive "ad-hoc" rep...
null
CC BY-SA 2.5
null
2008-08-20T22:21:45.777
2008-08-22T05:45:28.277
2008-08-22T05:45:28.277
993
993
null
18,949
2
null
18,932
1,189
null
Assuming no nulls, you `GROUP BY` the unique columns, and `SELECT` the `MIN (or MAX)` RowId as the row to keep. Then, just delete everything that didn't have a row id: ``` DELETE FROM MyTable LEFT OUTER JOIN ( SELECT MIN(RowId) as RowId, Col1, Col2, Col3 FROM MyTable GROUP BY Col1, Col2, Col3 ) as KeepRows ...
null
CC BY-SA 3.0
null
2008-08-20T22:00:00.667
2017-06-12T11:06:07.450
2017-06-12T11:06:07.450
5,078,003
2,199
null
18,978
2
null
10,933
-1
null
Not web-based but if your team is using TortoiseSVN there's a great repository browser there. Just right click on your local checkout and select TortoiseSVN / Repo-Browser.
null
CC BY-SA 2.5
null
2008-08-20T22:21:50.613
2008-08-20T22:21:50.613
null
null
2,148
null
18,980
2
null
13,786
0
null
Vista's failure to gain mass acceptance is largely responsible for the reason we still have to support IE6. Most of the people still using IE6 are the ones who never upgrade their browser or update their OS. If most of them just moved to Vista, IE7 would automatically replace IE6
null
CC BY-SA 2.5
null
2008-08-20T22:24:29.343
2008-08-20T23:41:19.767
2008-08-20T23:41:19.767
1,897
1,897
null
18,981
2
null
18,538
1
null
I can't find anything built in... but using the ExpandoMetaClass I can do this: ``` ArrayList.metaClass.collectMap = {Closure callback-> def map = [:] delegate.each { def r = callback.call(it) map[r[0]] = r[1] } return map } ``` this adds the collectMap method to all ArrayLists... I'...
null
CC BY-SA 2.5
null
2008-08-20T22:25:12.197
2008-08-20T22:43:50.873
2008-08-20T22:43:50.873
2,031
2,031
null
18,985
1
27,343
null
131
97,740
I am writing a batch script in order to beautify JavaScript code. It needs to work on both and . How can I beautify JavaScript code using the command line tools?
How can I beautify JavaScript code using Command Line?
CC BY-SA 4.0
0
2008-08-20T22:29:22.203
2021-09-27T19:15:14.503
2018-08-16T04:25:44.910
4,099,593
486
[ "javascript", "command-line-interface", "pretty-print", "multiplatform" ]
18,986
2
null
18,717
46
null
A database schema without FK constraints is like driving without a seat belt. One day, you'll regret it. Not spending that little extra time on the design fundamentals and data integrity is a sure fire way of assuring headaches later. Would you accept code in your application that was that sloppy? That directly acces...
null
CC BY-SA 2.5
null
2008-08-20T22:29:43.060
2022-04-05T06:44:45.427
2022-04-05T06:44:45.427
3,404,097
993
null
18,990
2
null
18,984
7
null
Put the shared functionality in a library, then write a command-line and a GUI front-end for it. That way your layer transition isn't tied to the command-line. (Also, this way adds another security concern: shouldn't the GUI first have to make sure it's the RIGHT todo.exe that is being called?)
null
CC BY-SA 2.5
null
2008-08-20T22:31:17.097
2008-08-20T22:31:17.097
null
null
414
null
18,983
2
null
18,932
11
null
Oh sure. Use a temp table. If you want a single, not-very-performant statement that "works" you can go with: ``` DELETE FROM MyTable WHERE NOT RowID IN (SELECT (SELECT TOP 1 RowID FROM MyTable mt2 WHERE mt2.Col1 = mt.Col1 AND mt2.Col2 = mt.Col2 AND mt2.Col3 = mt.Col3) FROM ...
null
CC BY-SA 3.0
null
2008-08-20T22:27:53.843
2013-06-10T19:28:05.437
2013-06-10T19:28:05.437
null
1,336
null
18,992
2
null
18,943
0
null
Is public key authentication a valid alternative for you?
null
CC BY-SA 2.5
null
2008-08-20T22:31:32.493
2008-08-20T22:31:32.493
null
null
1,491
null
18,991
2
null
18,952
7
null
For most reports we use [BIRT](http://www.eclipse.org/birt/).
null
CC BY-SA 2.5
null
2008-08-20T22:31:23.430
2008-08-20T22:31:23.430
null
null
1,750
null
18,997
2
null
18,861
0
null
Sorry guys I should have been more specific. Whenever I added spaces the values were still being accepted. The dollar sign `$` did the trick!
null
CC BY-SA 3.0
null
2008-08-20T22:33:35.000
2016-02-08T13:24:53.013
2016-02-08T13:24:53.013
92,701
428,190
null
18,994
2
null
18,984
1
null
Kinda depends on your goal for the program, but yeah i do this from time to time - it's quicker to code, easier to debug, and easier to write quick and dirty test cases for. And so long as i structure my code properly, i can go back and tack on a GUI later without too much work. To those suggesting that this technique...
null
CC BY-SA 2.5
null
2008-08-20T22:32:02.290
2008-08-21T00:15:33.943
2008-08-21T00:15:33.943
811
811
null
18,993
2
null
15,053
0
null
Are you sure the issue is with the parameters and not maybe the variable in SPD? Certainly nothing looks wrong with your XML. I always hated the way SPD and workflows make you create a variable within the workflow and another within the page to assign to the same value as the workflow variable.
null
CC BY-SA 2.5
null
2008-08-20T22:31:58.950
2008-08-20T22:31:58.950
null
null
2,208
null
18,987
2
null
13,786
0
null
depends on your target audience.. I mean, some universities have firefox on them, right? only (i think) the third world countries have IE6 for default. (I know, I see them) I don't know about other countries, though. But I'm pretty sure still a large chunk of the population still use IE6 by default. If you think it's r...
null
CC BY-SA 2.5
null
2008-08-20T22:30:41.763
2008-08-20T22:30:41.763
null
null
null
null
18,995
2
null
18,984
5
null
Joel wrote an article contrasting this ("unix-style") development to the GUI first ("Windows-style") method a few years back. He called it [Biculturalism](http://www.joelonsoftware.com/articles/Biculturalism.html). I think on Windows it will become normal (if it hasn't already) to wrap your logic into .NET assemblies,...
null
CC BY-SA 2.5
null
2008-08-20T22:32:37.060
2008-08-20T22:32:37.060
null
null
615
null
18,999
2
null
18,984
2
null
If you plan to keep your command-line version of your app then I don't see a problem with doing it this way - it's not time wasted. You'll still end up coding the main functionality of your app for the command-line and so you'll have a large chunk of the work done. I don't see working this way as being a barrier to a ...
null
CC BY-SA 2.5
null
2008-08-20T22:37:18.533
2008-08-20T22:37:18.533
null
null
2,019
null
18,996
2
null
18,538
6
null
Also, if you're use google collections ([http://code.google.com/p/google-collections/](http://code.google.com/p/google-collections/)), you can do something like this: ``` map = Maps.uniqueIndex(list, Functions.identity()); ```
null
CC BY-SA 2.5
null
2008-08-20T22:32:57.030
2008-08-20T22:32:57.030
null
null
2,210
null
18,998
2
null
18,984
2
null
It's probably better to start with a command line first to make sure you have the functionality correct. If your main users can't (or won't) use the command line then you can add a GUI on top of your work. This will make your app better suited for scripting as well as limiting the amount of upfront [Bikeshedding](http...
null
CC BY-SA 2.5
null
2008-08-20T22:34:25.840
2008-08-20T22:34:25.840
null
null
680
null
19,007
2
null
18,952
1
null
For simple reports I use the standard ReportViewer included in Visual Studio. For more complicated reports and ones that require more performance I've used both Report Sharp Shooter and devExpress XtraReports. Surprisingly, in both products creating tables isn't as easy as it should but both are faster than ReportView...
null
CC BY-SA 2.5
null
2008-08-20T22:39:50.117
2008-08-20T22:39:50.117
null
null
2,148
null
19,001
2
null
18,984
2
null
@jcarrascal I don't see why this has to make the GUI "bad?" My thought would be that it would force you to think about what the "business" logic actually needs to accomplish, without worrying too much about things being pretty. Once you know what it should/can do, you can build your interface around that in whatever...
null
CC BY-SA 2.5
null
2008-08-20T22:37:52.540
2008-08-20T22:37:52.540
null
null
1,588
null
19,002
2
null
18,984
3
null
I think it depends on what type of application you are developing. Designing for the command line puts you on the fast track to what Alan Cooper refers to as "Implementation Model" in [The Inmates are Running the Asylum](http://books.google.com/books?id=04cFCVXC_AUC&dq=alan+cooper+implementation+model&pg=PP1&ots=jfukV6...
null
CC BY-SA 2.5
null
2008-08-20T22:37:57.923
2008-08-20T22:37:57.923
null
null
2,001
null
19,011
1
62,837
null
9
7,304
I am developing a J2ME application that has a large amount of data to store on the device (in the region of 1MB but variable). I can't rely on the file system so I'm stuck the Record Management System (RMS), which allows multiple record stores but each have a limited size. My initial target platform, Blackberry, limits...
Best practice for storing large amounts of data with J2ME
CC BY-SA 2.5
0
2008-08-20T22:42:04.200
2009-11-02T09:55:39.403
2008-09-18T20:21:16.263
270
270
[ "java", "java-me", "rms" ]
19,006
2
null
13,786
1
null
I'm a coder for a group that creates free templates for gaming clans. Our view is that we will drop IE6 support when IE8 is fully released. But at the end of the day, as many people have stated, it depends on your user audience. Our target audience is relatively wide (people download and use our templates in places whe...
null
CC BY-SA 2.5
null
2008-08-20T22:39:45.797
2008-08-20T22:39:45.797
null
null
2,025
null
19,014
1
20,468
null
6
7,084
I want to use Lucene (in particular, Lucene.NET) to search for email address domains. E.g. I want to search for "@gmail.com" to find all emails sent to a gmail address. Running a Lucene query for "*@gmail.com" results in an error, asterisks cannot be at the start of queries. Running a query for "@gmail.com" doesn't r...
Using Lucene to search for email addresses
CC BY-SA 2.5
0
2008-08-20T22:44:17.610
2008-09-19T07:37:46.947
2008-08-31T00:44:47.460
305
536
[ ".net", "search", "lucene" ]
19,027
2
null
18,984
2
null
I did exactly this on one tool I wrote, and it worked great. The end result is a scriptable tool that can also be used via a GUI. I do agree with the sentiment that you should ensure the GUI is easy and intuitive to use, so it might be wise to even develop both at the same time... a little command line feature follow...
null
CC BY-SA 2.5
null
2008-08-20T22:48:47.537
2008-08-20T22:48:47.537
null
null
122
null
18,984
1
19,179
null
21
1,543
What are your opinions on developing for the command line first, then adding a GUI on after the fact by simply calling the command line methods? eg. > W:\ todo AddTask "meeting with John, re: login peer review" "John's office" "2008-08-22" "14:00" loads `todo.exe` and calls a function called `AddTask` that does s...
What do you think of developing for the command line first?
CC BY-SA 3.0
0
2008-08-20T22:27:56.120
2017-01-14T08:14:56.400
2015-01-31T13:19:40.233
396,583
1,588
[ "language-agnostic", "command-line" ]
19,016
2
null
13,786
0
null
Support IE6 by not blocking it and letting it fend for itself for the most part. Only work around IE6 bugs that break major functionality. As for JS bugs and horrible DOM support, you still have that in IE7 and IE8. In that case, you might as well use a JS toolkit and get IE6 support for almost free. Bugs are bugs an...
null
CC BY-SA 2.5
null
2008-08-20T22:45:03.427
2008-08-20T22:45:03.427
null
null
1,697
null
19,025
2
null
18,783
2
null
I've made it a habit to always use bind variables. It's possible bind variables won't help if the RDBMS doesn't cache SQL statements. But if you don't use bind variables the RDBMS doesn't have a chance to reuse query execution plans and parsed SQL statements. The savings can be enormous: [http://www.akadia.com/servi...
null
CC BY-SA 2.5
null
2008-08-20T22:47:59.817
2008-08-20T22:47:59.817
null
null
1,438
null
19,029
2
null
18,719
0
null
There may be a problem if you are running these tasks as Administrator and others are logging in via Remote Desktop as Administrator. The task should be run from its own account.
null
CC BY-SA 2.5
null
2008-08-20T22:50:13.307
2008-08-20T22:50:13.307
null
null
2,209
null
19,033
2
null
18,959
2
null
> Partitions have UUIDs associated with them My knowledge of this is very shallow, but I thought that was only true for disks formatted with GPT (Guid Partition Table) partitions, rather than the old-style MBR format which 99% of the world is still stuck with?
null
CC BY-SA 2.5
null
2008-08-20T22:53:12.067
2008-08-20T22:53:12.067
null
null
234
null
19,034
2
null
18,932
7
null
> From the application level (unfortunately). I agree that the proper way to prevent duplication is at the database level through the use of a unique index, but in SQL Server 2005, an index is allowed to be only 900 bytes, and my varchar(2048) field blows that away. I dunno how well it would perform, but I think you c...
null
CC BY-SA 3.0
null
2008-08-20T22:53:12.630
2014-07-28T13:06:13.267
2014-07-28T13:06:13.267
1,709,629
2,131
null
19,026
2
null
18,861
0
null
A simpler way to write it still would be ``` var name_regex = /^([a-z0-9_])+$/i; ```
null
CC BY-SA 2.5
null
2008-08-20T22:48:12.407
2008-08-20T22:48:12.407
null
null
1,852
null
19,021
2
null
17,928
3
null
Isn't an OCX an ActiveX User Control? (something that you put onto a form for the user to interact with)? The easiest way I know of to test COM/ActiveX stuff is to use excel. (Yes I know it sounds dumb, bear with me) 1. Run Excel, create a new file if it hasn't done this for you 2. Press Alt+F11 to launch the Visual...
null
CC BY-SA 2.5
null
2008-08-20T22:46:19.743
2008-08-20T22:46:19.743
null
null
234
null
19,031
2
null
18,984
0
null
--Massive edit-- After spending some time on my current project, I feel as though I have come full circle from my previous answer. I think it is better to do the command line first and then wrap a gui on it. If you need to, I think you can make a great gui afterwards. By doing the command line first, you get all of...
null
CC BY-SA 2.5
null
2008-08-20T22:51:02.710
2009-01-15T01:53:32.507
2009-01-15T01:53:32.507
1,632
1,632
null
19,046
2
null
18,984
0
null
@Maudite The command-line app will check params up front and the GUI won't - but they'll still be checking the params and inputting them into some generic worker functions. Still the same goal. I don't see the command-line version affecting the quality of the GUI one.
null
CC BY-SA 2.5
null
2008-08-20T23:02:07.333
2008-08-20T23:02:07.333
null
null
2,019
null
19,048
2
null
18,984
5
null
My technique for programming backend functionality first without having the need for an explicit UI (especially when the UI isn't my job yet, e.g., I'm desigining a web application that is still in the design phase) is to write unit tests. That way I don't even need to write a console application to mock the output o...
null
CC BY-SA 2.5
null
2008-08-20T23:02:23.980
2008-08-20T23:02:23.980
null
null
372
null
19,044
2
null
13,786
0
null
I am certainly opposed to excluding browsers from a public facing site. There is nothing more irritating than going to a website and discovering they ONLY support IE because some dev somewhere couldn't make things "work". As many of the other authors above have noted there is a considerable number of users out there w...
null
CC BY-SA 2.5
null
2008-08-20T23:01:10.253
2008-08-20T23:01:10.253
null
null
2,213
null
19,051
2
null
12,397
4
null
Unfortunately that is not officially supported. See the following [MSDN article](http://msdn.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider.aspx). > If a Web site is precompiled for deployment, content provided by a VirtualPathProvider instance is not compiled, and no VirtualPathProvider instances ...
null
CC BY-SA 2.5
null
2008-08-20T23:03:37.457
2008-08-20T23:03:37.457
null
null
598
null
19,042
2
null
18,803
10
null
I co-taught a senior-level development project course my last two semesters in school. The project was intended to be used in a production environment with local non-profits as paying clients. We had to be certain that code did what we expected it to and that the students were capturing all the data necessary to meet ...
null
CC BY-SA 2.5
null
2008-08-20T22:57:44.007
2008-08-20T22:57:44.007
null
null
512
null
19,037
2
null
15,470
8
null
If you're running on IIS 7, you can simply delete the Default.aspx file that comes with ASP.NET MVC (assuming you're running on Preview 3 or higher). That file was needed due to an issue with Cassini that was fixed in .NET 3.5 SP1. For more details check out: [http://haacked.com/archive/2008/04/10/upcoming-changes-in-...
null
CC BY-SA 2.5
null
2008-08-20T22:55:03.123
2008-08-20T22:55:03.123
null
null
598
null
19,047
1
19,053
null
8
5,275
After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no longer available. When attempting to run it manually, I get this error: ``` The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail ``` Th...
TortoiseSVN side-by-side configuration is incorrect
CC BY-SA 2.5
0
2008-08-20T23:02:18.083
2009-11-02T22:40:17.787
null
null
234
[ "tortoisesvn", "winsxs" ]
19,053
2
null
19,047
9
null
I remembered I'd seen this thing before just after posting to SO It seems that later versions of TortoiseSVN are built with Visual Studio 2008 SP1 (hence the 9.0.30411.0 build number) Installing the [VC2008 SP1 Redistributable](http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5...
null
CC BY-SA 2.5
null
2008-08-20T23:03:53.960
2008-08-20T23:03:53.960
null
null
234
null
19,052
2
null
18,803
2
null
I found UML not really useful for very small projects, but really suitable for larger ones. Essentially, it does not really matter what you use, you just have to keep two things in mind: - - So UML is just that: A standard on how you plan your projects. If you hire new people, there are more likely to know any exis...
null
CC BY-SA 2.5
null
2008-08-20T23:03:43.507
2008-08-20T23:03:43.507
null
null
91
null
19,035
1
19,348
null
30
38,706
I am working with both [amq.js](http://activemq.apache.org/ajax.html) (ActiveMQ) and [Google Maps](http://code.google.com/apis/maps/documentation/reference.html). I load my scripts in this order ``` <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <title>AMQ & Maps Demo</title> ...
JavaScript Load Order
CC BY-SA 3.0
0
2008-08-20T22:53:25.373
2018-03-06T07:23:08.737
2018-03-06T07:23:08.737
1,905,949
1,992
[ "javascript", "google-maps", "activemq" ]
19,030
1
21,302
null
4
677
I have a bunch of files (TV episodes, although that is fairly arbitrary) that I want to check match a specific naming/organisation scheme.. Currently: I have three arrays of regex, one for valid filenames, one for files missing an episode name, and one for valid paths. Then, I loop though each valid-filename regex, i...
How to check set of files conform to a naming scheme
CC BY-SA 2.5
null
2008-08-20T22:50:55.643
2012-08-11T15:56:22.453
null
null
745
[ "python", "validation", "naming" ]
19,058
1
19,061
null
28
81,690
Example: ``` select ename from emp where hiredate = todate('01/05/81','dd/mm/yy') ``` and ``` select ename from emp where hiredate = todate('01/05/81','dd/mm/rr') ``` return different results
What is the difference between oracle's 'yy' and 'rr' date mask?
CC BY-SA 2.5
0
2008-08-20T23:07:51.250
2018-04-05T16:30:48.190
null
null
1,782
[ "sql", "oracle" ]
19,063
2
null
18,955
3
null
The way I did it before (and the last time I worked in Access was around '97 so my memory is not so hot) was raising a key-up event and executing a VBA function. It's a similar method to what you do with an AJAX suggest text box in a modern webform application, but as I recall it could get tripped up if your Access for...
null
CC BY-SA 2.5
null
2008-08-20T23:12:37.590
2008-08-20T23:12:37.590
null
null
2,213
null
19,059
2
null
18,984
1
null
I usually start with a class library and a separate, really crappy and basic GUI. As the Command Line involves parsing the Command Line, I feel like i'm adding a lot of unneccessary overhead. As a Bonus, this gives an MVC-like approach, as all the "real" code is in a Class Library. Of course, at a later stage, Refacto...
null
CC BY-SA 2.5
null
2008-08-20T23:08:42.827
2008-08-20T23:08:42.827
null
null
91
null
19,067
2
null
19,035
3
null
> Yes. Put the code you want loaded last (your `application.js` stuff) into prototype's [document.observe](http://www.prototypejs.org/api/document/observe). This should ensure that the code will load only after prototype + other stuff is finished and ready. (If you are familiar with jQuery, this function is similar ...
null
CC BY-SA 3.0
null
2008-08-20T23:15:32.230
2018-01-05T12:51:47.563
2018-01-05T12:51:47.563
92,701
1,477
null
19,061
2
null
19,058
47
null
[http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/difference-between-yyyy-and-rrrr-format-519525](http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/difference-between-yyyy-and-rrrr-format-519525) > YY allows you to retrieve just two digits of a year, for example, the 99 in 1999...
null
CC BY-SA 2.5
null
2008-08-20T23:11:32.710
2008-08-20T23:11:32.710
null
null
91
null
19,062
2
null
19,058
5
null
y2k compatibility. rr assumes 01 to be 2001, yy assumes 01 to be 1901 see: [http://www.oradev.com/oracle_date_format.jsp](http://www.oradev.com/oracle_date_format.jsp) edit: damn! [michael "quickfingers" stum](https://stackoverflow.com/users/91/michael-stum) [beat me to it](https://stackoverflow.com/questions/19058/w...
null
CC BY-SA 2.5
null
2008-08-20T23:12:36.763
2008-08-20T23:12:36.763
2017-05-23T12:34:30.577
-1
547
null
19,069
2
null
19,035
9
null
in jquery you can use: ``` $(document).ready(function(){/*do stuff here*/}); ``` which makes sure the javascript is loaded and the dom is ready before doing your stuff. in prototype it looks like this might work ``` document.observe("dom:loaded", function() {/*do stuff here*/}); ``` If I understand your problem...
null
CC BY-SA 2.5
null
2008-08-20T23:17:30.353
2008-08-20T23:17:30.353
null
null
2,031
null
19,071
2
null
18,705
1
null
Developing against Project Server 2003 isn't the friendliest experience around, but I have worked a little bit with the PDS (Project Data Services) which is SOAP based [](http://msdn.microsoft.com/en-us/library/aa204408(office.11).aspx)[http://msdn.microsoft.com/en-us/library/aa204408(office.11).aspx](http://msdn.micr...
null
CC BY-SA 2.5
null
2008-08-20T23:18:43.237
2008-08-20T23:25:37.200
2008-08-20T23:25:37.200
null
null
null
19,056
2
null
18,585
12
null
I finally came up with a Form subclass that solves this, once and for all. To use it: 1. Inherit from RestorableForm instead of Form. 2. Add a binding in (ApplicationSettings) -> (PropertyBinding) to WindowRestoreState. 3. Call Properties.Settings.Default.Save() when the window is about to close. Now window positi...
null
CC BY-SA 2.5
null
2008-08-20T23:06:42.563
2008-08-20T23:33:51.393
2008-08-20T23:33:51.393
229
229
null
19,087
2
null
13,786
1
null
> Is it time to do away with IE6 programming? Yes.
null
CC BY-SA 2.5
null
2008-08-20T23:42:54.070
2008-08-20T23:42:54.070
null
null
1,477
null
19,077
2
null
18,538
5
null
ok... I've played with this a little more and I think this is a pretty cool method... ``` def collectMap = {Closure callback-> def map = [:] delegate.each { def r = callback.call(it) map[r[0]] = r[1] } return map } ExpandoMetaClass.enableGlobally() Collection.metaClass.collectMap = coll...
null
CC BY-SA 2.5
null
2008-08-20T23:28:29.767
2008-08-21T18:21:18.513
2008-08-21T18:21:18.513
2,031
2,031
null
19,081
2
null
17,786
0
null
Either wait for a compiler fix or dont `#include` code that triggers it. [A verbose way of saying you probably can't.]
null
CC BY-SA 2.5
null
2008-08-20T23:34:11.983
2011-01-06T13:03:26.920
2011-01-06T13:03:26.920
1,042
1,799
null
19,079
2
null
18,783
5
null
@Terrapin there are a few other differences between isnull and coalesce that are worth mentioning (besides ANSI compliance, which is a big one for me). [Coalesce vs. IsNull](http://wiki.lessthandot.com/index.php/Three_differences_between_COALESCE_and_ISNULL)
null
CC BY-SA 2.5
null
2008-08-20T23:33:41.487
2008-08-20T23:33:41.487
null
null
794
null
19,080
2
null
18,077
4
null
Why not use `-moz-border-radius` and `-webkit-border-radius` in the stylesheet? It's valid CSS and throwing an otherwise unused attribute would hurt less than having javascript do the legwork of figuring out if it should apply it or not. Then, in the javascript you'd just check if the browser is IE (or Opera?) - if i...
null
CC BY-SA 3.0
null
2008-08-20T23:34:07.257
2016-02-08T13:19:21.167
2016-02-08T13:19:21.167
92,701
2,007
null
19,090
2
null
18,984
1
null
If you do your development right, then it should be relatively easy to switch to a GUI later on in the project. The problem is that it's kinda difficult to get it right.
null
CC BY-SA 2.5
null
2008-08-20T23:47:25.713
2008-08-20T23:47:25.713
null
null
null
null
19,094
2
null
18,984
1
null
John Gruber had a good post about the concept of adding a GUI to a program not designed for one: [Ronco Spray-On Usability](http://daringfireball.net/2004/04/spray_on_usability) Summary: It doesn't work. If usability isn't designed into an application from the beginning, adding it later is more work than anyone is wi...
null
CC BY-SA 2.5
null
2008-08-20T23:52:25.670
2008-12-20T02:14:30.080
2008-12-20T02:14:30.097
1,175
1,175
null
19,099
2
null
19,089
3
null
Actually, I think you're making it much harder than it is. Won't this code work for what you're trying to do? ``` SELECT StaffName, SUM(InStage1) AS 'JobsAtStage1', SUM(InStage2) AS 'JobsAtStage2' FROM ViewJob GROUP BY StaffName ```
null
CC BY-SA 2.5
null
2008-08-20T23:58:32.377
2008-08-20T23:58:32.377
null
null
1,954
null
19,097
2
null
19,089
1
null
To get a real "upsert" type of query you need to use an if exists... type of thing, and this unfortunately means using a cursor. However, you could run two queries, one to do your updates where there is an existing row, then afterwards insert the new one. I'd think this set-based approach would be preferable unless y...
null
CC BY-SA 2.5
null
2008-08-20T23:55:04.710
2008-08-20T23:55:04.710
null
null
794
null
19,093
2
null
18,952
2
null
I don't really have much SSAS work to do but I've been quite taken with this: [Cube Browser for ASP.net](http://www.sqlserveranalysisservices.com/cellsetgrid/CellSetGridIntro.htm) It offers many of the capabilities of an excel pivot table in a web app, (thought I'm not enough of an expert on Excel to really know the ...
null
CC BY-SA 2.5
null
2008-08-20T23:49:37.063
2008-08-20T23:49:37.063
null
null
794
null
19,096
1
null
null
4
5,435
I have a project that utilizes the javax.mail.internet.MimeMessage and other related classes that does mime parsing for emails that we receive. This needs to be ported to .NET. What .Net 3rd party or built in library can I use to replace the Java classes that I'm using? EDIT: Anything change in the last 9 months sinc...
What .NET Mime Parsing libraries are available?
CC BY-SA 2.5
0
2008-08-20T23:54:10.640
2015-11-05T11:20:36.720
2014-03-12T17:15:44.583
2,312,605
1,463
[ ".net", "mime" ]
19,098
2
null
19,089
2
null
You could just check for existence and use the appropriate command. I believe this really does use a cursor behind the scenes, but it's the best you'll likely get: ``` IF (EXISTS (SELECT * FROM MyTable WHERE StaffName = @StaffName)) begin UPDATE MyTable SET ... WHERE StaffName = @StaffName end else begin INS...
null
CC BY-SA 2.5
null
2008-08-20T23:57:20.320
2008-08-20T23:57:20.320
null
null
1,627
null
19,088
2
null
622
4
null
[Sieve of Eratosthenes](http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes) is the way to go, because of it's simplicity and speed. My implementation in C ``` #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> int main(void) { unsigned int lim, i, j; printf("Find primes upto: "); ...
null
CC BY-SA 3.0
null
2008-08-20T23:45:54.110
2013-08-20T20:29:07.733
2013-08-20T20:29:07.733
1,813,971
1,897
null
19,089
1
19,109
null
3
3,660
I have a view that has a list of jobs in it, with data like who they're assigned to and the stage they are in. I need to write a stored procedure that returns how many jobs each person has at each stage. So far I have this (simplified): ``` DECLARE @ResultTable table ( StaffName nvarchar(100), Stage1Count int, ...
How do I do an Upsert Into Table?
CC BY-SA 2.5
0
2008-08-20T23:46:13.360
2017-04-09T14:20:12.127
2008-08-31T01:31:06.693
305
233
[ "sql", "sql-server", "tsql" ]
19,101
2
null
18,984
0
null
Do a program that you expose as a web-service. then do the gui and command line to call the same web service. This approach also allows you to make a web-gui, and also to provide the functionality as SaaS to extranet partners, and/or to better secure the business logic. This also allows your program to more easily par...
null
CC BY-SA 2.5
null
2008-08-20T23:59:25.183
2008-08-20T23:59:25.183
null
null
479
null
19,108
2
null
13,545
0
null
What do you need to remove? It keeps on adding that folder back to the project that I'm working on...
null
CC BY-SA 2.5
null
2008-08-21T00:05:59.053
2008-08-21T00:05:59.053
null
null
1,463
null
19,103
2
null
19,096
7
null
I've not used javax.mail.internet.MimeMessage, so I can't say how any of this compares, but .NET 2.0 and beyond does have a [System.Net.Mime](http://msdn.microsoft.com/en-us/library/system.net.mime.aspx) namespace which might have something useful for you. Otherwise, I used [Chilkat MIME .NET](http://www.chilkatsof...
null
CC BY-SA 2.5
null
2008-08-21T00:00:43.900
2008-08-21T00:00:43.900
null
null
1,627
null
19,109
2
null
19,089
1
null
IIRC there is some sort of "On Duplicate" (name might be wrong) syntax that lets you update if a row exists (MySQL) Alternately some form of: ``` INSERT INTO @ResultTable (StaffName, Stage1Count, Stage2Count) SELECT StaffName,0,0 FROM ViewJob GROUP BY StaffName UPDATE @ResultTable Stage1Count= ( SELECT COUNT(*...
null
CC BY-SA 2.5
null
2008-08-21T00:09:16.580
2008-08-21T00:09:16.580
null
null
1,343
null
19,106
2
null
18,952
2
null
I would have to agree, I really like SQL Server Reporting Services. It just does stuff, and does it easily.
null
CC BY-SA 2.5
null
2008-08-21T00:03:44.533
2008-08-21T00:03:44.533
null
null
1,580
null
19,110
2
null
18,803
37
null
Using UML is like looking at your feet as you walk. It's making conscious and explicit something that you can usually do unconsciously. Beginners need to think carefully about what they're doing, but a professional programmer already knows what they're doing. Most of the time, writing the code itself is quicker and mor...
null
CC BY-SA 2.5
null
2008-08-21T00:09:42.680
2008-08-21T00:09:42.680
null
null
1,000
null
19,105
2
null
19,089
0
null
The following query on your result table should combine the rows again. This is assuming that InStage1 and InStage2 are never both '1'. ``` select distinct(rt1.StaffName), rt2.Stage1Count, rt3.Stage2Count from @ResultTable rt1 left join @ResultTable rt2 on rt1.StaffName=rt2.StaffName and rt2.Stage1Count is not null le...
null
CC BY-SA 2.5
null
2008-08-21T00:03:12.850
2008-08-21T00:03:12.850
null
null
369
null
19,116
2
null
19,113
0
null
Joel has a post on that [http://www.joelonsoftware.com/items/2008/07/01.html](http://www.joelonsoftware.com/items/2008/07/01.html) which might be a good place to start thinking about this.
null
CC BY-SA 2.5
null
2008-08-21T00:17:43.160
2008-08-21T00:17:43.160
null
null
1,627
null
19,113
1
19,128
null
4
269
One of the things that has been talked about a few times on the podcast is whether menu items should always be enabled to prevent "WHY ISN'T THIS AVAILABLE!" frustration for the end user. This strikes me as a good idea, but then there's the issue of communicating the lack of availability (and the reason why) to the us...
Should menu items always be enabled? And how do you tell the user?
CC BY-SA 3.0
null
2008-08-21T00:14:56.660
2016-02-26T19:21:33.277
2016-02-26T19:21:33.277
3,193,464
1,043
[ "user-interface", "usability", "menu-items" ]
19,136
2
null
18,984
1
null
A better approach might be to develop the logic as a lib with a well defined API and, at the dev stage, no interface (or a hard coded interface) then you can wright the CLI or GUI later
null
CC BY-SA 2.5
null
2008-08-21T00:30:10.663
2008-08-21T00:30:10.663
null
null
1,343
null
19,134
2
null
19,122
0
null
cat will just print the data to standard out, which happens to be redirected to the standard in of tail. This can be seen in the man page of bash. In other words, there is no pausing going on, tail is just reading from standard in and cat is just writing to standard out.
null
CC BY-SA 2.5
null
2008-08-21T00:29:00.153
2008-08-21T00:29:00.153
null
null
122
null
19,132
1
19,224
null
470
78,184
I'm asking with regards to c#, but I assume its the same in most other languages. Does anyone have a good definition of and and what the differences are?
Expression Versus Statement
CC BY-SA 3.0
0
2008-08-21T00:28:00.263
2020-08-20T10:58:50.573
2020-02-13T16:14:45.130
12,299,000
null
[ "language-agnostic", "expression", "language-features" ]
19,130
2
null
19,113
2
null
You have to consider the alternatives. 1. Hide the menu item. This is bad. Now you have menu items disappearing and reappearing all the time? 2. Disable the menu item. Now the user can find what they're looking for, it just isn't obvious how to enable it. This is better, but still leaves the user slightly puzzled. 3....
null
CC BY-SA 2.5
null
2008-08-21T00:26:32.437
2008-08-21T00:26:32.437
null
null
1,288
null