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
16,875
2
null
16,861
0
null
If you are using a framework like [django](http://www.djangoproject.com/), the framework can easily do this for you using standard filters. In fact, I'm pretty sure django automatically does it unless you tell it not to. Otherwise, I would recommend using some sort of regex validation before accepting inputs from for...
null
CC BY-SA 2.5
null
2008-08-19T20:24:18.140
2008-08-19T20:24:18.140
null
null
92
null
16,883
2
null
16,829
1
null
> What about external dependencies such a the AJAXTookit or some other 3rd party extension that's used on several projects? Source control is for source code, not binaries. Keep any 3rd party assemblies/jars in a separate repository. If you're working in the Java world try something like Maven or Ivy. For .Net proj...
null
CC BY-SA 2.5
null
2008-08-19T20:29:42.950
2008-08-19T20:29:42.950
null
null
1,247
null
16,884
2
null
16,804
9
null
Having experiences with both (CR and SSRS) here is the lowdown of what I think: CR lets you develop a report very fast. As long as its simple. If it gets slightly complicated, it gets fishy trying to make it do what you want. Per example you are limited to a max hierarchy of 2 subreports. It gets weird when you have s...
null
CC BY-SA 2.5
null
2008-08-19T20:30:25.570
2008-08-19T20:30:25.570
null
null
1,165,587
null
16,890
2
null
15,632
0
null
I had the exact same problem, and this article helped me clean up all the related files from my system and do a fresh install of both Visual Studio and the SQL client components. Give it a try and let me know if it helps you out: [http://support.citrix.com/article/CTX115270](http://support.citrix.com/article/CTX115270...
null
CC BY-SA 2.5
null
2008-08-19T20:32:16.283
2008-08-19T20:32:16.283
null
null
1,284
null
16,887
2
null
16,413
92
null
I think outsourcing the problem is the best bet: send it to the Google (or Yahoo) geocoder. The geocoder returns not only the lat/long (which aren't of interest here), but also a rich parsing of the address, with fields filled in that you didn't send (including ZIP+4 and county). For example, parsing "1600 Amphitheat...
null
CC BY-SA 2.5
null
2008-08-19T20:30:52.027
2008-08-19T20:30:52.027
null
null
1,190
null
16,881
2
null
16,860
3
null
The so-called [xUnit](http://en.wikipedia.org/wiki/XUnit) framework is widely used. It was originally developed for Smalltalk as SUnit, evolved into JUnit for Java, and now has many other implementations such as NUnit for .Net. It's almost a de facto standard - if you say you're using unit tests, a majority of other de...
null
CC BY-SA 2.5
null
2008-08-19T20:29:23.607
2008-08-19T20:29:23.607
null
null
893
null
16,870
2
null
16,832
14
null
You can use [assembla.com](http://www.assembla.com/home) to host your project. They offer subversion, git and mercurial hosting. I personally use their subversion hosting for a free and private one-man project. As an added bonus, you also get a wiki and a ticketing system. Which can help you manage your stuff. And the...
null
CC BY-SA 3.0
null
2008-08-19T20:22:49.097
2012-03-31T11:00:25.147
2012-03-31T11:00:25.147
512,251
2,011
null
16,892
2
null
16,873
1
null
Historically 33 seems like a popular choice, and it tends to work pretty well. No one knows why though. For more details, [look here](http://www.cse.yorku.ca/~oz/hash.html)
null
CC BY-SA 3.0
null
2008-08-19T20:33:11.040
2013-01-23T04:55:14.290
2013-01-23T04:55:14.290
1,410,342
2,018
null
16,817
2
null
16,140
41
null
Well, since you can not have one part OSGi and one part non-OSGi you'll need to make your entire app OSGi. In its simplest form you make a single OSGi bundle out of your entire application. Clearly this is not a best practice but it can be useful to get a feel for deploying a bundle in an OSGi container (Equinox, Felix...
null
CC BY-SA 3.0
null
2008-08-19T19:51:39.143
2013-11-27T18:30:59.863
2013-11-27T18:30:59.863
325,742
1,996
null
16,893
2
null
16,860
3
null
A great resource for 'best practices' is the [Google Testing Blog](http://googletesting.blogspot.com/), for example a recent post on [Writing Testable Code](http://googletesting.blogspot.com/2008/08/by-miko-hevery-so-you-decided-to.html) is a fantastic resource. Specifically their 'Testing on the Toilet' series weekly ...
null
CC BY-SA 2.5
null
2008-08-19T20:33:16.203
2008-08-19T20:33:16.203
null
null
1,611
null
16,891
1
17,187
null
9
2,117
As you may know, in `VS 2008` + brings up a nifty navigator window with a thumbnail of each file. I love it, but there is one tiny thing that is annoying to me about this feature: . When doing an + in windows, you can hit tab to get to the item you want (while still holding down the key), and then when you find what y...
VS 2008 - ctrl-tab behavior
CC BY-SA 3.0
0
2008-08-19T20:32:42.413
2018-06-27T02:47:26.067
2015-07-17T10:46:00.583
2,901,002
1,789
[ "visual-studio-2008", "ide", "keyboard-shortcuts" ]
16,897
1
17,642
null
9
5,834
In the company that i work, we develop all the GUI in C#, but the application kernel is mainly developed in Delphi 5 (for historical reasons), with a lot of components made in COM+. Related to this very specific sort of application a I two questions: - Experienced guys in Delphi and/or COM, do you have any workrounds ...
Delphi and COM: TLB and maintenance issues
CC BY-SA 3.0
0
2008-08-19T20:34:13.177
2015-11-20T11:40:18.913
2015-11-20T11:40:18.913
3,218,692
2,015
[ "delphi", "com", "typelib", "com-hell" ]
16,895
2
null
16,792
7
null
The problem that seems to catch a lot of people, is that you can create a table that by definition would hold more than 8K of data, and it will accept it just fine. And the table will work fine, up until the point you actually try to insert more than 8K of data into the table. So, let's say you create a table with ...
null
CC BY-SA 2.5
null
2008-08-19T20:33:35.097
2008-08-19T20:33:35.097
null
null
1,862
null
16,886
2
null
16,832
9
null
Have a look at the [Mercurial](http://www.selenic.com/mercurial/wiki/index.cgi/Mercurial) Project an open source distributed source control system. There is a [tortise](http://tortoisehg.sourceforge.net/) and an [eclipse](http://www.vectrace.com/mercurialeclipse/) plugin but nothing for visual studio plugin that I know...
null
CC BY-SA 2.5
null
2008-08-19T20:30:31.403
2009-02-23T14:21:55.717
2009-02-23T14:21:55.717
49,018
1,464
null
16,906
2
null
16,891
1
null
Strange. My VS2008SP1 install exhibits your desired behavior (in a web application project). I do not recall making any explicit changes.
null
CC BY-SA 2.5
null
2008-08-19T20:36:27.507
2008-08-19T20:36:27.507
null
null
1,960
null
16,903
2
null
16,873
3
null
You want to use something that is relatively prime to the size of your set. That way, when you loop around, you won't end up on the same numbers you just tried.
null
CC BY-SA 2.5
null
2008-08-19T20:36:07.493
2008-08-19T20:36:07.493
null
null
55
null
16,894
2
null
16,860
22
null
Ok here's some best practices from some one who doesn't unit test as much as he should...cough. 1. Make sure your tests test one thing and one thing only. 2. Write unit tests as you go. Preferably before you write the code you are testing against. 3. Do not unit test the GUI. 4. Separate your concerns. 5. Minimise th...
null
CC BY-SA 3.0
null
2008-08-19T20:33:28.263
2012-07-20T11:39:41.103
2012-07-20T11:39:41.103
12,704
1,116
null
16,882
2
null
3,793
21
null
How about using this "extension" method on XElement? worked for me ! ``` public static string InnerXml(this XElement element) { StringBuilder innerXml = new StringBuilder(); foreach (XNode node in element.Nodes()) { // append node's xml string to innerXml innerXml.Append(node.ToString()); ...
null
CC BY-SA 3.0
null
2008-08-19T20:29:41.767
2016-02-07T17:40:51.883
2016-02-07T17:40:51.883
2,921,691
1,747
null
16,908
2
null
16,873
2
null
I had an interesting discussion with a coworker about hash function recently. Our conclusions were as follows: If you really need to write a good hash function that minimizes collisions more than the default implementations available in the standard languages you need an advanced degree in mathematics. If you're wri...
null
CC BY-SA 2.5
null
2008-08-19T20:37:40.703
2008-08-19T20:37:40.703
null
null
1,247
null
16,921
2
null
15,880
6
null
Microsoft has documented this: [.MSG File Format Specification](http://msdn.microsoft.com/en-us/library/cc463912.aspx)
null
CC BY-SA 2.5
null
2008-08-19T20:45:55.757
2009-06-10T22:26:12.443
2009-06-10T22:26:12.443
811
1,854
null
16,898
2
null
8,398
0
null
You can set a breakpoint within JavaScript in Visual Studio 2005, but in addition to debugging needing to be enabled in Internet Explorer, you can only set the breakpoint in a .js file. You cannot debug any inline JavaScript code. I also sometimes have problems when trying to debug my JavaScript code when using the a...
null
CC BY-SA 3.0
null
2008-08-19T20:35:09.743
2012-11-01T20:16:55.997
2012-11-01T20:16:55.997
63,550
288
null
16,924
2
null
16,918
2
null
This is where I started. [haskell.org](http://www.haskell.org/haskellwiki/Category:Tutorials)
null
CC BY-SA 2.5
null
2008-08-19T20:48:11.527
2008-08-19T20:48:11.527
null
null
1,940
null
16,915
2
null
16,829
10
null
We practice highly componentised development using Java, we have about 250 modules in trunk that have independent life cycles. Dependencies are managed through Maven (that's a best practice right there), every iteration (bi-weekly) actively developed modules get tagged with a new version. 3 digit version numbers with s...
null
CC BY-SA 2.5
null
2008-08-19T20:43:39.897
2009-06-24T07:00:15.913
2009-06-24T07:00:15.913
1,996
1,996
null
16,922
2
null
16,557
2
null
@David Schlosnagle [mentions](https://stackoverflow.com/questions/16557/overiding-the-equals-method-vs-creating-a-new-method#16591) mentions Josh Bloch's [Effective Java](https://rads.stackoverflow.com/amzn/click/com/0321356683) -- this is a for any Java developer. There is a related issue: for immutable value object...
null
CC BY-SA 2.5
null
2008-08-19T20:46:45.007
2008-08-19T20:46:45.007
2017-05-23T11:46:50.607
-1
1,190
null
16,911
2
null
16,829
6
null
For my projects, I always use this structure. > - - - - - - - - - - - - - - - - - - - My solution file gets placed right under the trunk directory along with my build files.
null
CC BY-SA 2.5
null
2008-08-19T20:39:42.103
2008-08-19T20:39:42.103
null
null
1,117
null
16,933
2
null
16,770
9
null
Haskell's datatypes are called "algebraic" because of their connection to [categorical initial algebras](http://en.wikipedia.org/wiki/Initial_algebra). But that way lies madness. @olliej: ADTs are actually "sum" types. Tuples are products.
null
CC BY-SA 2.5
null
2008-08-19T20:53:36.477
2008-08-19T20:53:36.477
null
null
1,412
null
16,926
1
330,236
null
20
2,357
My HTML is all marked up, ready to make it rain CSS. The problem is that I have to go back and find out what all my id and class names are so I can get started. What I need is a tool that parses my HTML and spits out a stylesheet with all the possible elements ready to be styled (maybe even with some defaults). Does...
Tool for generating CSS skeleton?
CC BY-SA 2.5
0
2008-08-19T20:49:47.967
2021-04-20T12:46:09.247
null
null
744
[ "css", "markup" ]
16,929
2
null
16,861
6
null
Jeff Atwood himself described how StackOverflow.com sanitizes user input (in non-language-specific terms) on the Stack Overflow blog: [https://blog.stackoverflow.com/2008/06/safe-html-and-xss/](https://blog.stackoverflow.com/2008/06/safe-html-and-xss/) However, as Justin points out, if you use Django templates or somet...
null
CC BY-SA 4.0
null
2008-08-19T20:51:39.520
2008-08-30T17:13:09.853
2021-01-18T12:38:11.483
-1
1,694
null
16,940
1
null
null
1
641
Admittedly this might not be a problem on larger screens, but my employer is abit tight and refuses to buy monitors larger than 19inch, this means that I dont have much screen real estate to view all the Visual Studio windows and my code at the same time, or two pieces of code at once. Is there anything that allows me ...
VS 2008 - Detachable code tabs
CC BY-SA 2.5
null
2008-08-19T20:57:28.900
2015-06-30T14:01:14.287
2008-11-02T02:21:40.470
null
230
[ "visual-studio-2008" ]
16,935
1
19,782
null
6
9,181
I'm trying to compile over 100 java classes from different packages from a clean directory (no incremental compiles) using the following ant tasks: ``` <target name="-main-src-depend"> <depend srcdir="${src.dir}" destdir="${bin.dir}" cache="${cache.dir}" closure="true"/> </tar...
Ant's <javac> tasks throws StackOverflowException
CC BY-SA 2.5
null
2008-08-19T20:53:53.417
2021-04-05T19:02:30.063
2009-06-25T18:24:46.607
2,024
2,024
[ "java", "ant" ]
16,918
1
16,951
null
122
22,033
I've been looking for a decent guide to Haskell for some time, but haven't been able to find one that seems interesting enough to read through and/or makes sense. I've had prior exposure to Haskell a few years back, but I can't remember much about it. I remember the "Aha!"-feeling was incredible when I finally got it,...
Beginners Guide to Haskell?
CC BY-SA 2.5
0
2008-08-19T20:44:48.897
2021-05-17T11:04:45.050
2008-08-23T14:48:44.437
2,134
2,018
[ "haskell", "functional-programming" ]
16,943
2
null
16,940
1
null
You can right click on the tab strip and insert a new vertical (or horizontal) tab group. This allows you to view multiple tabs at the same time.
null
CC BY-SA 2.5
null
2008-08-19T20:59:28.570
2008-08-19T20:59:28.570
null
null
380
null
16,948
2
null
16,829
2
null
I can appreciate the logic of not putting binaries in the repository but I think there is a huge advantage too. If you want to be able to pull a specific revision out from the past (usually an older tag) I like being able to have everything I need come from the svn checkout. Of course this doesn't include Visual Studio...
null
CC BY-SA 2.5
null
2008-08-19T21:02:49.420
2008-08-19T21:02:49.420
null
null
748
null
16,944
2
null
16,815
4
null
By the way you can use > $_REQUEST['destroy'] which would work regardless if the data is passed in a POST or a GET request.
null
CC BY-SA 2.5
null
2008-08-19T21:00:08.130
2008-08-19T21:00:08.130
null
null
238
null
16,939
1
16,967
null
22
15,345
I am reading a binary file into a parsing program. I will need to iterate through the file and look for certain markers so I can split the file up and pass those parts into their respective object’s constructors. Is there an advantage to holding the file as a stream, either MemoryStream or FileStream, or should it be...
Difference between a byte array and MemoryStream
CC BY-SA 2.5
0
2008-08-19T20:57:24.783
2013-05-17T02:11:05.190
null
null
1,048
[ "performance", "comparison" ]
16,945
1
null
null
0
913
I would like to rename files and folders recursively by applying a string replacement operation. E.g. The word "shark" in files and folders should be replaced by the word "orca". `C:\Program Files\Shark Tools\Wire Shark\Sharky 10\Shark.exe` should be moved to: `C:\Program Files\Orca Tools\Wire Orca\Orcay 10\Orca.e...
What is the best way to rename (move) file system branches in .NET?
CC BY-SA 4.0
null
2008-08-19T21:00:37.943
2018-10-04T06:58:46.053
2018-10-04T06:58:46.053
7,932,059
null
[ "file", "directory", "system.io.fileinfo" ]
16,954
2
null
16,940
0
null
Hmm.. I don't think there is a way from within Visual Studio. For maximizing real estate and working on simultaneous files, I use that method plus viewing the files on Full Screen mode. Do you multiple monitors?
null
CC BY-SA 2.5
null
2008-08-19T21:04:54.377
2008-08-19T21:04:54.377
null
null
380
null
16,958
2
null
16,940
1
null
You could stretch visual studio across both monitors then put two code windows next to each other. Basically, you are manually maximizing VS across both screens.
null
CC BY-SA 3.0
null
2008-08-19T21:08:18.847
2015-06-30T14:01:14.287
2015-06-30T14:01:14.287
2,442,804
1,048
null
16,962
2
null
15,366
2
null
It is not recommended that you rely on sessions for authentication without taking additional actions. [Read more on](http://shiflett.org/articles/the-truth-about-sessions).
null
CC BY-SA 3.0
null
2008-08-19T21:09:28.860
2013-01-23T04:56:22.310
2013-01-23T04:56:22.310
1,410,342
1,993
null
16,953
2
null
16,935
1
null
Does this happen when you run the javac command from the command line? You might want to try the [fork](http://ant.apache.org/manual/Tasks/javac.html) attribute.
null
CC BY-SA 2.5
null
2008-08-19T21:04:42.723
2011-01-26T00:13:33.673
2011-01-26T00:13:33.673
183,172
304
null
16,919
2
null
16,860
0
null
NUnit is a good tool for any of the .NET languages. Unit tests can be used in a number of ways: 1. Test Logic 2. Increase separation of code units. If you can't fully test a function or section of code, then the parts that make it up are too interdependant. 3. Drive development, some people write tests before they ...
null
CC BY-SA 2.5
null
2008-08-19T20:44:56.400
2008-08-19T20:44:56.400
null
null
1,470
null
16,914
2
null
15,478
3
null
It appears that this is a known bug... The following code appears to function as you requested: ``` protected override void OnPaint(PaintEventArgs e) { PointF[] points = new PointF[] { new PointF(73.36f, 196), new PointF(75.44f, 32), new PointF(77.52f, 32), new PointF(79.6f, ...
null
CC BY-SA 2.5
null
2008-08-19T20:43:20.257
2008-09-23T12:39:47.757
2008-09-23T12:39:47.757
1,816
1,816
null
16,963
1
null
null
8
7,734
Curious if others feel the same as me. To me, controls such as datagrid/gridview/formview/etc. are great for presentations or demo's only. To take the time and tweak this controls, override their default behavior (hooking into their silly events etc.) is a big headache. The only control that I use is the repeater, si...
Who actually uses DataGrid/GridView/FormView/etc in production apps?
CC BY-SA 3.0
0
2008-08-19T21:09:30.780
2017-07-11T01:25:35.947
2017-07-11T01:25:35.947
7,750,640
1,368
[ "asp.net", "data-controls" ]
16,967
2
null
16,939
29
null
A `byte[]` or `MemoryStream` will both require bringing the entire file into memory. A `MemoryStream` is really a wrapper around an underlying byte array. The best approach is to have two `FileStream` (one for input and one for output). Read from the input stream looking for the pattern used to indicate the file should...
null
CC BY-SA 3.0
null
2008-08-19T21:12:20.040
2013-05-17T02:11:05.190
2013-05-17T02:11:05.190
1,012,641
748
null
16,968
2
null
15,390
3
null
In our big javascript applications, we write all our code in small separate files - one file per 'class' or functional group, using a kind-of-like-Java namespacing/directory structure. We then have: - - -
null
CC BY-SA 2.5
null
2008-08-19T21:13:25.123
2008-08-19T21:13:25.123
null
null
588
null
16,964
1
17,024
null
0
2,137
I'm trying to implement something like this: ``` <div> <table> <thead> <tr> <td>Port name</td> <td>Current port version</td> <td>New port version</td> <td>Update</td> </tr> </thead> <% foreach (var ip in...
Creating your own table with CommandArgument buttons in ASP.NET MVC
CC BY-SA 3.0
null
2008-08-19T21:10:47.890
2017-07-10T22:45:16.783
2017-07-10T22:45:16.783
7,750,640
614
[ "asp.net-mvc" ]
16,965
1
null
null
4
2,027
I know this is pretty exotic, but I want to deploy a Ruby web application (not Rails, but Rack based, so it plugs into most Ruby servers just fine) using JRuby. Google and friends give me a few success stories, but mostly rails related and if not, no details on the deployment are provided. The framework I'm using is Ra...
JRuby / Rack deployment
CC BY-SA 2.5
0
2008-08-19T21:11:45.410
2012-02-07T12:26:59.847
2008-08-23T17:25:29.240
2,134
2,018
[ "ruby", "deployment", "web-applications", "jvm", "rack" ]
16,966
2
null
16,963
2
null
I really like the telerik radgrid. Their product ain't cheap, but you get a lot of controls and features. And the data binding support is pretty good, both in a simple asp.net data source binding way and in a more custom handle-your-own-databinding-events kind of way.
null
CC BY-SA 2.5
null
2008-08-19T21:11:47.983
2008-08-19T21:11:47.983
null
null
404
null
16,951
2
null
16,918
50
null
Some good places to start are: - [The Gentle Introduction To Haskell](http://www.cs.auckland.ac.nz/references/haskell/haskell-intro-html/intro.html)- [Problem Solving in Haskell](http://www.cs.kent.ac.uk/people/staff/sjt/Haskell_craft/probSolving.html)- [Happy Learn Haskell Tutorial](http://www.happylearnhaskelltutori...
null
CC BY-SA 3.0
null
2008-08-19T21:04:10.603
2016-05-12T12:02:36.870
2016-05-12T12:02:36.870
2,535,671
1,311
null
16,972
2
null
11,690
1
null
Do note that the alt attribute isn't intended to be a tooltip. Alt is for describing the image where the image itself is not available. If you want to use tooltips, use the title attribute instead.
null
CC BY-SA 2.5
null
2008-08-19T21:15:18.990
2008-08-19T21:15:18.990
null
null
1,993
null
16,971
1
16,977
null
65
76,618
I would like to have a nice template for doing this in development. How do I reset an increment identity's starting value in SQL Server?
How do I reset an increment identity's starting value in SQL Server
CC BY-SA 3.0
0
2008-08-19T21:14:32.347
2016-03-14T04:10:53.540
2016-03-14T04:10:53.540
5,233,656
1,976
[ "sql-server", "identity" ]
16,977
2
null
16,971
128
null
``` DBCC CHECKIDENT('TableName', RESEED, 0) ```
null
CC BY-SA 2.5
null
2008-08-19T21:18:08.080
2008-08-19T21:18:08.080
null
null
1,375
null
16,978
2
null
16,963
3
null
I've actually used GridView extensively for an adminsitrative console. I even created a custom DataFieldControl that sets the field's header text and sort expression based on data field, creates an Insert row in the bottom and automatically collects the values in the row and forwards them to the data source's insert me...
null
CC BY-SA 2.5
null
2008-08-19T21:18:22.667
2008-08-19T21:18:22.667
null
null
1,659
null
16,969
1
null
null
2
1,663
There are so many examples of how to set up your dotnet projects but none seemed to fit our situation. We have one solution with multiple applications, multiple dependencies. We're on SourceSafe currently and are planning to move to subversion but are finding it difficult to organize our source the right way. - Exam...
.net solution subversion best practices?
CC BY-SA 3.0
null
2008-08-19T21:13:37.073
2017-08-29T07:53:52.660
2017-08-29T07:53:52.660
6,761,181
2,009
[ "visual-studio", "svn", "version-control", "deployment", "configuration-management" ]
16,983
2
null
16,971
17
null
To set the identity to 100: ``` DBCC CHECKIDENT (MyTable, RESEED, 100) ```
null
CC BY-SA 3.0
null
2008-08-19T21:21:30.647
2015-04-16T07:50:15.080
2015-04-16T07:50:15.080
206,730
905
null
16,982
2
null
16,935
0
null
That's quite odd, 100 classes really isn't that many. What is the compiler doing when the stack overflows? Is there a useful stack trace generated? What happens if you run `javac` directly on the command line instead of thorugh ant? One possible workaround is to simply increase the size of the stack using the `-Xss` a...
null
CC BY-SA 2.5
null
2008-08-19T21:21:16.607
2008-08-19T21:21:16.607
null
null
588
null
16,979
2
null
16,451
3
null
@Mike I recently did a test and this is the code I used. I'm not using policy stuff, but I used WS-Security with plain text authentication. CXF has really good documentation on how to accomplish this stuff. I used wsdl2java and then added this code to use the web service with ws-security. I hope this helps you out. ...
null
CC BY-SA 2.5
null
2008-08-19T21:18:27.643
2008-08-19T21:18:27.643
null
null
1,310
null
16,973
2
null
1,625
6
null
You need at least a decent text editor as a baseline, [emacs with nxml mode](http://www.emacswiki.org/cgi-bin/wiki/NxmlMode) as mentioned before is a very good choice. However as the schema becomes larger and larger you may lose the overview, especially when you author an XML Schema document which can be very verbose. ...
null
CC BY-SA 3.0
null
2008-08-19T21:15:28.863
2015-12-03T19:43:02.503
2015-12-03T19:43:02.503
3,393,505
1,996
null
16,955
2
null
16,935
1
null
Try adding some variation of these attributes to the [Ant javac task](http://ant.apache.org/manual/Tasks/javac.html) line: ``` memoryinitialsize="256M" memorymaximumsize="1024M" ``` You can also try `fork="true"`, not sure if this allows you to set values for stack and heap (aka -Xm1024), but it may help (if it woul...
null
CC BY-SA 2.5
null
2008-08-19T21:05:28.010
2011-01-24T00:12:18.073
2011-01-24T00:12:18.073
183,172
1,480
null
16,986
2
null
13,832
1
null
Are you calling msbuild to build? Or are you calling the VS.NET IDE exe to build. We've had no problems with our c#/VB.NET mix using CC.NET and NAnt and do not have to specify referenced assemblies inside of the build files. What we do is using the IDE exe to build solutions that contain the projects we want to build...
null
CC BY-SA 2.5
null
2008-08-19T21:24:02.950
2008-08-19T21:24:02.950
null
null
698
null
16,990
2
null
9,204
1
null
Debug Companion VS plugin seem to be exactly what I was looking for, except that it won't see library project in my solution. Only when I added a console win application to the solution did something appear in that list of projects. The problem with the decompile/compile approach for me was that the code I was debuggi...
null
CC BY-SA 2.5
null
2008-08-19T21:26:17.937
2008-08-19T21:26:17.937
null
null
578
null
16,995
2
null
16,940
0
null
If you don't need to compile one of the code screens, have you thought about just opening Notepad++ or PSPad in your other monitor and viewing the second batch of code that way? They have context sensitive coloring that would assist in reading. I do this all the time.
null
CC BY-SA 2.5
null
2008-08-19T21:28:14.033
2008-08-19T21:28:14.033
null
null
71
null
16,993
2
null
16,940
0
null
Tools>Options>General>Multiple Documents
null
CC BY-SA 2.5
null
2008-08-19T21:28:00.587
2008-08-19T21:28:00.587
null
null
null
null
16,999
2
null
16,638
1
null
I found that example through my Google searches too and did play with it. That wasn't the problem. I found my bug. No one would have been able to solve the problem. It turns out that right before I test my bounds I had centered my map with bad data. I did something like the `lngSpan = northEast.lng() - southWest.lng()...
null
CC BY-SA 2.5
null
2008-08-19T21:29:05.187
2010-08-06T07:08:50.083
2010-08-06T07:08:50.083
30,674
1,992
null
16,998
1
17,236
null
12
22,810
I'm having trouble reading a "chunked" response when using a StreamReader to read the stream returned by GetResponseStream() of a HttpWebResponse: ``` // response is an HttpWebResponse StreamReader reader = new StreamReader(response.GetResponseStream()); string output = reader.ReadToEnd(); // throws exception... ``` ...
Reading "chunked" response with HttpWebResponse
CC BY-SA 3.0
0
2008-08-19T21:28:53.097
2021-12-16T09:29:04.450
2012-05-24T17:27:24.340
50,776
2,047
[ "c#", "http", ".net-3.5", ".net-2.0" ]
16,976
2
null
16,963
17
null
I'm pretty much writing my own HTML - I'm using the ListView and Masterpages, but not really using the controls much anymore. My ListView laughs at your silly old repeater, by the way. However, bloatware isn't necessarily a bad thing. If I needed a low volume intranet application built, I'd much rather pay a less expe...
null
CC BY-SA 2.5
null
2008-08-19T21:17:42.387
2008-08-19T21:17:42.387
null
null
5
null
17,006
2
null
16,991
6
null
I have used [Komodo](http://www.activestate.com/Products/komodo_ide/index.mhtml) and it's pretty good. I use [TextMate](http://en.wikipedia.org/wiki/TextMate) now.
null
CC BY-SA 2.5
null
2008-08-19T21:32:38.517
2011-02-06T16:04:37.343
2011-02-06T16:04:37.343
63,550
1,632
null
17,010
2
null
16,991
27
null
Have you tried [Aptana](http://www.aptana.com/)? It's based on Eclipse and they have a sweet [Rails](http://www.aptana.com/rails) plugin.
null
CC BY-SA 2.5
null
2008-08-19T21:35:46.593
2009-12-29T10:35:42.377
2009-12-29T10:35:42.377
1,450
1,992
null
16,989
2
null
16,926
10
null
I have a poor man's version of this I have used in the past... this requires jquery and firebug... ``` <script type="text/javascript"> $(document).ready(function() { $('*[@id]').each(function() { console.log('#' + this.id + ' {}'); }); $('*[@class]').each(function() { ...
null
CC BY-SA 2.5
null
2008-08-19T21:26:01.947
2008-08-19T21:26:01.947
null
null
2,031
null
17,014
2
null
4,860
0
null
If the option exists to do an XML signature and instead just to treat the XML as a byte stream and to sign that, do it. It will be easier to implement, easier to understand, more stable (no canonicalization, transform, policy, ...) and faster. If you absolutely must have XML DSIG (sadly, some of us must), it is cert...
null
CC BY-SA 2.5
null
2008-08-19T21:37:21.100
2008-08-19T21:37:21.100
null
null
1,996
null
17,015
2
null
16,926
1
null
This blog entry references to something similar to what you need [here](http://blog.corunet.com/english/automatic-css-the-stylizator). It contains a link to a Perl script called '[stylizator.pl](http://blog.corunet.com/uploads/stylizator/stylizator.zip)'. This script parses the html to look for possible CSS elements a...
null
CC BY-SA 2.5
null
2008-08-19T21:39:17.820
2008-08-19T21:39:17.820
null
null
1,311
null
17,018
2
null
16,991
3
null
Aptana more or less is RadRails, or it's based on it. I've used it, and it's really good, but it does have some problems. For instance, it breaks the basic search dialog on my system (giving a raw java exception to the end user), and it clutters the interface with add like notices and upgrade bars and news feeds and......
null
CC BY-SA 2.5
null
2008-08-19T21:41:37.907
2008-08-19T21:41:37.907
null
null
2,018
null
17,016
2
null
16,971
36
null
Just a word of warning with: ``` DBCC CHECKIDENT (MyTable, RESEED, 0) ``` If you did not truncate the table, and the identity column is the PK, you will get an error when reaching pre-existing identites. For example, you have identities (3,4,5) in the table already. You then reset the identity column to 1. After ...
null
CC BY-SA 2.5
null
2008-08-19T21:40:01.217
2008-08-19T21:40:01.217
null
null
1,960
null
16,957
2
null
16,939
11
null
A MemoryStream is basically a byte array with a stream interface, e.g. sequential reading/writing and the concept of a current position.
null
CC BY-SA 2.5
null
2008-08-19T21:06:55.747
2008-08-19T21:06:55.747
null
null
1,810
null
17,004
2
null
15,690
0
null
I found very insightful ideas about starting a new large project, based on - - - in the book [Growing Object-Oriented Software, Guided by Tests](http://www.mockobjects.com/2008/07/growing-object-oriented-software-guided.html). It is still under development, but first 3 chapters may be what You are looking for and I...
null
CC BY-SA 2.5
null
2008-08-19T21:31:46.883
2008-08-19T21:31:46.883
null
null
1,835
null
17,017
1
17,021
null
56
50,154
How do I convert a DateTime structure to its equivalent [RFC 3339](http://www.ietf.org/rfc/rfc3339.txt) formatted string representation and/or parse this string representation back to a [DateTime](http://msdn.microsoft.com/en-us/library/system.datetime.aspx) structure? The RFC-3339 date-time format is used in a number ...
How do I parse and convert a DateTime to the RFC 3339 date-time format?
CC BY-SA 3.0
0
2008-08-19T21:40:11.780
2022-12-06T13:12:22.470
2017-12-17T00:31:08.793
1,709,587
2,029
[ ".net", "datetime", "rfc3339", "atom-feed" ]
17,020
1
17,048
null
3
4,986
I have a new 1 TB drive coming in tomorrow. What is the best way to divide this space for a development workstation? The biggest problem I think I'm going to have is that some partitions (probably /usr) will become to small after a bit of use. Other partitions are probably to huge. The swap drive for example is curren...
What is the best way to partition terabyte drive in a linux development machine?
CC BY-SA 2.5
0
2008-08-19T21:42:30.667
2012-09-03T03:42:59.733
2012-09-03T03:42:59.733
50,776
1,633
[ "linux", "storage", "disk-partitioning" ]
17,025
2
null
17,017
-3
null
In .NET (assuming UTC): ``` datetime.ToString("yyyy-MM-dd'T'HH:mm:ssZ") ``` `DateTime.Parse()` can be used to convert back into a `DateTime` structure.
null
CC BY-SA 4.0
null
2008-08-19T21:44:12.147
2022-12-06T13:12:22.470
2022-12-06T13:12:22.470
2,874,896
1,659
null
17,026
2
null
16,991
23
null
On Mac OS X, [TextMate](http://macromates.com/) is a godsend.
null
CC BY-SA 2.5
null
2008-08-19T21:44:22.537
2011-02-06T15:58:04.587
2011-02-06T15:58:04.587
63,550
25
null
17,029
2
null
15,240
4
null
Another fun way to stub out variadic functions is: ``` #define function sizeof ```
null
CC BY-SA 3.0
null
2008-08-19T21:46:12.437
2012-07-03T15:07:33.340
2012-07-03T15:07:33.340
142,162
1,799
null
17,028
2
null
16,945
1
null
So you would use recursion. Here is a powershell example that should be easy to convert to C#: ``` function Move-Stuff($folder) { foreach($sub in [System.IO.Directory]::GetDirectories($folder)) { Move-Stuff $sub } $new = $folder.Replace("Shark", "Orca") if(!(Test-Path($new))) { ...
null
CC BY-SA 2.5
null
2008-08-19T21:46:09.693
2008-08-19T21:46:09.693
null
null
1,358
null
17,024
2
null
16,964
3
null
You don't want to use a Webforms button in ASP.NET MVC. MVC is a completely different way of working, and you no longer have the WebForms abstraction. You have 2 different options you can either replace your asp:Button with an input tag or use a standard hyperlink instead. If you use the input option then you will ne...
null
CC BY-SA 2.5
null
2008-08-19T21:43:38.137
2008-08-19T21:43:38.137
null
null
1,982
null
17,030
2
null
17,020
6
null
If you partition your drive using [LVM](http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)) you won't have to worry about any individual partition running out of space in the future. Just move space around as necessary.
null
CC BY-SA 2.5
null
2008-08-19T21:46:36.557
2008-08-20T23:14:43.700
2008-08-20T23:14:43.700
317
317
null
17,032
1
17,042
null
29
4,199
[Resharper](http://resharper.blogspot.com/2008/03/varification-using-implicitly-typed.html) certainly thinks so, and out of the box it will nag you to convert ``` Dooberry dooberry = new Dooberry(); ``` to ``` var dooberry = new Dooberry(); ``` Is that really considered the best style?
Should I *always* favour implictly typed local variables in C# 3.0?
CC BY-SA 2.5
0
2008-08-19T21:49:07.347
2021-07-11T16:38:44.440
2014-07-15T12:54:01.257
2,771,704
1,853
[ "c#", "styles", "resharper" ]
17,033
2
null
7,277
1
null
The XML spec has something to say regarding [whitespace](http://www.w3.org/TR/xml/#sec-white-space) and [linefeeds and carriage returns in particular](http://www.w3.org/TR/xml/#sec-line-ends). So if you limit yourself to true linefeeds (x0A) you should be Ok. However, many editing tools will reformat XML for "better pr...
null
CC BY-SA 2.5
null
2008-08-19T21:49:34.273
2008-08-19T21:49:34.273
null
null
1,996
null
17,036
2
null
17,020
2
null
If you want a classic setup, I'd go for a 50GB "/" partition, for all your application goodness, and split the rest across users, or a full 950GB for a single user. Endless diskspace galore!
null
CC BY-SA 2.5
null
2008-08-19T21:51:52.660
2008-08-19T21:51:52.660
null
null
2,018
null
17,038
2
null
696
1
null
A web service is almost certainly the way to go. I'm sure you've already thought of this, but since you're doing PHP on both sides, you can shortcut things a little bit by using serialize() to build your response data instead of building a proper XML document. It's less flexible over the long run, but it will probabl...
null
CC BY-SA 2.5
null
2008-08-19T21:51:57.950
2008-08-19T21:51:57.950
null
null
1,676
null
17,037
2
null
16,140
4
null
Is your existing application monolithic or tiered in seperate processes/layers? If tiered, you can convert the middle/app-tier to run in an OSGi container. In my team's experience, we've found trying to do web-stuff in OSGi painful. Other pain points are Hibernate and Jakarta Commons Logging. I find the OSGi specs ...
null
CC BY-SA 2.5
null
2008-08-19T21:51:54.610
2008-08-19T21:51:54.610
null
null
1,809
null
17,041
2
null
17,032
2
null
I have a feeling this will be one of the most popular questions asked over time on Stack Overflow. It boils down to preference. Whatever you think is more readable. I prefer var when the type is defined on the right side because it is terser. When I'm assigning a variable from a method call, I use the explicit type dec...
null
CC BY-SA 4.0
null
2008-08-19T21:53:12.703
2021-07-11T16:37:17.783
2021-07-11T16:37:17.783
2,667,173
1,786
null
17,043
2
null
17,032
0
null
"Best style" is subjective and varies depending on context. Sometimes it is way easier to use 'var' instead of typing out some hugely long class name, or if you're unsure of the return type of a given function. I find I use 'var' more when mucking about with Linq, or in for loop declarations. Other times, using the f...
null
CC BY-SA 2.5
null
2008-08-19T21:54:30.813
2008-08-19T21:54:30.813
null
null
611
null
17,042
2
null
17,032
39
null
It's of course a matter of style, but I agree with Dare: [C# 3.0 Implicit Type Declarations: To var or not to var?](http://www.25hoursaday.com/weblog/2008/05/21/C30ImplicitTypeDeclarationsToVarOrNotToVar.aspx). I think using var instead of an explicit type makes your code less readable.In the following code: ``` var r...
null
CC BY-SA 3.0
null
2008-08-19T21:53:38.443
2014-04-15T15:11:14.173
2014-04-15T15:11:14.173
12,484
5
null
17,045
2
null
17,032
2
null
There was a good discussion on this @ [Coding Horror](http://www.codinghorror.com/blog/archives/001136.html) Personally I try to keep its use to a minimum, I have found it hurts readability especially when assigning a variable from a method call.
null
CC BY-SA 2.5
null
2008-08-19T21:55:23.620
2008-08-19T22:02:10.813
2008-08-19T22:02:10.813
1,375
1,375
null
17,048
2
null
17,020
4
null
My standard strategy for normal "utility" boxes is to give them a swap partition twice the size of their RAM, a 1GB /boot partition and leave the rest as one vast partition. Whilst I see why some people want a separate /var, separate /home, etc., if I only have trusted users and I'm not running some production service...
null
CC BY-SA 2.5
null
2008-08-19T21:58:12.990
2008-08-19T21:58:12.990
null
null
1,813
null
17,044
2
null
17,032
0
null
No not but I would go as far as to say a lot of the time. Type declarations aren't much more useful than Hungarian notation ever was. You still have the same problem that types are subject to change and as much as refactoring tools are helpful for that it's not ideal compared to not having to change where a type is sp...
null
CC BY-SA 4.0
null
2008-08-19T21:55:07.910
2021-07-11T16:38:44.440
2021-07-11T16:38:44.440
2,667,173
1,659
null
17,050
2
null
16,918
19
null
Once you get past the beginning stages, I would highly recommend reading [Real World Haskell](http://book.realworldhaskell.org/).
null
CC BY-SA 2.5
null
2008-08-19T21:59:14.347
2008-08-19T21:59:14.347
null
null
611
null
16,991
1
17,010
null
141
426,347
I've been using Eclipse with RDT (not RadRails) a lot lately, and I'm quite happy with it, but I'm wondering if you guys know any decent alternatives. I know NetBeans also supports Ruby these days, but I'm not sure what it has to offer over Eclipse. Please, list any features you think are brilliant or useful when sugg...
What Ruby IDE do you prefer?
CC BY-SA 2.5
0
2008-08-19T21:26:22.150
2011-08-22T23:30:15.107
2008-09-11T02:13:58.010
-1
2,018
[ "ruby", "ide", "editor" ]
17,054
1
17,062
null
3
7,487
How do you use network sockets in Pascal? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
Sockets in Pascal
CC BY-SA 3.0
0
2008-08-19T22:02:21.360
2021-03-20T08:52:25.860
2017-07-10T22:19:51.030
7,750,640
868
[ "sockets", "pascal" ]
17,052
2
null
16,945
0
null
``` string oldPath = "\\shark.exe" string newPath = oldPath.Replace("shark", "orca"); System.IO.File.Move(oldPath, newPath); ``` Fill in with your own full paths
null
CC BY-SA 2.5
null
2008-08-19T22:00:15.903
2008-08-19T22:00:15.903
null
null
1,786
null
17,021
2
null
17,017
22
null
This is an implementation in C# of how to parse and convert a DateTime to and from its RFC-3339 representation. The only restriction it has is that the DateTime is in Coordinated Universal Time (UTC). ``` using System; using System.Globalization; namespace DateTimeConsoleApplication { /// <summary> /// Provid...
null
CC BY-SA 2.5
null
2008-08-19T21:42:45.113
2008-08-19T21:42:45.113
null
null
2,029
null
17,057
1
17,068
null
4
2,270
I'm trying to find the best way to speed up the delivery of the static images that compose the design of an mvc site. The images are not gzipped, nor cached in the server or on the client (with content expire). Options are: 1. Find why images are not cached and gzipped direcly from IIS6 2. Write a specialized http h...
What is the best way to gzip and cache static images in Asp.net mvc
CC BY-SA 2.5
0
2008-08-19T22:05:00.130
2009-01-30T04:07:46.977
2008-08-28T03:01:26.017
598
1,929
[ "asp.net", "asp.net-mvc", ".net-2.0", "gzip" ]