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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
23,009 | 2 | null | 23,001 | 2 | null | That stuff is all built in, it is called a maintenance plan
| null | CC BY-SA 2.5 | null | 2008-08-22T17:43:42.247 | 2008-08-22T17:43:42.247 | null | null | 740 | null |
22,988 | 1 | 23,007 | null | 6 | 6,462 | I have several "ASP:TextBox" controls on a form (about 20).
When the form loads, the text boxes are populated from a database.
The user can change the populated values, and when they submit the form, I take the values posted to the server and conditionally save them (determined by some business logic).
All but 1 of the... | Form post doesn't contain textbox data [ASP.NET C#] | CC BY-SA 3.0 | 0 | 2008-08-22T17:40:23.893 | 2014-05-04T21:56:26.090 | 2014-05-04T21:56:26.090 | 1,537,726 | 418 | [
"c#",
"asp.net"
] |
22,923 | 2 | null | 22,907 | 3 | null | There are persuasive arguments for both - stored procedures are all located in a central repository, but are (potentially) hard to migrate and ad hoc queries are easier to debug as they are with your code, but they can also be harder to find in the code.
The argument that stored procedures are more efficient doesn't h... | null | CC BY-SA 2.5 | null | 2008-08-22T17:15:43.767 | 2008-08-22T17:15:43.767 | null | null | 1,075 | null |
23,011 | 2 | null | 22,979 | 2 | null | If you need specific servers, use WMI. If you just want all available servers:
[http://support.microsoft.com/kb/q287737/](http://support.microsoft.com/kb/q287737/)
| null | CC BY-SA 2.5 | null | 2008-08-22T17:44:12.153 | 2008-08-22T17:44:12.153 | null | null | 414 | null |
23,008 | 2 | null | 22,907 | 9 | null | Stored procedures are definitely the way to go...they are compiled, have execution plan before hand and you could do rights management on them.
I do not understand this whole source control issue on stored procedure. You definitely can source control them, if only you are a little disciplined.
Always start with a .... | null | CC BY-SA 2.5 | null | 2008-08-22T17:43:41.967 | 2008-08-22T17:43:41.967 | null | null | 2,528 | null |
23,010 | 2 | null | 22,979 | 2 | null | Use the [TCPClient Class](http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.aspx) to create a generic function that connects in TCP to a given IP address.
Then iterate over the list of servers you want to test and try to open a connection to port 1433.
| null | CC BY-SA 2.5 | null | 2008-08-22T17:43:47.677 | 2008-08-22T17:43:47.677 | null | null | 1,508 | null |
23,016 | 1 | 23,220 | null | 5 | 805 | What are the most common things to test in a new site?
For instance to prevent exploits by bots, malicious users, massive load, etc.?
And just as importantly, what tools and approaches should you use?
(some stress test tools are really expensive/had to use, do you write your own? etc)
[Common exploits that should b... | Checklist for testing a new site | CC BY-SA 2.5 | 0 | 2008-08-22T17:47:27.933 | 2008-09-16T21:38:24.813 | 2017-05-23T10:32:51.507 | -1 | 580 | [
"testing"
] |
23,019 | 2 | null | 22,979 | 0 | null | I would certainly go with Vincent's answer. Just make absolutely certain you are closing and disposing the tcp connections properly etc. WMI seems a bit of overkill to me if that is all you're after.
| null | CC BY-SA 2.5 | null | 2008-08-22T17:48:22.067 | 2008-08-22T17:48:22.067 | null | null | 1,120 | null |
23,024 | 2 | null | 22,801 | 1 | null | @brendan:
The article you cited is seriously outdated and the information is just plain wrong. Especially the last point (use `for` instead of `foreach`) is misleading and the justification offered in the article no longer applies to modern versions of .NET.
While it's true that the `IEnumerator` uses virtual calls, ... | null | CC BY-SA 2.5 | null | 2008-08-22T17:52:33.770 | 2008-08-22T17:52:33.770 | null | null | 1,968 | null |
23,006 | 2 | null | 22,687 | 2 | null | Thanks to jsight (and Mark Biek for pointing out the connection between plink and putty) I decided to investigate more fully.
It turned out that plink had been using the "Default Settings" stored Session that I set up for putty and wasn't allowing them to be overridden.
edit:
> The Geek: Also, this is a good example... | null | CC BY-SA 2.5 | null | 2008-08-22T17:43:32.623 | 2008-08-23T22:32:31.047 | 2008-08-23T22:32:31.047 | 2,118 | 2,118 | null |
23,017 | 2 | null | 1,496 | 1 | null | I get all my unixish/GNU support using [Fink](http://www.finkproject.org/) (which provides Debian-like package control) with the emacs22-carbon package which means I also get a clickable application. It does everything I expect it to do, and automagically starts using emacs extensions loaded with fink.
Good times.
| null | CC BY-SA 2.5 | null | 2008-08-22T17:47:50.570 | 2008-08-22T17:47:50.570 | null | null | 2,509 | null |
23,031 | 1 | 23,040 | null | 4 | 756 | As a novice developer who is getting into the rhythm of my first professional project, I'm trying to develop good habits as soon as possible. However, I've found that I often forget to test, put it off, or do a whole bunch of tests at the end of a build instead of one at a time.
My question is what rhythm do you like ... | When/how frequently should I test? | CC BY-SA 3.0 | 0 | 2008-08-22T17:54:10.787 | 2018-04-06T23:33:08.267 | 2018-04-06T23:33:08.267 | 6,332,918 | 2,293 | [
"testing"
] |
23,034 | 2 | null | 23,031 | 2 | null | Before you check the code in.
| null | CC BY-SA 2.5 | null | 2008-08-22T17:56:17.913 | 2008-08-22T17:56:17.913 | null | null | 1,104 | null |
23,003 | 2 | null | 22,981 | 0 | null | This was answered [here](https://stackoverflow.com/questions/2840/paging-sql-server-2005-results).
| null | CC BY-SA 2.5 | null | 2008-08-22T17:42:28.553 | 2008-08-22T17:42:28.553 | 2017-05-23T12:13:33.373 | -1 | 1,219 | null |
23,022 | 2 | null | 19,956 | 2 | null | Umm no you don't; you can accept information cards on a web site using a cheap and cheerful certificate (but not self signed) or no certificate at all.
And yes, I've used it as part of a production system which grew out of a proof of concept I did at Microsoft.
Cons: If you don't have an EV SSL certificate you get wa... | null | CC BY-SA 2.5 | null | 2008-08-22T17:51:57.890 | 2008-08-22T17:51:57.890 | null | null | 2,525 | null |
23,037 | 2 | null | 23,031 | 0 | null | When hacking something together for myself, I test at the end. Bad practice, but these are usually small things that I'll use a few times and that's it.
On a larger project, I write tests before I write a class and I run the tests after every change to that class.
| null | CC BY-SA 2.5 | null | 2008-08-22T17:56:38.940 | 2008-08-22T17:56:38.940 | null | null | 572 | null |
23,032 | 2 | null | 22,988 | 2 | null | I would second [Jonathan's response](https://stackoverflow.com/questions/22988/form-post-doesnt-contain-textbox-data-aspnet-c#23012) I would check your databinding settings.
If you do not need ViewState for the textboxes (i.e. no postback occurs until form submit) then you should disable it.
It sounds like you are no... | null | CC BY-SA 2.5 | null | 2008-08-22T17:55:15.183 | 2008-08-22T17:55:15.183 | 2017-05-23T12:33:26.220 | -1 | 832 | null |
23,012 | 2 | null | 22,988 | 1 | null | Remember the order of the page lifecycle, and where you are databinding your form.
- - - -
If you are reading the value in the Control Event handler, yet databinding in Init or Load, you'll have the old value.
The trick is to always databind in the correct event, or check for postback and don't databind then.
| null | CC BY-SA 2.5 | null | 2008-08-22T17:45:25.863 | 2008-08-22T17:45:25.863 | null | null | 1,965 | null |
23,039 | 2 | null | 22,907 | 3 | null | Store procedures should be used as much as possible, if your writing SQL into code your already setting yourself up for headaches in the futures. It takes about the same time to write a SPROC as it does to write it in code.
Consider a query that runs great under a medium load but once it goes into fulltime production ... | null | CC BY-SA 2.5 | null | 2008-08-22T17:57:25.210 | 2008-08-22T18:04:47.237 | 2008-08-22T18:04:47.237 | 1,603 | 1,603 | null |
23,041 | 2 | null | 22,059 | 0 | null | Open Calais probably use language parsing technology and language statics to guess which words or phrases are Names, Places, Companies, etc. Then, it is just another step to do some kind of search for those entities and return meta data.
Zementa probably does something similar, but matches the phrases against meta-dat... | null | CC BY-SA 2.5 | null | 2008-08-22T17:58:23.867 | 2008-08-22T17:58:23.867 | null | null | 106 | null |
23,038 | 2 | null | 22,943 | 4 | null | The [Beagle search engine](http://beagle-project.org) had code to parse Mork files. It's not the most memory efficient solution, but it worked and could be a useful starting point. Here's a link to the file:
[http://svn.gnome.org/viewvc/beagle/tags/BEAGLE_0_2_18/Util/Mork.cs?view=markup](http://svn.gnome.org/viewvc/... | null | CC BY-SA 2.5 | null | 2008-08-22T17:57:14.510 | 2008-08-22T17:57:14.510 | null | null | 156 | null |
23,051 | 2 | null | 23,031 | 0 | null | I test constantly. After I finish even a loop inside of a function, I run the program and hit a breakpoint at the top of the loop, then run through it. This is all just to make sure that the process is doing exactly what I want it to.
Then, once a function is finished, you test it in it's entirety. You probably want t... | null | CC BY-SA 2.5 | null | 2008-08-22T18:03:18.223 | 2008-08-22T18:03:18.223 | null | null | 106 | null |
23,050 | 2 | null | 4,689 | 1 | null | @modesty:
> I wish there was a Mac version.
You can install the font on a Mac. I use it all the time, everywhere, without any problem. The only thing to pay attention for is to set `nomacatsui` when working with GVIM, or better yet, switch to [MacVim](http://code.google.com/p/macvim/).
| null | CC BY-SA 2.5 | null | 2008-08-22T18:03:10.673 | 2008-08-22T18:03:10.673 | null | null | 1,968 | null |
23,046 | 2 | null | 16,501 | 4 | null | I have trouble wrapping my head around lambda expressions because I work in Visual FoxPro, which has Macro substitution and the ExecScript{} and Evaluate() functions, which seem to serve much the same purpose.
```
? Calculator(10, 23, "a + b")
? Calculator(10, 23, "a - b");
FUNCTION Calculator(a, b, op)
RETURN Evalua... | null | CC BY-SA 2.5 | null | 2008-08-22T18:01:54.607 | 2008-08-22T18:01:54.607 | null | null | 2,531 | null |
23,052 | 2 | null | 23,031 | 0 | null | I've only recently added unit testing to my regular work flow but I write unit tests:
- - - -
I run the tests on most builds, and always before running the code.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:03:22.950 | 2008-08-22T18:03:22.950 | null | null | 2,509 | null |
23,040 | 2 | null | 23,031 | 6 | null | Well, if you want to follow the TDD guys, ;)
I am very much in the same position as you. I want to get more into testing, but I am currently in a position where we are working to "get the code out" rather than "get the code out right" which scares the crap out of me. So I am slowly trying to integrate testing processe... | null | CC BY-SA 2.5 | null | 2008-08-22T17:57:37.160 | 2008-08-22T18:09:25.837 | 2020-06-20T09:12:55.060 | -1 | 832 | null |
23,058 | 2 | null | 22,988 | 7 | null | this happens to me all the time.
```
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// populate text boxes from database
}
}
```
| null | CC BY-SA 2.5 | null | 2008-08-22T18:05:14.443 | 2008-08-22T18:05:14.443 | null | null | 1,950 | null |
23,055 | 2 | null | 23,016 | 1 | null | [YSlow](http://developer.yahoo.com/yslow/) can give you a quick analysis of different metrics.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:04:35.117 | 2008-08-22T18:04:35.117 | null | null | 106 | null |
23,060 | 2 | null | 23,027 | 3 | null | I set up a task to do this. I'm not aware of any way to make CruiseControl be that specific. I usually just chain a batch file to do the copy to the CC.net task.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:05:24.583 | 2008-08-22T18:05:24.583 | null | null | 1,975,282 | null |
23,027 | 1 | 23,060 | null | 9 | 4,955 | While setting up CruiseControl, I added a buildpublisher block to the publisher tasks:
```
<buildpublisher>
<sourceDir>C:\MyBuild\</sourceDir>
<publishDir>C:\MyBuildPublished\</publishDir>
<alwaysPublish>false</alwaysPublish>
</buildpublisher>
```
This works, but it copies the entire file contents of the build... | CruiseControl.Net Build Publisher - Only publish compiled files | CC BY-SA 2.5 | 0 | 2008-08-22T17:53:24.143 | 2011-08-11T15:49:41.330 | 2008-08-23T15:05:43.413 | 2,134 | 1,965 | [
".net",
"build-process",
"cruisecontrol.net"
] |
23,048 | 2 | null | 22,697 | 314 | null | I've had good success using [Mockito](https://github.com/mockito/mockito).
When I tried learning about JMock and EasyMock, I found the learning curve to be a bit steep (though maybe that's just me).
I like Mockito because of its simple and clean syntax that I was able to grasp pretty quickly. The minimal syntax is de... | null | CC BY-SA 3.0 | null | 2008-08-22T18:02:30.267 | 2015-02-13T02:33:44.123 | 2015-02-13T02:33:44.123 | 245,988 | 1,557 | null |
23,065 | 2 | null | 22,907 | 0 | null | My experience is that 90% of queries and/or stored procedures should not be written at all (at least by hand).
Data access should be generated somehow automaticly. You can decide if you'd like to staticly generate procedures in compile time or dynamically at run time but when you want add column to the table (property... | null | CC BY-SA 2.5 | null | 2008-08-22T18:09:22.250 | 2008-08-22T18:09:22.250 | null | null | 2,361 | null |
23,059 | 2 | null | 23,031 | 0 | null | Start with unit testing. Specifically, check out TDD, Test Driven Development. The concept behind TDD is you write the unit tests first, then write your code. If the test fails, you go back and re-work your code. If it passes, you move on to the next one.
I take a hybrid approach to TDD. I don't like to write tests ag... | null | CC BY-SA 2.5 | null | 2008-08-22T18:05:21.773 | 2008-08-22T18:05:21.773 | null | null | 1,683 | null |
23,033 | 2 | null | 23,016 | 1 | null | - [Google Webmaster Tools](http://www.google.com/webmasters/tools/)
| null | CC BY-SA 2.5 | null | 2008-08-22T17:55:35.277 | 2008-08-22T18:40:04.250 | 2008-08-22T18:40:04.250 | 2,134 | 2,134 | null |
23,056 | 2 | null | 20,782 | 3 | null | It sounds like in the console situation you are running with your current user credentials, which have access to the PSI. When running from the web, it's running with the creds of the IIS application instance. I think you'd either need to set up delegation to pass the session creds to the IIS application, or use some s... | null | CC BY-SA 2.5 | null | 2008-08-22T18:04:40.247 | 2008-08-22T18:04:40.247 | null | null | 1,346 | null |
23,070 | 2 | null | 1,383 | 1 | null | I went to a presentation on unit testing at FoxForward 2007 and was told never to unit test anything that works with data. After all, if you test on live data, the results are unpredictable, and if you don't test on live data, you're not actually testing the code you wrote. Unfortunately, that's most of the coding I do... | null | CC BY-SA 2.5 | null | 2008-08-22T18:10:23.680 | 2008-08-22T18:10:23.680 | null | null | 2,531 | null |
23,067 | 2 | null | 23,064 | 4 | null | I'm no XML expert, but I find Option B to be more human readable, and I think it's just as machine readable as Option A. I believe that XML is designed to be both human and machine readable, so I would go for Option B myself.
---
I just realized something else after Ryan Farley's post. If the Students or Classes s... | null | CC BY-SA 2.5 | null | 2008-08-22T18:09:36.507 | 2008-08-22T18:09:36.507 | null | null | 572 | null |
23,064 | 1 | 23,067 | null | 4 | 4,300 | I'm creating an application that will store a hierarchical collection of items in an XML file and I'm wondering about the industry standard for storing collections in XML. Which of the following two formats is preferred? (If there is another option I'm not seeing, please advise.)
```
<School>
<Student Name="Jack... | XML Collection Best Practices | CC BY-SA 2.5 | null | 2008-08-22T18:07:56.917 | 2013-01-23T06:36:19.007 | 2008-08-23T18:16:41.693 | 2,134 | 317 | [
"xml"
] |
23,073 | 2 | null | 22,907 | 2 | null | > someone said that recompile is a lazy excuse! yeah lets see how lazy you feel when you have to recompile and deploy your app to 1000's of desktops, all because the DBA has told you that your ad-hoc Query is eating up too much Server time!
is it good system architecture if you let connect 1000 desktops directly to da... | null | CC BY-SA 2.5 | null | 2008-08-22T18:12:42.023 | 2008-08-22T18:30:32.697 | 2008-08-22T18:30:32.697 | 2,361 | 2,361 | null |
22,873 | 1 | null | null | 249 | 115,753 | It wasn't that long ago that I was a beginning coder, trying to find good books/tutorials on languages I wanted to learn. Even still, there are times I need to pick up a language relatively quickly for a new project I am working on. The point of this post is to document some of the best tutorials and books for these ... | Language Books/Tutorials for popular languages | CC BY-SA 3.0 | 0 | 2008-08-22T16:59:56.597 | 2013-03-25T19:24:25.383 | 2013-03-25T19:22:48.130 | null | 2,328 | [
"programming-languages"
] |
23,079 | 2 | null | 23,064 | 2 | null | , absolutely. When there's a logical grouping of similar items, it should have a parent item. That way, my parser won't have to step through all 500 student records checking to see if there are class records mixed in.
| null | CC BY-SA 3.0 | null | 2008-08-22T18:15:17.197 | 2013-01-23T06:36:19.007 | 2013-01-23T06:36:19.007 | 1,410,342 | 1,902,010 | null |
23,078 | 1 | null | null | 3 | 451 | Debugging in visual studio seems to have been broken with sp1.
Single stepping randomly does not work and just starts to run. Sometimes breakpoints are ignored. It is unpredictable and unusable. It will generally hit the first break point but after that it is totally unpredictable.
Any idea what needs to be done to ... | How to solve the Single stepping problem with VS2008 SP1 | CC BY-SA 2.5 | null | 2008-08-22T18:14:45.417 | 2011-09-03T19:31:50.493 | 2008-11-14T04:11:06.743 | 2,660 | 2,539 | [
"c#",
"visual-studio-2008-sp1"
] |
23,074 | 2 | null | 23,001 | 0 | null | yeah everything you described (except maybe perf monitoring) can be done with database maintenance plans, back ups, shrinking log files etc.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:13:02.990 | 2008-08-22T18:13:02.990 | null | null | 2,272 | null |
23,080 | 2 | null | 23,064 | 2 | null | Another compelling reason to use option B is error checking. If the original file is modified outside an XML application, or if no XSD schema is applied, there could be the case where you have an uneven number of students and classes.
At least if you have the students and classes grouped together, you will easily be ... | null | CC BY-SA 2.5 | null | 2008-08-22T18:15:43.217 | 2008-08-22T18:15:43.217 | null | null | 2,470 | null |
23,082 | 1 | 23,676 | null | 11 | 8,928 | Did you ever have to choose between WISA or LAMP at the beginning of a web project?
While pros and cons are littered around the net, it would be helpful to know about your real experience in coming up w/ criteria, evaluating, deciding, and reflecting upon your decision to go w/ either platform.
| How Did You Decide Between WISA and LAMP? | CC BY-SA 2.5 | 0 | 2008-08-22T18:16:39.547 | 2015-04-27T10:09:19.803 | 2008-09-09T22:13:40.420 | -1 | null | [
"architecture",
"web-applications",
"lamp",
"platform",
"wisa"
] |
23,069 | 2 | null | 23,001 | 2 | null | If you are using SQL Server 2005. Fire up the Management Studio and look at the Maintenance Plan section.
See [http://msdn.microsoft.com/en-us/library/ms187658.aspx](http://msdn.microsoft.com/en-us/library/ms189036.aspx) for an overview and [http://msdn.microsoft.com/en-us/library/ms189036.aspx](http://msdn.microsoft... | null | CC BY-SA 2.5 | null | 2008-08-22T18:10:12.123 | 2008-08-22T18:10:12.123 | null | null | 2,519 | null |
23,083 | 1 | 23,101 | null | 31 | 20,778 | In the Windows applications I work on, we have a custom framework that sits directly above Win32 (don't ask). When we create a window, our normal practice is to put `this` in the window's user data area via `SetWindowLong(hwnd, GWL_USERDATA, this)`, which allows us to have an MFC-like callback or a tightly integrated ... | What's an alternative to GWL_USERDATA for storing an object pointer? | CC BY-SA 4.0 | 0 | 2008-08-22T18:16:51.653 | 2021-08-14T15:41:20.923 | 2021-08-14T15:41:20.923 | 1,386,054 | 2,354 | [
"windows",
"winapi",
"32bit-64bit"
] |
23,072 | 2 | null | 22,907 | 1 | null | I haven't found any compelling argument for using ad-hoc queries. Especially those mixed up with your C#/Java/PHP code.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:11:48.187 | 2008-08-22T18:11:48.187 | null | null | 1,453 | null |
23,089 | 2 | null | 22,976 | 12 | null | Simple:
```
if(!MyNamespace) MyNamespace = {};
MyNamespace.foo = function() {
this.length = 0;
};
MyNamespace.foo.prototype.getLength = function() {
return this.length;
};
```
| null | CC BY-SA 2.5 | null | 2008-08-22T18:18:30.947 | 2008-08-22T18:18:30.947 | null | null | 1,790 | null |
23,076 | 2 | null | 18,253 | 7 | null | Being the author of cfix, I might be a little biased here -- but as a matter of fact, I am currently not aware of any other unit-testing framework for NT kernel mode.
If you should experience any problems with cfix, feel free to contact me.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:14:04.873 | 2008-08-22T18:14:04.873 | null | null | null | null |
23,085 | 2 | null | 21,404 | 2 | null | It sounds like you are trying to allow the "special content creators" save files in TFS Source Control without having to buy them a license to a Visual Studio Team Edition -- correct me if I'm wrong.
If that's the case, unfortunately I believe that you can't quite do that. Your users still need a Client Access License... | null | CC BY-SA 2.5 | null | 2008-08-22T18:17:23.993 | 2008-08-22T18:17:23.993 | null | null | 2,230 | null |
23,093 | 2 | null | 23,082 | 11 | null | @Thomas WISA is:
W=Windows
I=IIS
S=SQL (Microsoft SQL Server)
A=ASP (or ASP .NET)
As for choosing between them, I would think that the available resources and talent would be the deciding factor. If you can get great ASP .NET and MS SQL devs, go that route. If you've got a bunch of PHP/MySQL gurus on hand, go LAMP.
... | null | CC BY-SA 2.5 | null | 2008-08-22T18:19:08.950 | 2008-08-22T18:19:08.950 | null | null | 1,429 | null |
23,095 | 2 | null | 15,979 | 10 | null | Lucene doesn't allow you to start WildcardQueries with an asterisk by default, because those are incredibly expensive queries and will be very, very, very slow on large indexes.
If you're using the Lucene QueryParser, call setAllowLeadingWildcard(true) on it to enable it.
If you want all of the documents with a certa... | null | CC BY-SA 2.5 | null | 2008-08-22T18:19:22.037 | 2008-08-22T18:19:22.037 | null | null | 156 | null |
23,068 | 2 | null | 23,031 | 1 | null | First and often.
If I'm creating some new functionality for the system I'll be looking to initially define the interfaces and then write unit tests for those interfaces. To work out what tests to write consider the API of the interface and the functionality it provides, get out a pen and paper and think for a while abo... | null | CC BY-SA 2.5 | null | 2008-08-22T18:09:38.427 | 2008-08-22T18:09:38.427 | null | null | 1,143 | null |
23,097 | 2 | null | 23,082 | 4 | null | Cost is our biggest thing pushing us towards the LAMP environment, no question about it. Trying to go through Corporate procurement for Windows and SQL server licenses is horrific.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:19:55.920 | 2008-08-22T18:19:55.920 | null | null | 1,902,010 | null |
23,071 | 2 | null | 23,064 | 4 | null |
I wouldn't mix students and classes in the XML just the same way that I wouldn't mix students and classes in the same table in a database.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:11:44.863 | 2008-08-22T18:11:44.863 | null | null | 1,627 | null |
23,102 | 1 | 23,206 | null | 53 | 12,308 | I'm pretty green still when it comes to web programming, I've spent most of my time on client applications. So I'm curious about the common exploits I should fear/test for in my site.
| What common web exploits should I know about? | CC BY-SA 2.5 | 0 | 2008-08-22T18:22:09.207 | 2018-05-18T09:13:55.053 | 2008-08-23T15:19:37.750 | 2,134 | 580 | [
"security",
"testing"
] |
23,105 | 2 | null | 23,091 | 0 | null | One of the Microsoft Press books has excellent examples of various documents, including an SRS (which I think is what you are talking about). It might be one of the requirements books by Weigert (I think that's his name, I'm blanking on it right now). I've seen US government organizations use that as a template, and fr... | null | CC BY-SA 2.5 | null | 2008-08-22T18:22:31.250 | 2008-08-22T18:22:31.250 | null | null | 572 | null |
23,094 | 1 | 24,334 | null | 9 | 7,795 | What's the best way to handle a user going back to a page that had cached items in an asp.net app? Is there a good way to capture the back button (event?) and handle the cache that way?
| What's the best way to deal with cache and the browser back button? | CC BY-SA 2.5 | 0 | 2008-08-22T18:19:10.447 | 2015-02-11T23:36:39.627 | 2008-09-26T19:38:43.780 | 2,134 | 1,874 | [
"asp.net",
"caching",
"back-button"
] |
23,096 | 2 | null | 1,383 | 1 | null | > What do you do if you are given a pile of crap and seem like you are stuck in a perpetual state of cleanup that you know with the addition of any new feature or code can break the current set because the current software is like a house of cards?How can we do unit testing then?
You start small. The project I just got... | null | CC BY-SA 2.5 | null | 2008-08-22T18:19:39.883 | 2008-08-22T18:19:39.883 | 2020-06-20T09:12:55.060 | -1 | 517 | null |
23,107 | 2 | null | 23,091 | 5 | null | [Joel on Software](http://www.joelonsoftware.com/articles/fog0000000036.html) is particularly good at these and has some good articles about the subject...
A specific case: [the write-up](http://www.joelonsoftware.com/articles/AardvarkSpec.html) and [the spec](http://web.archive.org/web/20051028171624/https://www.joelo... | null | CC BY-SA 4.0 | null | 2008-08-22T18:22:44.057 | 2022-09-01T10:21:43.680 | 2022-09-01T10:21:43.680 | 14,857,724 | 1,874 | null |
23,108 | 2 | null | 23,094 | 6 | null | As far as I know (or at least have read) is its best to try not to work in response to user events, but rather think "in the page"..
Architect your application so it doesn't care if the back button is pushed.. It will just deal with it.. This may mean a little extra work from a development point of view, but overall w... | null | CC BY-SA 2.5 | null | 2008-08-22T18:23:25.523 | 2008-08-22T18:23:25.523 | null | null | 832 | null |
23,104 | 2 | null | 23,094 | 0 | null | The best way to deal with it is to probably put a no-cache directive in your ASP.NET pages (or a master page if you're using one). I don't think there's a way to deal with this directly in your ASP.NET code (since the cache decision is happening on the client).
As for MVC, don't know how you would accomplish that (ass... | null | CC BY-SA 2.5 | null | 2008-08-22T18:22:21.233 | 2008-08-22T18:22:21.233 | null | null | 1,975,282 | null |
23,101 | 2 | null | 23,083 | 43 | null | [SetWindowLongPtr](http://msdn.microsoft.com/en-us/library/ms644898%28VS.85%29.aspx) was created to replace [SetWindowLong](http://msdn.microsoft.com/en-us/library/ms633591%28VS.85%29.aspx) in these instances. It's LONG_PTR parameter allows you to store a pointer for 32-bit or 64-bit compilations.
```
LONG_PTR SetWin... | null | CC BY-SA 2.5 | null | 2008-08-22T18:21:41.783 | 2008-08-22T18:32:57.060 | 2008-08-22T18:32:57.060 | 2,134 | 2,134 | null |
23,111 | 2 | null | 23,082 | 0 | null | My decision was based on two things. First and foremost I hated programming in ASP. I did it for an old job, and when given a choice I would choose PHP. I also tend to enjoy Linux over Windows.
When it came to actually picking though, the corporate heads chose LAMP due to cost. Because let's be honest as developers, ... | null | CC BY-SA 2.5 | null | 2008-08-22T18:24:13.680 | 2008-08-22T18:24:13.680 | null | null | 1,063 | null |
23,112 | 2 | null | 23,102 | 0 | null | The most common are probably database injection attacks and cross-site scripting attacks; mainly because those are the easiest to accomplish (that's likely because those are the ones programmers are laziest about).
| null | CC BY-SA 2.5 | null | 2008-08-22T18:24:17.720 | 2008-08-22T18:24:17.720 | null | null | 1,975,282 | null |
23,109 | 2 | null | 23,082 | 4 | null | WISA can be cheap, if your application doesn't need anything beyond shared hosting, there is little cost.
It can also be expensive, then again so can LAMP once you get to the same size.
Personally, I like the WISA stack, but its more out of familiarity than anything.
Two things that stand out:
- -
There is no nee... | null | CC BY-SA 2.5 | null | 2008-08-22T18:23:30.687 | 2008-08-22T18:23:30.687 | null | null | 1,965 | null |
23,119 | 2 | null | 23,102 | 0 | null | You can see even on this site that the most damaging things you'll be looking after involve code injection into your application, so XSS (Cross Site Scripting) and SQL injection (@Patrick's suggestions) are your biggest concerns.
Basically you're going to want to make sure that if your application allows for a user to ... | null | CC BY-SA 2.5 | null | 2008-08-22T18:26:10.493 | 2008-08-22T18:26:10.493 | null | null | 2,293 | null |
23,121 | 2 | null | 23,106 | 3 | null | You will want to use `org.xml.sax.XMLReader` ([http://docs.oracle.com/javase/7/docs/api/org/xml/sax/XMLReader.html](http://docs.oracle.com/javase/7/docs/api/org/xml/sax/XMLReader.html)).
| null | CC BY-SA 3.0 | null | 2008-08-22T18:27:35.793 | 2013-11-26T05:00:10.777 | 2013-11-26T05:00:10.777 | 1,102,512 | 1,416 | null |
23,091 | 1 | null | null | 2 | 960 | I've seen different program managers write specs in different format. Almost every one has had his/her own style of writing a spec.
On one hand are those wordy documents which given to a programmer are likely to cause him/her missing a few things. I personally dread the word documents spec...I think its because of my ... | How to write a spec that is productive? | CC BY-SA 3.0 | 0 | 2008-08-22T18:18:56.767 | 2022-09-01T10:21:43.680 | 2017-08-16T09:14:14.837 | 1,000,551 | 2,528 | [
"project-management",
"specs"
] |
23,122 | 2 | null | 23,102 | 1 | null | This is also a short little presentation on security by one of wordpress's core developers.
[Security in wordpress](http://markjaquith.wordpress.com/2008/08/16/secure-coding-with-wordpress-wordcamp-sf-2008-slides/)
it covers all of the basic security problems in web apps.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:27:52.470 | 2008-08-22T18:27:52.470 | null | null | 1,063 | null |
23,124 | 1 | 23,227 | null | 1 | 1,757 | As the title mentions, I have a timeout callback handler on an ajax call, and I want to be able to test that condition but nothing is coming to mind immediately on ways I can force my application to hit that state, any suggestions?
| Need to test an ajax timeout condition | CC BY-SA 2.5 | null | 2008-08-22T18:27:59.147 | 2015-04-16T05:12:54.423 | null | null | 2,272 | [
"asp.net",
"ajax",
"testing"
] |
23,106 | 1 | 23,300 | null | 10 | 8,057 | What is the best method to parse multiple, discrete, custom XML documents with Java?
| Best method to parse various custom XML documents in Java | CC BY-SA 2.5 | 0 | 2008-08-22T18:22:39.860 | 2016-03-23T23:11:35.347 | null | null | 828 | [
"java",
"xml"
] |
23,123 | 2 | null | 23,078 | 3 | null | Make sure you are debuging using the debug configuration, not the release one. Also make sure optimizations are disabled in debug configuration.
Optimizations must be off when you debug else it can lead to very erratic behaviours like these.
---
For C# projects, which I am assuming the question is about looking a... | null | CC BY-SA 2.5 | null | 2008-08-22T18:27:56.433 | 2008-08-22T18:33:40.537 | 2008-08-22T18:33:40.537 | 42 | 42 | null |
23,110 | 2 | null | 23,102 | 28 | null | These three are the most important:
- [Cross Site Request Forgery](http://en.wikipedia.org/wiki/Cross_Site_Request_Forgery)- [Cross Site Scripting](http://en.wikipedia.org/wiki/Cross-site_scripting)- [SQL injection](http://en.wikipedia.org/wiki/SQL_injection)
| null | CC BY-SA 2.5 | null | 2008-08-22T18:23:41.637 | 2008-09-11T22:58:08.707 | 2008-09-11T22:58:08.707 | 429 | 429 | null |
23,116 | 2 | null | 23,102 | 10 | null | ```
bool UserCredentialsOK(User user)
{
if (user.Name == "modesty")
return false;
else
// perform other checks
}
```
| null | CC BY-SA 4.0 | null | 2008-08-22T18:25:39.307 | 2018-05-18T09:13:55.053 | 2018-05-18T09:13:55.053 | 886,001 | 832 | null |
23,127 | 2 | null | 23,082 | 1 | null | I've used PHP/MySQL for a while, and I've used Rails, and I'm getting into ASP.NET right now.
My incentive for switching to ASP.NET at the moment is similar to my incentive for digging into Rails--I find C# and Ruby to be much more enjoyable languages to code in. The object models are much more mature, and it feels l... | null | CC BY-SA 2.5 | null | 2008-08-22T18:28:49.940 | 2008-08-22T18:28:49.940 | null | null | 1,344 | null |
23,125 | 2 | null | 23,082 | -4 | null | I think the team is the biggest issue. WISA isn't universally worse or better than LAMP for any particular job. My expertize is in LAMP. I have very little experience with WISA, so I would never pick it.
It's more along the lines of photography -- if all your lenses were Canon's, why would you buy a Nikon body for a ... | null | CC BY-SA 2.5 | null | 2008-08-22T18:28:34.887 | 2008-10-20T22:19:17.790 | 2008-10-20T22:19:17.790 | 2,506 | 2,506 | null |
23,131 | 2 | null | 23,124 | 3 | null | You could always run a server-side script that keeps running for a period of time.
For example:
```
<?php
sleep(10); //sleep for 10 seconds.
print "This script has finished.";
>
```
| null | CC BY-SA 3.0 | null | 2008-08-22T18:31:04.630 | 2015-04-16T05:12:54.423 | 2015-04-16T05:12:54.423 | 707,364 | 1,993 | null |
23,139 | 2 | null | 22,903 | 3 | null | As an alternative, you could try using something like [Terminals](http://www.codeplex.com/Terminals). It allows you to have multiple remote desktop windows open at once all as tabs in the same window. Quite cool. Also, it is open source so you can change its behavior if needed (although I don't believe it steals focus ... | null | CC BY-SA 3.0 | null | 2008-08-22T18:33:45.280 | 2012-03-29T18:48:23.240 | 2012-03-29T18:48:23.240 | 122,607 | 1,627 | null |
23,140 | 2 | null | 23,102 | 0 | null | Using stored procedures and/or parameterized queries will go a long way in protecting you from sql injection. Also do have your web app access the database as sa or dbo - set a up a standard user account and set the permissions.
AS for XSS (cross site scripting) ASP.NET has some built in protections. The best thing ... | null | CC BY-SA 2.5 | null | 2008-08-22T18:33:56.013 | 2008-08-22T18:33:56.013 | null | null | 1,433 | null |
23,137 | 2 | null | 22,980 | 11 | null | The following will work
```
<%= Post.find_unread_by(current_user).size %>
```
or
```
<%= Post.find_unread_by(current_user).length %>
```
However if you check your development.log you should see that it gets the unread count by
1. Retrieving all the posts
2. Retrieving all the posts read by the user
3. Removing all o... | null | CC BY-SA 2.5 | null | 2008-08-22T18:33:33.890 | 2008-08-24T23:58:52.017 | 2020-06-20T09:12:55.060 | -1 | 2,178 | null |
23,128 | 2 | null | 23,102 | 0 | null | SQL Injection. Cross Site Scripting.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:28:50.313 | 2008-08-22T18:28:50.313 | null | null | 1,862 | null |
23,118 | 2 | null | 5,727 | 0 | null | Just to confuse things a bit more, sometimes you have to work with handles instead of pointers. Handles are pointers to pointers, so that the back end can move things in memory to defragment the heap. If the pointer changes in mid-routine, the results are unpredictable, so you first have to lock the handle to make sure... | null | CC BY-SA 2.5 | null | 2008-08-22T18:25:52.443 | 2008-08-22T18:25:52.443 | null | null | 2,531 | null |
23,145 | 2 | null | 22,901 | 3 | null | [MySQL++](http://tangentsoft.net/mysql++/)
| null | CC BY-SA 2.5 | null | 2008-08-22T18:37:21.417 | 2008-08-22T18:37:21.417 | null | null | 2,132 | null |
23,148 | 2 | null | 22,968 | 1 | null | In my (admittedly limited) experience with SSIS, it is quite good at rapidly getting something up and running, but frusteratingly limited in getting something that "feels" like the most elegant, efficient solution to a programmer.
Since the Excel Source Editor seems to take only files as input, you need to give it a... | null | CC BY-SA 3.0 | null | 2008-08-22T18:37:53.803 | 2011-07-26T14:20:07.010 | 2011-07-26T14:20:07.010 | null | 1,807 | null |
23,126 | 2 | null | 23,082 | -1 | null | That is true MySQL is $599 (one license is required per database server) for commercial use
| null | CC BY-SA 2.5 | null | 2008-08-22T18:28:35.387 | 2008-08-22T18:28:35.387 | null | null | 740 | null |
23,130 | 2 | null | 2,658 | 0 | null | As mentioned many times elsewhere, Just Do It. I was able to get started from scratch with Subversion under Windows in no time by reading the quick-start guide in the Red Book. Once I pointed TortoiseSVN at the repository, I was in business. It took me a while to get the finer points down, but they were minor humps to ... | null | CC BY-SA 2.5 | null | 2008-08-22T18:30:30.763 | 2008-08-22T18:30:30.763 | null | null | 2,531 | null |
23,157 | 2 | null | 2,658 | 1 | null | Use TortoiseSVN (version.app if on mac). Just install and go. If you need a place to host your code look at [http://beanstalkapp.com/](http://beanstalkapp.com/)
| null | CC BY-SA 2.5 | null | 2008-08-22T18:42:41.403 | 2008-08-22T18:42:41.403 | null | null | 1,063 | null |
23,135 | 2 | null | 23,102 | 3 | null | SQL INJECTION ATTACKS. They are easy to avoid but all too common.
NEVER EVER EVER EVER (did I mention "ever"?) trust user information passed to you from form elements. If your data is not vetted before being passed into other logical layers of your application, you might as well give the keys to your site to a strange... | null | CC BY-SA 2.5 | null | 2008-08-22T18:31:50.150 | 2008-08-22T18:31:50.150 | null | null | 2,213 | null |
23,166 | 1 | 23,179 | null | 54 | 6,543 | I like to study languages outside my comfort zone, but I've had a hard time finding a place to start for functional languages. I heard a lot of good things about [Structure and Interpretations of Computer Programs](https://rads.stackoverflow.com/amzn/click/com/0070004846), but when I tried to read through it a couple ... | What's a good beginning text on functional programming? | CC BY-SA 2.5 | 0 | 2008-08-22T18:46:09.010 | 2011-12-05T20:50:49.573 | 2008-08-23T14:49:43.517 | 2,134 | 2,547 | [
"functional-programming",
"lisp",
"scheme"
] |
23,175 | 1 | null | null | 1 | 99 | This is mostly geared toward desktop application developers. How do I design a caching block which plays nicely with the GC? How do I tell the GC that I have just done a cache sweep and it is time to do a GC? How do I get an accurate measure of when it is time to do a cache sweep?
Are there any prebuilt caching sch... | Caching Schemes for Managed Languages | CC BY-SA 3.0 | null | 2008-08-22T18:50:52.477 | 2015-08-24T09:02:57.337 | 2015-08-24T09:02:57.337 | 155,077 | 1,490 | [
"caching",
"garbage-collection"
] |
23,174 | 2 | null | 23,001 | 0 | null | I guess the tool I was looking for was under my nose the whole time! I've used Maintenance Plans for backups but I think I set those up at least 4 years ago or more, long before I knew anything about shrinking files and defragging indexes. Thanks!
| null | CC BY-SA 2.5 | null | 2008-08-22T18:50:41.977 | 2008-08-22T18:50:41.977 | null | null | 2,505 | null |
23,176 | 1 | 23,181 | null | 5 | 1,268 | I am a `C/C++` programmer professionally, but I've created a couple of personal web sites using `PHP and MySQL`.
They're pretty basic, and I'd like to jazz them up using `Ajax`, but I've never done any Ajax. I've done all the development so far manually, i.e. no IDE or anything like that.
Shareware or freeware wou... | Suggestions on Ajax development environment for PHP | CC BY-SA 3.0 | 0 | 2008-08-22T18:50:54.660 | 2016-06-24T01:52:58.210 | 2016-06-24T01:52:58.210 | 4,311,889 | 1,821 | [
"php",
"javascript",
"ajax",
"ide"
] |
23,169 | 1 | null | null | 4 | 5,219 | When using Groovy `MarkupBuilder`, I have places where I need to output text into the document, or call a function which outputs text into the document. Currently, I'm using the undefined tag to do the output. Is there a better way to write this code?
```
li {
text("${type.getAlias()} blah blah ")
function1(type... | HTML using Groovy MarkupBuilder, how do I elegantly mix tags and text? | CC BY-SA 3.0 | null | 2008-08-22T18:47:03.610 | 2018-04-04T05:23:43.720 | 2018-04-04T05:23:43.720 | 542,270 | null | [
"html",
"groovy"
] |
23,179 | 2 | null | 23,166 | 29 | null | [The Little Schemer](http://www.ccs.neu.edu/home/matthias/BTLS/) teaches recursion really well, and it's fun and simple to read.
I also liked [The Scheme Programming Language](http://www.scheme.com/tspl3/) for a broader introduction into the language.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:52:28.230 | 2008-08-22T18:52:28.230 | null | null | 1,797 | null |
23,181 | 2 | null | 23,176 | 2 | null | As T.O. says, try Aptana. There's a very good free version, and they really push the AJAX. They even have Jaxer, an "AJAX Server" that they're working on. If nothing else, the plugins are great, and, other than a few quirks, I really like working in it.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:54:07.353 | 2008-08-22T18:54:07.353 | null | null | 1,344 | null |
23,151 | 2 | null | 2,658 | 3 | null | Git is superior to subversion, but it's a little bit out on the bleeding edge.
I'd say, if you're just getting started, jump on the edge; setup a free account @ [http://github.com](http://github.com)
They have educational material on site for setting up & using git.
| null | CC BY-SA 2.5 | null | 2008-08-22T18:38:37.000 | 2008-08-22T18:38:37.000 | null | null | 2,477 | null |
23,182 | 2 | null | 23,176 | 0 | null | First off, make sure you understand the basics of the HTTP protocol. Then learn how the javascript httpXmlRequest function works. Once you've covered those, pick an Ajax library - prototype is good.
Then look at a few examples, and follow the API.
Job done.
I seriously have no idea how they manage to write entire bo... | null | CC BY-SA 2.5 | null | 2008-08-22T18:54:30.330 | 2008-08-22T18:54:30.330 | null | null | 1,951 | null |
23,183 | 2 | null | 23,176 | 1 | null | Rolling your own AJAX has become somewhat outdated in the presence of Javascript libraries like Prototype and JQuery. I would recommend looking into one of those libraries (Jeff used JQuery for SO and he's been really impressed with it from what I understand).
As far as a development environment goes, I don't know th... | null | CC BY-SA 2.5 | null | 2008-08-22T18:54:37.193 | 2008-08-22T18:54:37.193 | null | null | 271 | null |