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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28,471 | 2 | null | 28,464 | 2 | null | I do it only when it helps with separation of concerns.
Like maybe cross-project I would provide an interface for implementers in one of my library project and the implementing project would inject whatever specific implementation they want in.
But that's about it... all the other cases it'd just make the system unne... | null | CC BY-SA 2.5 | null | 2008-08-26T15:59:24.180 | 2008-08-26T15:59:24.180 | null | null | 3,055 | null |
28,470 | 2 | null | 28,464 | 2 | null | What do you mean by "just adding a property to a class?"
My rule of thumb is to make the class unit testable. If your class relies on the implementation details of another class, that needs to be refactored/abstracted to the point that the classes can be tested in isolation.
EDIT: You mention a boatload of interface... | null | CC BY-SA 2.5 | null | 2008-08-26T15:59:20.280 | 2008-08-26T15:59:20.280 | null | null | 96 | null |
28,472 | 2 | null | 28,235 | 55 | null | The main difference is that a JSPX file (officially called a 'JSP document') may be easier to work with because the requirement for well-formed XML may allow your editor to identify more typos and syntax errors as you type.
However, there are also disadvantages. For example, well-formed XML must escape things like les... | null | CC BY-SA 2.5 | null | 2008-08-26T15:59:40.030 | 2008-08-26T15:59:40.030 | null | null | 2,670 | null |
28,477 | 2 | null | 28,301 | 2 | null | Hey, look at what I found!
[http://gafter.blogspot.com/2007/03/compact-object-comparator.html](http://gafter.blogspot.com/2007/03/compact-object-comparator.html)
This is exactly what I was looking for.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:03:27.633 | 2008-08-26T16:03:27.633 | null | null | 3,071 | null |
28,479 | 2 | null | 28,464 | 9 | null | Think about your design. DI allows you to change how your code functions via configuration changes. It also allows you to break dependencies between classes so that you can isolate and test objects easier. You have to determine where this makes sense and where it doesn't. There's no pat answer.
A good rule of thum... | null | CC BY-SA 2.5 | null | 2008-08-26T16:03:59.240 | 2008-08-26T16:03:59.240 | null | null | null | null |
28,478 | 1 | 28,498 | null | 11 | 4,085 | I recently asked a question about [IIf vs. If](https://stackoverflow.com/questions/28377/iif-vs-if) and found out that there is another function in VB called which basically does the same thing as but is a short-circuit.
Does this function perform better than the function? Does the statement trump the and func... | If, IIf() and If() | CC BY-SA 2.5 | 0 | 2008-08-26T16:03:37.260 | 2014-04-30T18:45:41.627 | 2017-05-23T11:52:58.997 | -1 | 299 | [
".net",
"vb.net",
"if-statement",
"iif-function"
] |
28,481 | 1 | 28,490 | null | 2 | 1,118 | There is a conversion process that is needed when migrating Visual Studio 2005 web site to Visual Studio 2008 web application projects.
It looks like VS2008 is creating a .designer. file for every aspx when you right click on a file or the project itself in Solution Explorer and select 'Convert to Web Application.'
W... | What is the purpose of the designer files in Visual Studio 2008 Web application projects? | CC BY-SA 2.5 | null | 2008-08-26T16:04:53.450 | 2008-11-02T02:19:54.887 | 2008-11-02T02:19:54.887 | null | 1,341 | [
"visual-studio-2008",
"web-applications"
] |
28,480 | 2 | null | 27,948 | 2 | null | > Right now I believe it would make sense for me to target about 2 resolutions and latter learn my customers best needs through feedback?
It's a chicken and egg problem.
before you develop the product you already know what your customers use/need.
not even the customers know what they need until they use somethi... | null | CC BY-SA 2.5 | null | 2008-08-26T16:04:12.983 | 2008-08-26T16:04:12.983 | null | null | 2,915 | null |
28,497 | 2 | null | 28,268 | 1 | null | You'd have the least problems running windows not in a VM, but for development your experience should be close to perfect with a VM. Both will give you less issues than MonoDevelop presumably, which is an entirely different CLR, compiler and a reimplementation of the framework.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:10:16.790 | 2008-08-26T16:10:16.790 | null | null | 459 | null |
28,483 | 2 | null | 28,464 | 1 | null |
I think it's more of a experience / flight time call.
Basically if you see the dependency as a candidate object that may be replaced in the near future, use dependency injection. If I see 'classA and its dependencies' as one block for substitution, then I probably won't use DI for A's deps.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:05:06.413 | 2008-08-26T16:05:06.413 | null | null | 1,695 | null |
28,490 | 2 | null | 28,481 | 5 | null | They hold all the form designer stuff that used to go in the #Region " Web Form Designer Generated Code " section of the code. instead of putting it in the .aspx.vb file where people might edit it (mistakenly or not), it's been moved to a separate file, so that you don't have ever look at it.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:07:34.613 | 2008-08-26T16:07:34.613 | null | null | 1,862 | null |
28,474 | 2 | null | 28,303 | 0 | null | There is no single set of colours that everyone finds legible, but tools exist to formalise the variation and help you to make informed choices. Anyone doing UI should know about automated colour checking for accessibility. Anytime you have text that people need to read, pop the foreground and background colours into t... | null | CC BY-SA 2.5 | null | 2008-08-26T16:00:23.507 | 2008-08-26T16:00:23.507 | null | null | 137 | null |
28,502 | 2 | null | 28,464 | 1 | null | The biggest benefit is that it will help you understand or even uncover the architecture of your application. You'll be able to see very clearly how your dependency chains work and be able to make changes to individual parts without requiring you to change things that are unrelated. You'll end up with a loosely coupl... | null | CC BY-SA 2.5 | null | 2008-08-26T16:11:49.440 | 2008-08-26T17:48:31.827 | 2008-08-26T17:48:31.827 | 855 | 855 | null |
28,494 | 2 | null | 28,301 | 2 | null | > Hey, look at what I found
Oh yes, I forgot about the IdentityHashMap (Java 6 and above only). Just have to pay attention at releasing your comparator.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:08:54.250 | 2008-08-26T16:08:54.250 | null | null | 3,069 | null |
28,489 | 2 | null | 28,441 | 1 | null | You may also want to look at asynchronously downloading your tiles via one of the Ajax libraries available. Let's say your user can view 9 tiles at a time and scroll/zoom. Download those 9 tiles they can see plus whatever is needed to handle the zoom for those tiles on the first load; then you'll need to play around wi... | null | CC BY-SA 2.5 | null | 2008-08-26T16:07:23.973 | 2008-08-26T16:07:23.973 | null | null | null | null |
28,513 | 2 | null | 27,853 | 3 | null | Hacky answer would be to grab the IE Developer Toolbar, find the tag that has the scrollbar, and alter your CSS file to add the overflow:hidden property to it.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:16:06.403 | 2008-08-26T16:16:06.403 | null | null | null | null |
28,521 | 2 | null | 28,302 | 0 | null | Wireshark is great.. but another option would be via PowerShell. I've used the [Get-Packet](http://blog.sapien.com/index.php/2008/08/14/analyze-packet-reloaded/) script from Jeff Hicks at Sapien Technologies as a really lightweight packet sniffer. You get custom objects representing your packets and can do whatever f... | null | CC BY-SA 2.5 | null | 2008-08-26T16:19:25.210 | 2008-08-26T16:19:25.210 | null | null | 1,233 | null |
28,519 | 2 | null | 27,916 | 1 | null | How do you mean "Test the database"?
If you are testing foreign keys, a simply script to insert invalid data is all you should need.
Testing a database could imply a great number of issues. Does it have all the tables? Are the tables correct? Are the indexes in place? Did the latest updates get applied? Has th... | null | CC BY-SA 2.5 | null | 2008-08-26T16:17:42.843 | 2008-08-26T16:17:42.843 | null | null | 2,894 | null |
28,530 | 1 | 38,903 | null | 36 | 11,246 | What open source licenses are more corporate-friendly, i.e., they can be used in commercial products without the need to open source the commercial product?
| Corporate-Friendly Open Source Licenses | CC BY-SA 2.5 | 0 | 2008-08-26T16:26:51.417 | 2012-08-29T12:07:19.630 | 2012-08-29T12:07:19.630 | 50,776 | 2,141 | [
"open-source"
] |
28,517 | 2 | null | 28,011 | 0 | null | Ended up using the [Date](http://ruby-doc.org/stdlib-2.2.3/libdoc/date/rdoc/Date.html) class, problem then became making that work with the rails select helper - which didn't happen, just generated the html myself.
| null | CC BY-SA 3.0 | null | 2008-08-26T16:16:30.910 | 2015-10-08T07:35:05.990 | 2015-10-08T07:35:05.990 | 67,579 | 3,041 | null |
28,512 | 2 | null | 27,729 | 6 | null | TextMate + the [Flex and ActionScript 3 bundles](http://blog.simongregory.com/10/textmate-actionscript-3-and-flex-bundles/) is a great combo. Throw in [ProjectPlus](http://ciaranwal.sh/2008/08/05/textmate-plug-in-projectplus) and you have an almost full featured development environment. What's missing is visual design ... | null | CC BY-SA 2.5 | null | 2008-08-26T16:15:41.053 | 2008-08-26T16:15:41.053 | null | null | 1,109 | null |
28,467 | 2 | null | 16,067 | 10 | null | I haven't used SWIG or SIP, but I find writing Python wrappers with [boost.python](http://www.boost.org/doc/libs/1_35_0/libs/python/doc/index.html) to be very powerful and relatively easy to use.
I'm not clear on what your requirements are for passing types between C/C++ and python, but you can do that easily by eithe... | null | CC BY-SA 2.5 | null | 2008-08-26T15:58:08.880 | 2008-08-26T16:48:13.517 | 2008-08-26T16:48:13.517 | 3,051 | 3,051 | null |
28,528 | 2 | null | 24,579 | 2 | null | There is a plugin to use TinyMCE with rails, lots of information on the [rails wiki](http://wiki.rubyonrails.org/rails/pages/HowToUseTinyMCE).
| null | CC BY-SA 2.5 | null | 2008-08-26T16:24:52.433 | 2008-08-26T16:24:52.433 | null | null | 3,041 | null |
28,541 | 2 | null | 16,991 | 1 | null | I started out with RadRails then moved to Aptana when they took it over, wasn't too bad. Got a macbook and have been using Textmate, never going back.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:31:18.550 | 2008-08-26T16:31:18.550 | null | null | 3,041 | null |
28,537 | 2 | null | 28,529 | 16 | null | > Should I be throwing the errors in the
ashx, or should I be returning a
status code as part of the data
returned by the call to
userCreation.ashx, then using this to
decide what action to take? How do you
handle these situations?
Personally, if possible, I would prefer to handle this on the server side a... | null | CC BY-SA 2.5 | null | 2008-08-26T16:29:46.977 | 2008-08-26T17:13:37.980 | 2008-08-26T17:13:37.980 | 326 | 326 | null |
28,538 | 1 | 28,594 | null | 6 | 4,354 | I'm trying to find a way to list the (static) dependency requirements of a jar file, in terms of which symbols are required at run time.
I can see that the methods exported by classes can be listed using "javap", but there doesn't seem to be an opposite facility to list the 'imports'. Is it possible to do this?
This ... | Java import/export dependencies | CC BY-SA 2.5 | 0 | 2008-08-26T16:30:07.960 | 2012-05-02T12:19:34.147 | 2012-05-02T12:19:34.147 | 1,145,792 | 2,887 | [
"java",
"import",
"export"
] |
28,546 | 2 | null | 28,526 | 0 | null | have you tried doing things in elevated privileges mode? including reinstalling and all...
| null | CC BY-SA 2.5 | null | 2008-08-26T16:32:31.653 | 2008-08-26T16:42:15.483 | 2008-08-26T16:42:15.483 | 3,055 | 3,055 | null |
28,498 | 2 | null | 28,478 | 14 | null | Damn, I really thought you were talking about the operator all along. ;-) Anyway …
> Does this If function perform better than the IIf function?
Definitely. Remember, it's built into the language. Only one of the two conditional arguments has to be evaluated, potentially saving a costly operation.
> Does the If stat... | null | CC BY-SA 2.5 | null | 2008-08-26T16:10:32.827 | 2008-08-26T16:10:32.827 | null | null | 1,968 | null |
28,529 | 1 | 28,537 | null | 33 | 6,682 | When using [jQuery](http://jquery.com/)'s [ajax method](http://docs.jquery.com/Ajax/jQuery.ajax#options) to submit form data, what is the best way to handle errors?
This is an example of what a call might look like:
```
$.ajax({
url: "userCreation.ashx",
data: { u:userName, p:password, e:email },
type: "PO... | How would you handle errors when using jQuery.ajax()? | CC BY-SA 3.0 | 0 | 2008-08-26T16:26:45.347 | 2016-11-21T10:36:13.183 | 2016-11-21T10:36:13.183 | 5,104,596 | 1,403 | [
"asp.net",
"jquery",
"ajax"
] |
28,552 | 2 | null | 28,538 | 2 | null | I think you can get that information using [JDepend](http://www.clarkware.com/software/JDepend.html)
| null | CC BY-SA 2.5 | null | 2008-08-26T16:35:25.887 | 2008-08-26T16:35:25.887 | null | null | 3,095 | null |
28,553 | 2 | null | 28,530 | 1 | null | The [GNU Lesser General Public Licence](http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_Licence) is also corporate-friendly and quite often used in libraries. It allows for of a certain library but modifications to it should be made public.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:35:53.750 | 2008-08-26T16:35:53.750 | 2020-06-20T09:12:55.060 | -1 | 1,830 | null |
28,556 | 2 | null | 16,991 | 2 | null | Textmate on osx
| null | CC BY-SA 2.5 | null | 2008-08-26T16:36:34.870 | 2008-08-26T16:36:34.870 | null | null | 1,295 | null |
28,547 | 2 | null | 28,530 | 5 | null | The two most commonly used licenses that allow what you want are the [BSD License](http://www.opensource.org/licenses/bsd-license.php) and
[MIT License](http://www.opensource.org/licenses/mit-license.php). (see also the full [list of licenses](http://www.opensource.org/licenses) considered Open Source by the OSI).
| null | CC BY-SA 2.5 | null | 2008-08-26T16:33:30.213 | 2008-08-26T16:33:30.213 | null | null | 3,002 | null |
28,557 | 2 | null | 28,293 | 2 | null | if you include the active_support gem (comes with rails) it adds the method from_xml to the Hash object. You can then call Hash.from_xml(xml_content) and it'll return a hash that you can use to access the data.
I don't know of an easy way to map an xml to an object, but you could create a wrapper class that delegates... | null | CC BY-SA 2.5 | null | 2008-08-26T16:36:42.813 | 2008-08-26T16:36:42.813 | null | null | 3,041 | null |
28,554 | 2 | null | 28,530 | 3 | null | As a possible alternative to the BSD license you can also use the [Ms-PL](http://www.opensource.org/licenses/ms-pl.html) license (Microsoft public license). Pretty much the same but (arguably) better worded. Additionally, It's got “Microsoft” in its name, which screams “corprate-friendly” like nothing else does. ;-)
| null | CC BY-SA 2.5 | null | 2008-08-26T16:36:17.837 | 2008-08-26T16:36:17.837 | null | null | 1,968 | null |
28,545 | 2 | null | 28,529 | 20 | null | For debugging, I usually just create an element (in the case below: `<div id="error"></div>`) on the page and write the XmlHttpRequest to it:
```
error: function (XMLHttpRequest, textStatus, errorThrown) {
$("#error").html(XMLHttpRequest.status + "\n<hr />" + XMLHttpRequest.responseText);
}
```
Then you can see ... | null | CC BY-SA 2.5 | null | 2008-08-26T16:32:21.480 | 2008-08-26T16:41:11.803 | 2008-08-26T16:41:11.803 | 1,414 | 1,414 | null |
28,560 | 1 | 28,790 | null | 2 | 419 | Is it possible to configure nHibernate to connect to Paradox database (`*.db` files)?
| Is it possible to use nHibernate with Paradox database? | CC BY-SA 3.0 | 0 | 2008-08-26T16:38:05.570 | 2015-10-08T07:45:51.400 | 2015-10-08T07:45:51.400 | 67,579 | 1,534 | [
"database",
"nhibernate",
"paradox"
] |
28,559 | 1 | 28,714 | null | 12 | 874 | What's the best Python idiom for this C construct?
```
while ((x = next()) != END) {
....
}
```
I don't have the ability to recode next().
update: and the answer from seems to be:
```
for x in iter(next, END):
....
```
| Most Pythonic way equivalent for: while ((x = next()) != END) | CC BY-SA 2.5 | 0 | 2008-08-26T16:37:52.263 | 2009-01-13T21:27:28.583 | 2009-01-13T21:27:28.583 | 46,387 | 116 | [
"c",
"python"
] |
28,526 | 1 | null | null | 0 | 313 | I am wondering if anyone else is experiencing these same issues:
My main dev machine is a Dell, running Vista Home Premium and Visual Studio 2008 - both fully patched / up-to-date.
There are some quirks, such as the play/pause media controls on my keyboard not working while running Visual Studio 2008. These kinds of ... | Compatability between Windows Vista and Visual Studio 2008 | CC BY-SA 3.0 | 0 | 2008-08-26T16:23:14.373 | 2013-04-17T20:47:03.230 | 2013-04-17T20:47:03.230 | 1,454,806 | 3,099 | [
"visual-studio-2008",
"windows-vista"
] |
28,562 | 2 | null | 28,293 | 0 | null | You can use the ruby version of xml-simple.
You shouldn't need to install the gem as I believe it's already installed with rails.
[http://xml-simple.rubyforge.org/](http://xml-simple.rubyforge.org/)
| null | CC BY-SA 2.5 | null | 2008-08-26T16:42:06.027 | 2008-08-26T16:42:06.027 | null | null | 1,295 | null |
28,566 | 2 | null | 28,559 | 1 | null | What are you trying to do here?
If you're iterating over a list, you can use `for e in L` where e is the element and L is the list. If you're filtering a list, you can use list comprehensions (i.e. `[ e for e in L if e % 2 == 0 ]` to get all the even numbers in a list).
| null | CC BY-SA 2.5 | null | 2008-08-26T16:42:49.473 | 2008-08-26T16:42:49.473 | null | null | 2,132 | null |
28,568 | 2 | null | 28,559 | 5 | null | It depends a bit what you want to do. To match your example as far as possible, I would make next a generator and iterate over it:
```
def next():
for num in range(10):
yield num
for x in next():
print x
```
| null | CC BY-SA 2.5 | null | 2008-08-26T16:44:42.200 | 2008-08-26T16:44:42.200 | null | null | 3,102 | null |
28,561 | 2 | null | 28,530 | 1 | null | By "corporate" I tend to think of internal development, programs distributed only to people that are employed by the same company. In that sense, pretty much all free software licences are "corporate-friendly."
However, in terms of distributing closed-source software that contains free software the only big one (off t... | null | CC BY-SA 2.5 | null | 2008-08-26T16:41:25.297 | 2008-08-26T16:41:25.297 | null | null | 2,998 | null |
28,563 | 2 | null | 28,559 | 2 | null | Maybe it's not terribly idiomatic, but I'd be inclined to go with
```
x = next()
while x != END:
do_something_with_x
x = next()
```
... but that's because I find that sort of thing easy to read
| null | CC BY-SA 2.5 | null | 2008-08-26T16:42:27.760 | 2008-08-26T16:42:27.760 | null | null | 1,199 | null |
28,542 | 1 | null | null | 5 | 1,511 | My C code snippet takes the address of an argument and stores it in a volatile memory location (preprocessed code):
```
void foo(unsigned int x) {
*(volatile unsigned int*)(0x4000000 + 0xd4) = (unsigned int)(&x);
}
int main() {
foo(1);
while(1);
}
```
I used an SVN version of GCC for compiling this code... | Is GCC broken when taking the address of an argument on ARM7TDMI? | CC BY-SA 2.5 | null | 2008-08-26T16:31:25.943 | 2012-05-02T03:31:29.550 | 2012-05-02T03:31:29.550 | 192,221 | 616 | [
"c",
"gcc",
"arm",
"assembly"
] |
28,569 | 2 | null | 28,542 | -2 | null | > Is this just expected/undefined
behaviour? Have I done something wrong
or have I in fact found a Compiler
Bug™?
No bug just the defined behaviour that optimisation options can produce odd code which might not work :)
EDIT:
If you think you have found a bug in GCC the mailing lists will be glad you dropped by... | null | CC BY-SA 2.5 | null | 2008-08-26T16:44:42.310 | 2008-08-26T16:44:42.310 | null | null | 269 | null |
28,574 | 2 | null | 28,530 | 1 | null | Ideally I looked for components licensed under the [Apache Software License](http://www.apache.org/licenses/). After that LGPL, BSD and Artistic License are my next preferences.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:47:20.367 | 2008-08-26T16:47:20.367 | null | null | 1,969 | null |
28,564 | 2 | null | 28,530 | 12 | null | Basically, only the GPL requires that the whole product is GPL, and LGPL implies that the parts specific to that library be open sourced. But, for both, the problem arises only when you distribute the application.
For all the other open source licenses, the only common requirement is the publicity (ie. show at some po... | null | CC BY-SA 2.5 | null | 2008-08-26T16:42:44.233 | 2010-01-08T14:23:20.243 | 2010-01-08T14:23:20.243 | 3,069 | 3,069 | null |
28,572 | 2 | null | 9,275 | 0 | null | I am a bit confused about this question, if you are looking for simple parameter usage then the notation is :`*paramName*` , however if you want to structurally change the `WHERE` clause (as you might in sql+ using ?) then you should really be using custom code within the report to define a function that returns the re... | null | CC BY-SA 3.0 | null | 2008-08-26T16:46:47.437 | 2015-12-22T07:15:20.500 | 2015-12-22T07:15:20.500 | 4,169,569 | 2,985 | null |
28,586 | 2 | null | 28,526 | 0 | null | I think its VS2008 I am having all sorts of wierd things happen with it but im running xp. Not to the degree that you say where it is messing with volume controls. My wierd things are in VS2008. For example I place a gridview on page 1 go to page 2 then back to page 1 and my gridview will have moved.. Its just buggy.. ... | null | CC BY-SA 2.5 | null | 2008-08-26T16:51:51.980 | 2008-08-26T16:51:51.980 | null | null | 1,925 | null |
28,583 | 2 | null | 28,578 | 3 | null | You can move the files around in StarTeam also. Then merge after that.
Whatever you do, make sure you don't delete the files and re-add in StarTeam. You'll lose the file history if you do that.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:51:30.157 | 2008-08-26T16:51:30.157 | null | null | 1,453 | null |
28,578 | 1 | 28,583 | null | 2 | 895 | I'm in the process of refactoring some code which includes moving folders around, and I would like to regularly merge to keep things current. What is the best way to merge after I've moved folders around in my working copy?
| How can I merge my files when the folder structure has changed using Borland StarTeam? | CC BY-SA 2.5 | null | 2008-08-26T16:48:51.113 | 2008-09-17T12:53:23.727 | null | null | 327 | [
"version-control",
"refactoring",
"merge",
"starteam"
] |
28,580 | 2 | null | 28,559 | 1 | null | If you need to do this more than once, the pythonic way would use an iterator
```
for x in iternext():
do_something_with_x
```
where `iternext` would be defined using something like
([explicit is better than implicit!](http://www.python.org/dev/peps/pep-0020/)):
```
def iternext():
x = next()
while x !=... | null | CC BY-SA 2.5 | null | 2008-08-26T16:49:52.623 | 2008-08-26T18:27:23.403 | 2008-08-26T18:27:23.420 | 3,002 | 3,002 | null |
28,592 | 2 | null | 14,552 | 0 | null | I seem to remeber having a similar problem a long time ago, the problem was related to accessing the smtp server to despatch the reports and was resolved by applying a patch to the server.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:54:20.163 | 2008-08-26T16:54:20.163 | null | null | 2,985 | null |
28,591 | 2 | null | 28,578 | 3 | null | Moving the files in StarTeam and then updating your project/solution is the cleaner way to go. I would also suggest creating a view label prior to doing anything so you have a definite "roll back" point if things go wrong :)
| null | CC BY-SA 2.5 | null | 2008-08-26T16:53:58.497 | 2008-08-26T16:53:58.497 | null | null | null | null |
28,590 | 1 | 28,614 | null | 5 | 11,316 | A discussion about Singletons in has me thinking about this issue more and more. Most people instruct that you shouldn't make a bunch of DB connections in one request, and I'm just curious as to what your reasoning is. My first thought is the expense to your script of making that many requests to the DB, but then I co... | Why is it bad practice to make multiple database connections in one request? | CC BY-SA 3.0 | 0 | 2008-08-26T16:53:53.567 | 2015-04-17T18:10:00.977 | 2015-04-17T18:10:00.977 | 1,215,724 | 1,344 | [
"database",
"resources",
"database-connection"
] |
28,594 | 2 | null | 28,538 | 3 | null | You could use the [Outbound dependencies](http://depfind.sourceforge.net/Manual.html#ShowingOnlyOutboundDependencies) feature of [DependencyFinder](http://depfind.sourceforge.net/). You can do that entirely in the GUI, or in command line exporting XML.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:54:45.170 | 2008-08-26T16:54:45.170 | null | null | 3,069 | null |
28,573 | 2 | null | 22,358 | 534 | null | It's certainly possible to develop on a Windows machine, in fact, my first application was exclusively developed on the old Dell Precision I had at the time :)
There are three routes;
1. Install OSx86 (aka iATKOS / Kalyway) on a second partition/disk and dual boot.
2. Run Mac OS X Server under VMWare (Mac OS X 10.7 (L... | null | CC BY-SA 4.0 | null | 2008-08-26T16:46:56.733 | 2022-06-27T14:28:57.093 | 2022-06-27T14:28:57.093 | 8,740,349 | 1,043 | null |
28,602 | 2 | null | 28,590 | 0 | null | I would assume that it is because your requests are not being sent asynchronously, since your requests are done iteratively on the server, blocking each time, you have to pay for the overhead of creating a connection each time, when you only have to do it once...
In Flex, all web service calls are automatically called... | null | CC BY-SA 2.5 | null | 2008-08-26T16:58:22.387 | 2008-08-26T16:58:22.387 | null | null | 1,638 | null |
28,599 | 1 | 28,717 | null | 12 | 14,857 | I want to do what myopenid does -- once you've logged, you can click a button that generates you an SSL certificate; the browser then downloads this certificate and stores it. When you later go back to yourid.myopenid.com, your browser can use its stored certificate for authentication so you don't ever need a password... | How do I support SSL Client Certificate authentication? | CC BY-SA 2.5 | 0 | 2008-08-26T16:57:52.293 | 2012-10-30T17:18:47.430 | null | null | 1,190 | [
"ruby-on-rails",
"apache",
"ssl"
] |
28,589 | 2 | null | 12,647 | 148 | null | Use `Scalar::Util::looks_like_number()` which uses the internal Perl C API's looks_like_number() function, which is probably the most efficient way to do this.
Note that the strings "inf" and "infinity" are treated as numbers.
## Example:
```
#!/usr/bin/perl
use warnings;
use strict;
use Scalar::Util qw(looks_li... | null | CC BY-SA 4.0 | null | 2008-08-26T16:53:34.377 | 2018-11-26T14:04:01.130 | 2018-11-26T14:04:01.130 | 2,877,364 | 3,101 | null |
28,577 | 1 | 28,871 | null | 4 | 647 | I need to store products for an e-commerce solution in a database. Each product should have descriptive information, such as name, description etc.
I need any product to be localized to x number of languages.
What I've done so far, is to make any column that should be localized and `nvarchar(MAX)` and then i store an... | Globalization architecture | CC BY-SA 3.0 | 0 | 2008-08-26T16:48:46.963 | 2011-11-28T03:37:39.813 | 2011-11-28T03:37:39.813 | 148 | 2,972 | [
"c#",
"architecture",
"localization",
"globalization"
] |
28,595 | 2 | null | 28,578 | 1 | null | Folders in StarTeam can be renamed to match the filesystem moves by right clicking the folder and going to Properties. If you created new nesting levels, you will have to create those folders normally. If you moved files between existing folders, you can move those in StarTeam by dragging them from the file window on... | null | CC BY-SA 2.5 | null | 2008-08-26T16:55:03.190 | 2008-08-26T16:55:03.190 | null | null | 96 | null |
28,603 | 2 | null | 28,577 | 1 | null | Rob Conery's MVC Storefront webcast series has [a video on this issue](http://blog.wekeroad.com/mvc-storefront/mvcstore-part-5/) (he gets to the database around 5:30). He stores a list of cultures, and then has a Product table for non-localized data and a ProductCultureDetail table for localized text.
| null | CC BY-SA 2.5 | null | 2008-08-26T16:58:31.793 | 2008-08-26T16:58:31.793 | null | null | 2,688 | null |
28,604 | 2 | null | 28,588 | 5 | null | I personnally used [phpMyID](https://siege.org/phpmyid.html) just for StackOverflow. It's a simple two-files PHP script to put somewhere on a subdomain. Of course, it's not as easy as installing a .deb, but since OpenID relies completely on HTTP, I'm not sure it's advisable to install a self-contained server...
| null | CC BY-SA 4.0 | null | 2008-08-26T16:58:58.233 | 2022-05-19T14:40:23.263 | 2022-05-19T14:40:23.263 | 3,069 | 3,069 | null |
28,611 | 2 | null | 28,538 | 0 | null | There's a tool called [JarAnalyzer](http://www.kirkk.com/main/Main/JarAnalyzer) that will give you the dependencies between the jars in a directory. It'll also give you a list of dependencies that don't exist in the directory.
| null | CC BY-SA 2.5 | null | 2008-08-26T17:01:16.420 | 2008-08-26T17:01:16.420 | null | null | 3,098 | null |
28,612 | 2 | null | 28,590 | 1 | null | We access Informix from .NET and use multiple connections. Unless we're starting a transaction on each connection, it often is handled in the connection pool. I know that's very brand-specific, but most(?) database systems' cilent access will pool connections to the best of its ability.
As an aside, we did have a pr... | null | CC BY-SA 2.5 | null | 2008-08-26T17:02:28.850 | 2008-08-26T17:02:28.850 | null | null | 2,009 | null |
28,606 | 2 | null | 28,577 | 1 | null | resource files
| null | CC BY-SA 2.5 | null | 2008-08-26T16:59:21.620 | 2008-08-26T16:59:21.620 | null | null | null | null |
28,597 | 2 | null | 28,590 | 4 | null | It is the cost of setting up the connection, transferring the data and then tearing it down. It will eat up your performance.
Evidence is harder to come by but consider the following...
Let's say it takes x microseconds to make a connection.
Now you want to make several requests and get data back and forth. Let's... | null | CC BY-SA 2.5 | null | 2008-08-26T16:56:22.203 | 2008-08-26T16:56:22.203 | null | null | 2,894 | null |
28,608 | 2 | null | 28,590 | 2 | null | Setting up a DB connection is usually quite heavy. A lot of things are going on backstage .
I've had an issue once with some weird DNS configuration that made every TCP connection took a few seconds before going up. My login procedure (because of a complex architecture) took 3 different DB connections to complete. Wit... | null | CC BY-SA 2.5 | null | 2008-08-26T16:59:49.747 | 2008-08-26T16:59:49.747 | null | null | 1,508 | null |
28,605 | 1 | 28,618 | null | 23 | 60,992 | I'm trying to learn C. As a C# developer, my IDE is Visual Studio. I've heard this is a good environment for C/C++ development. However, it seems no matter what little thing I try to do, intuition fails me. Can someone give good resources for how to either:
- -
---
See also: [https://stackoverflow.com/questions... | C on Visual Studio | CC BY-SA 2.5 | 0 | 2008-08-26T16:59:00.107 | 2012-04-27T08:04:43.927 | 2017-05-23T11:54:57.007 | -1 | 356 | [
"c++",
"c",
"ide",
"compiler-construction"
] |
28,614 | 2 | null | 28,590 | 10 | null | Database connections are a limited resource. Some DBs have a very low connection limit, and wasting connections is a major problem. By consuming many connections, you may be blocking others for using the database.
Additionally, throwing a ton of extra connections at the DB doesn't help anything unless there are reso... | null | CC BY-SA 2.5 | null | 2008-08-26T17:03:06.273 | 2008-08-26T17:03:06.273 | null | null | 872 | null |
28,617 | 2 | null | 28,605 | 1 | null | Some people say that a smaller IDE is better for learning. Take a look at [Code::Blocks](http://www.codeblocks.org/). It's generally true that beginning C in an IDE is hard because not many books explain enough to control the IDE. Perhaps starting in a console and a basic text editor with syntax highlighting would be b... | null | CC BY-SA 2.5 | null | 2008-08-26T17:03:36.867 | 2008-08-26T17:10:24.620 | 2008-08-26T17:10:24.620 | 1,968 | 1,968 | null |
28,607 | 1 | null | null | 4 | 927 | I have a problem with my Visual Studio installation. When I got an exception I always have incorrect line numbers in it's stack trace. There are always point to last line of each method in my codebase. At the same time it's OK when I'm tracing programs with debugger. What's happed with PDBs?
No, I'm not re-throwing ex... | Why do my exception stack traces always point to the last method line? | CC BY-SA 2.5 | 0 | 2008-08-26T16:59:48.607 | 2008-09-22T13:26:44.593 | 2008-09-22T02:13:37.597 | 2,193 | 2,313 | [
"c#",
".net",
"visual-studio",
"exception",
"stack-trace"
] |
28,620 | 2 | null | 28,464 | 0 | null | Another item I wrestle with is Where do you take your dependency on StructureMap? Only in the startup application? Does that mean all the implementations have to be handed all the way down from the top-most layer to the bottom-most layer?
| null | CC BY-SA 2.5 | null | 2008-08-26T17:04:09.423 | 2008-08-26T17:04:09.423 | null | null | 470 | null |
28,588 | 1 | 28,604 | null | 14 | 12,292 | I want to log onto Stack Overflow using OpenID, but I thought I'd set up my own OpenID provider, just because it's harder :) How do you do this in Ubuntu?
Edit: Replacing 'server' with the correct term OpenID provider (Identity provider would also be correct according to [wikipedia](http://en.wikipedia.org/wiki/Openid... | How do you set up an OpenID provider (server) in Ubuntu? | CC BY-SA 2.5 | 0 | 2008-08-26T16:53:12.740 | 2022-05-19T14:40:23.263 | 2009-04-08T19:30:17.677 | 2,284 | 3,102 | [
"linux",
"ubuntu",
"openid"
] |
28,626 | 2 | null | 8,830 | 0 | null | If it's not in the dictionary, probably not.
| null | CC BY-SA 2.5 | null | 2008-08-26T17:05:34.910 | 2008-08-26T17:05:34.910 | null | null | 1,565 | null |
28,627 | 2 | null | 28,605 | 1 | null | [http://xoax.net/comp/cpp/console/Lesson0.php](http://xoax.net/comp/cpp/console/Lesson0.php)
Any use?
| null | CC BY-SA 2.5 | null | 2008-08-26T17:05:35.067 | 2008-08-26T17:05:35.067 | null | null | 832 | null |
28,618 | 2 | null | 28,605 | 11 | null | Answering the purely subject question "recommend me a better C IDE and compiler" I find [Ming32w and Code::blocks (now with combined installer)](http://www.codeblocks.org/) very useful on windows but YMMV as you are obviously used to the MS IDE and are just struggling with C.
May I suggest you concentrate on console a... | null | CC BY-SA 2.5 | null | 2008-08-26T17:03:41.390 | 2008-08-26T17:03:41.390 | null | null | 269 | null |
28,621 | 2 | null | 28,605 | 9 | null | Simple and sweet: Console applications (basic C programs using printf and such) are easily and cheaply done with the Tiny C Compiler - a no frills, no gui, complete C complier.
[http://bellard.org/tcc/](http://bellard.org/tcc/)
However, C development is relatively simple on Visual Studio as well. The following inst... | null | CC BY-SA 2.5 | null | 2008-08-26T17:04:10.517 | 2009-02-11T13:01:41.153 | 2009-02-11T13:01:41.153 | 2,915 | 2,915 | null |
28,634 | 2 | null | 28,605 | 12 | null | The problem with learning C within Visual Studio is that you are compiling C using the Visual Studio C++ compiler. You might want to try learning C using the GNU [GCC](http://gcc.gnu.org/) compiler from within the [Cygwin](http://www.cygwin.com/) environment in Windows.
| null | CC BY-SA 2.5 | null | 2008-08-26T17:09:02.297 | 2008-08-26T17:16:56.663 | 2008-08-26T17:16:56.663 | 390 | 390 | null |
28,619 | 2 | null | 28,605 | 3 | null | Bloodshed Dev-C++ is the best windows C/C++ IDE IMO: [http://www.bloodshed.net/](http://www.bloodshed.net/)
It uses the GNU compiler set and is free as in beer.
EDIT: the download page for the IDE is here: [http://www.bloodshed.net/dev/devcpp.html](http://www.bloodshed.net/dev/devcpp.html)
| null | CC BY-SA 2.5 | null | 2008-08-26T17:03:48.067 | 2008-08-26T17:03:48.067 | null | null | 1,638 | null |
28,625 | 2 | null | 27,095 | 0 | null | > 2^64 is not the maximum value of a double. 2^64 is the number of unique values that a double (or any other 64-bit type) can hold. Double.MaxValue is equal to 1.79769313486232e308.
Not even; the IEEE encodings use multiple encodings for the same values. Specifically, NaN is represented by an exponent of all-bits-1, ... | null | CC BY-SA 2.5 | null | 2008-08-26T17:04:32.013 | 2008-08-26T17:04:32.013 | null | null | 2,131 | null |
28,646 | 2 | null | 28,637 | 18 | null | The [stopwatch](http://cplus.about.com/od/howtodothingsinc/a/timing.htm) functionality would be better (higher precision). I'd also recommend just downloading one of the popular profilers, though ([DotTrace](http://www.jetbrains.com/profiler/) and [ANTS](http://www.red-gate.com/products/ants_profiler/index.htm) are th... | null | CC BY-SA 2.5 | null | 2008-08-26T17:13:21.477 | 2008-08-26T17:13:21.477 | null | null | 1,432 | null |
28,628 | 2 | null | 21,669 | 3 | null | To delve into theprise's answer, for the construction of the automaton, O(2^m) is the worst case, though it really depends on the form of the regular expression (for a very simple one that matches a word, it's in O(m), using for example the [Knuth-Morris-Pratt algorithm](http://en.wikipedia.org/wiki/Knuth%E2%80%93Morri... | null | CC BY-SA 2.5 | null | 2008-08-26T17:06:14.583 | 2008-08-26T17:06:14.583 | null | null | 2,638 | null |
28,649 | 2 | null | 28,637 | 14 | null | Use the System.Diagnostics.Stopwatch class.
```
Stopwatch sw = new Stopwatch();
sw.Start();
// Do some code.
sw.Stop();
// sw.ElapsedMilliseconds = the time your "do some code" took.
```
| null | CC BY-SA 2.5 | null | 2008-08-26T17:13:59.447 | 2008-08-26T17:13:59.447 | null | null | 2,536 | null |
28,629 | 2 | null | 11,574 | 1 | null | The problem is almost certainly the select. Is there anyway you could extract all the text at once then iterate over internal variables?
| null | CC BY-SA 2.5 | null | 2008-08-26T17:07:13.487 | 2008-12-27T15:56:40.447 | null | null | 1,565 | null |
28,651 | 2 | null | 28,542 | 1 | null | I'm darned if I can find a reference at the moment, but I'm 99% sure that you always supposed to be able to take the address of an argument, and it's up to the compiler to finesse the details of calling conventions, register usage, etc.
Indeed, I would have thought it to be such a common requirement that it's hard to... | null | CC BY-SA 2.5 | null | 2008-08-26T17:14:17.697 | 2008-08-26T17:14:17.697 | null | null | 987 | null |
28,642 | 1 | 28,715 | null | 7 | 2,487 | Having a heckuva time with this one, though I feel I'm missing something obvious. I have a control that inherits from `System.Web.UI.WebControls.Button`, and then implements an interface that I have set up. So think...
```
public class Button : System.Web.UI.WebControls.Button, IMyButtonInterface { ... }
```
In the ... | Finding controls that use a certain interface in ASP.NET | CC BY-SA 3.0 | null | 2008-08-26T17:11:41.603 | 2015-09-06T13:40:05.963 | 2015-09-06T13:03:44.663 | 2,002,471 | 1,212 | [
"c#",
"asp.net"
] |
28,653 | 2 | null | 28,637 | 4 | null | I've done very little of this sort of performance checking (I tend to just think "this is slow, make it faster") so I have pretty much always gone with this.
A google does reveal a lot of resources/articles for performance checking.
Many mention using pinvoke to get performance information. A lot of the materials I stu... | null | CC BY-SA 2.5 | null | 2008-08-26T17:14:44.170 | 2008-08-26T17:14:44.170 | 2020-06-20T09:12:55.060 | -1 | 832 | null |
28,637 | 1 | 28,648 | null | 493 | 73,199 | I need to find a bottleneck and need to accurately as possible measure time.
Is the following code snippet the best way to measure the performance?
```
DateTime startTime = DateTime.Now;
// Some execution process
DateTime endTime = DateTime.Now;
TimeSpan totalTimeTaken = endTime.Subtract(startTime);
```
| Is DateTime.Now the best way to measure a function's performance? | CC BY-SA 3.0 | 0 | 2008-08-26T17:09:45.417 | 2020-10-21T17:46:26.337 | 2011-12-21T20:36:54.543 | 63,550 | 2,469 | [
"c#",
".net",
"performance",
"datetime",
"timer"
] |
28,655 | 2 | null | 28,202 | 0 | null | > I used to do exactly the same thing.... then I switched to maven.
Oh, it's Maven 2. I was afraid that someone was still seriously using Maven nowadays. Leaving the jokes aside: if you decide to switch to Maven 2, you have to take care while looking for information, because Maven 2 is a complete reimplementation of M... | null | CC BY-SA 2.5 | null | 2008-08-26T17:14:57.993 | 2008-08-26T17:14:57.993 | null | null | 3,069 | null |
28,654 | 1 | 28,667 | null | 1 | 2,086 | I have a web service that I created in C# and a test harness that was provided by my client. Unfortunately my web service doesn't seem to be parsing the objects created by the test harness. I believe the problem lies with serializing the soap packet.
Using TCPTrace I was able to get the soap packet passed to the web ... | Debugging Web Service with SOAP Packet | CC BY-SA 3.0 | null | 2008-08-26T17:14:55.467 | 2015-11-20T11:37:58.943 | 2015-11-20T11:37:58.943 | 3,218,692 | 1,076 | [
"c#",
"web-services",
"soap",
"tcptrace-pocketsoap"
] |
28,652 | 1 | null | null | 31 | 5,298 | What Windows code editors allow the use of [elastic tabstops](https://en.wikipedia.org/wiki/Tab_stop#Elastic_tabstops), either natively or through a plugin?
I know about a gedit plugin, but it only works on Linux.
| Elastic tabstop editors and plugins | CC BY-SA 4.0 | 0 | 2008-08-26T17:14:23.033 | 2018-09-11T09:00:37.447 | 2018-09-11T09:00:37.447 | 266,309 | 2,118 | [
"editor",
"tabs"
] |
28,657 | 2 | null | 28,637 | 94 | null | If you want something quick and dirty I would suggest using Stopwatch instead for a greater degree of precision.
```
Stopwatch sw = new Stopwatch();
sw.Start();
// Do Work
sw.Stop();
Console.WriteLine("Elapsed time: {0}", sw.Elapsed.TotalMilliseconds);
```
Alternatively, if you need something a little more sophis... | null | CC BY-SA 3.0 | null | 2008-08-26T17:15:20.723 | 2012-04-02T14:08:39.930 | 2012-04-02T14:08:39.930 | 1,141,063 | 2,635 | null |
28,648 | 2 | null | 28,637 | 669 | null | No, it's not. Use the [Stopwatch](http://msdn2.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx) (in `System.Diagnostics`)
```
Stopwatch sw = Stopwatch.StartNew();
PerformWork();
sw.Stop();
Console.WriteLine("Time taken: {0}ms", sw.Elapsed.TotalMilliseconds);
```
Stopwatch automatically checks for the ... | null | CC BY-SA 3.0 | null | 2008-08-26T17:13:32.240 | 2011-12-21T20:33:12.117 | 2011-12-21T20:33:12.117 | 63,550 | 2,114 | null |
28,661 | 2 | null | 28,605 | 3 | null | As already said, you should check out the VS.net C++ edition, but if you'd like to try something else Eclipse has a C++ edition. You can get more info from [http://eclipse.org](http://eclipse.org) or check out the distro at [http://www.easyeclipse.org/site/distributions/cplusplus.html](http://www.easyeclipse.org/site/... | null | CC BY-SA 2.5 | null | 2008-08-26T17:17:26.333 | 2008-08-26T17:17:26.333 | null | null | 3,030 | null |
28,659 | 2 | null | 27,294 | 2 | null | @Tim, I ended up using a simplified version of your approach and ChanChans, Here is the code:
```
public class TaskFactory
{
private Dictionary<String, Type> _taskTypes = new Dictionary<String, Type>();
public TaskFactory()
{
// Preload the Task Types into a dictionary so we ca... | null | CC BY-SA 2.5 | null | 2008-08-26T17:17:05.040 | 2008-08-26T17:17:05.040 | null | null | 1,965 | null |
28,664 | 1 | 28,687 | null | 5 | 1,307 | Right now, I'm particularly interested in reading the data from MP3 files (ID3 tags?), but the more it can do (eg EXIF from images?) the better without compromising the ID3 tag reading abilities.
I'm interested in making a script that goes through my media (right now, my music files) and makes sure the file name and d... | What is the best/a very good meta-data reader library? | CC BY-SA 2.5 | 0 | 2008-08-26T17:18:21.433 | 2013-02-08T16:32:42.080 | 2017-05-23T12:33:27.093 | -1 | 572 | [
"metadata"
] |
28,635 | 2 | null | 27,492 | 3 | null | I would add another rule here:
-
We have found that programmers who are new to C++, or programmers coming over from languages like Java, seem to learn about new and then obsessively use it whenever they want to create any object, regardless of the context. This is especially pernicious when an object is created loca... | null | CC BY-SA 2.5 | null | 2008-08-26T17:09:03.797 | 2008-08-26T17:09:03.797 | null | null | 1,236 | null |