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
15,967
2
null
15,899
2
null
How about an object oriented approach? You could deserialise the XML to an object, set the location value on the object, then serialise back to XML. [XStream](http://xstream.codehaus.org/tutorial.html) makes this really easy. For example, you would define the main object, which in your case is CustomData (I'm using ...
null
CC BY-SA 2.5
null
2008-08-19T10:45:20.620
2008-08-19T10:45:20.620
null
null
1,174
null
15,979
1
null
null
11
13,890
I use solr to search for documents and when trying to search for documents using this query "`id:*`", I get this query parser exception telling that it cannot parse the query with * or ? as the first character. ``` HTTP Status 400 - org.apache.lucene.queryParser.ParseException: Cannot parse 'id:*': '*' or '?' not all...
WildcardQuery error in Solr
CC BY-SA 2.5
0
2008-08-19T10:59:17.050
2011-08-01T14:26:06.553
null
null
1,448
[ "search", "lucene", "solr" ]
15,961
2
null
15,899
0
null
You should be able to do this with `query` try ``` fn:replace(string,pattern,replace) ``` I am new to xquery myself and I have found it to be a painful query language to work with, but it does work quiet well once you get over the initial learning curve. I do still wish there was an easier way which was as effic...
null
CC BY-SA 3.0
null
2008-08-19T10:38:08.807
2015-12-22T07:17:18.563
2015-12-22T07:17:18.563
4,169,569
1,464
null
15,981
2
null
15,851
1
null
@[Sadie](https://stackoverflow.com/questions/15851/refactoring-away-labeled-loops#15946): > They all look less readable than the original, in that they involve spending more code on the mechanism of the code rather than on the algorithm itself Externalizing the second loop outside the algorithm is not necessarily les...
null
CC BY-SA 2.5
null
2008-08-19T11:01:00.120
2008-08-19T11:01:00.120
2017-05-23T12:18:32.893
-1
1,730
null
15,992
2
null
15,729
1
null
Better yet, a site domain dictionary, containing a definition (over time) for every programming term on Stackoverflow, with the definition itself modded according to the Wiki-like aspects Atwood and others have been discussing. There are coding dictionaries out there but they're all either a) crap or b) not extensible...
null
CC BY-SA 2.5
null
2008-08-19T11:14:42.900
2008-08-19T11:14:42.900
null
null
null
null
15,994
2
null
15,744
0
null
Perhaps the most common usees of #define in C# is to differentiate between debug/release and different platforms (for example Windows and X-Box 360 in the XNA framework).
null
CC BY-SA 2.5
null
2008-08-19T11:16:44.160
2008-08-19T11:16:44.160
null
null
214
null
15,972
2
null
15,954
1
null
I don't have a C compiler set up so I can't test to see if it performs the same, but I the following is correct: ``` private static ulong SBDM(string str) { ulong hash = 0; foreach (char c in str) { hash = c + (hash << 6) + (hash << 16) - hash; } return hash; } ``` If you just need to ...
null
CC BY-SA 4.0
null
2008-08-19T10:52:49.310
2019-11-27T02:04:40.947
2019-11-27T02:04:40.947
3,968,623
214
null
15,970
2
null
15,828
16
null
Here's some code I wrote in C# using .NET 1.1 a few years ago. Not sure if this would be exactly what you need (and may not be my best code :)). ``` using System; using System.Data; using System.Data.OleDb; namespace ExportExcelToAccess { /// <summary> /// Summary description for ExcelHelper. /// </summar...
null
CC BY-SA 2.5
null
2008-08-19T10:50:55.710
2008-08-19T10:50:55.710
null
null
120
null
15,998
2
null
13,607
0
null
I've had a look at the Video from Molley Rocket and Looked through Jari Komppa's cached tutorials. An IM-GUI seems the best way to go, I think it will be a lot more streamlined, and lot quicker to build than the system I originally had in mind. Now a new issue, I can only except one Answer. :( Thanks again to Monjar...
null
CC BY-SA 2.5
null
2008-08-19T11:19:04.920
2008-08-19T11:19:04.920
null
null
3,180
null
15,968
2
null
100,420
4
null
- - - - - - - - -
null
CC BY-SA 2.5
null
2008-08-19T10:47:08.430
2008-08-19T10:47:08.430
null
null
1,169
null
16,002
2
null
15,690
1
null
It has been my experience that Java applications (.NET also) that consider the database last are highly likely to perform poorly when placed into a corporate environment. You need to really think about your audience. You didn't say if it was a web app or not. Either way the infrastructure that you are implementing o...
null
CC BY-SA 2.5
null
2008-08-19T11:21:50.450
2008-08-19T11:21:50.450
null
null
791
null
15,989
2
null
1,064
6
null
Yeah, if you were being efficient you'd throw everything into the same vertex buffer, but I don't think drawing 100 cubes will push any GPU produced in the past 5 years, so you should be fine following the suggestions above. Write a basic pass through vertex shader, shade however you desire in the pixel shader. Either...
null
CC BY-SA 2.5
null
2008-08-19T11:12:23.777
2008-09-20T07:28:52.020
null
null
1,169
null
15,965
2
null
15,734
3
null
I emailed them asking this same question a while back and here's the response I got: Hello, Thank you for your email. I apologize for the delay in replying to your email. Google Analytics does not currently provide an API to access the reporting data. However, we do offer export functionality for single reports in th...
null
CC BY-SA 2.5
null
2008-08-19T10:45:16.233
2008-08-19T10:45:16.233
null
null
null
null
15,995
1
null
null
124
87,971
Does anyone here have any useful code which uses reduce() function in python? Is there any code other than the usual + and * that we see in the examples? Refer [Fate of reduce() in Python 3000](http://www.artima.com/weblogs/viewpost.jsp?thread=98196) by GvR
Useful code which uses reduce()?
CC BY-SA 3.0
0
2008-08-19T11:16:58.120
2022-11-16T18:02:35.520
2017-05-30T04:07:56.707
355,230
1,448
[ "python", "functional-programming" ]
16,013
2
null
15,729
1
null
The c2 [Wiki](http://c2.com/cgi/wiki) kicks butt. Great combination of concise definitions and examples, plus discussions that break it down when there are different interpretations.
null
CC BY-SA 2.5
null
2008-08-19T11:27:45.137
2008-08-19T11:27:45.137
null
null
1,042
null
16,003
1
16,175
null
2
172
We need to replace the menu system in our main ASP.NET application. So naturally we're looking at the ASP.NET `SiteMapProvider` and `Menu` controls. However we also need enough security to prevent users from directly entering URLs that they shouldn't have access to. We can do this by putting `<location>` entries in an...
LocationProvider
CC BY-SA 3.0
0
2008-08-19T11:22:00.873
2015-11-12T00:53:37.740
2015-11-12T00:53:37.740
1,505,120
1,738
[ "asp.net", "security", "sitemap" ]
16,019
2
null
15,899
5
null
How about an XPath based approach? I like this approach as the logic is super-easy to understand. The code is pretty much self-documenting. If your xml document is available to you as an org.w3c.dom.Document object (as most parsers return), then you could do something like the following: ``` // get the list of custom...
null
CC BY-SA 2.5
null
2008-08-19T11:31:10.433
2008-08-19T11:37:51.480
2008-08-19T11:37:51.480
1,820
1,820
null
16,020
2
null
15,687
32
null
I don't think the [pre-commit](http://svnbook.red-bean.com/nightly/en/svn.ref.reposhooks.pre-commit.html) hook can actually change the data that is being committed - it can disallow a commit, but I don't think it can do the conversion for you. It sounds like you want the [property](http://svnbook.red-bean.com/nightly/...
null
CC BY-SA 3.0
null
2008-08-19T11:35:09.270
2013-03-14T16:50:45.763
2013-03-14T16:50:45.763
26,683
1,612
null
16,007
1
16,039
null
47
116,985
Basically I have some code to check a specific directory to see if an image is there and if so I want to assign a URL to the image to an ImageControl. ``` if (System.IO.Directory.Exists(photosLocation)) { string[] files = System.IO.Directory.GetFiles(photosLocation, "*.jpg"); if (files.Length > 0) { ...
How do I convert a file path to a URL in ASP.NET
CC BY-SA 3.0
0
2008-08-19T11:24:55.907
2018-01-12T23:36:23.397
2015-03-06T04:32:53.627
249,341
1,762
[ "asp.net", "url", "image" ]
16,025
2
null
15,486
0
null
Here's an example using the stronger typing. Not sure if it's necessarily the best way though. ``` static void Main(string[] args) { IList list = new List<int>() { 1, 3, 2, 5, 4, 6, 9, 8, 7 }; List<int> stronglyTypedList = new List<int>(Cast<int>(list)); stronglyTypedList.Sort(); } private static IEnumera...
null
CC BY-SA 2.5
null
2008-08-19T11:38:30.527
2008-08-19T11:38:30.527
null
null
214
null
16,027
2
null
13,607
0
null
I'd have a look at [GLAM](http://glam.sourceforge.net/) and [GLGooey](http://glgooey.sourceforge.net/)
null
CC BY-SA 2.5
null
2008-08-19T11:47:09.277
2008-08-19T11:47:09.277
null
null
842
null
16,030
2
null
15,731
0
null
If you've got Greasemonkey installed you might want to try the XSS Assistant user script: [http://www.whiteacid.org/greasemonkey/#xss_assistant](http://www.whiteacid.org/greasemonkey/#xss_assistant)
null
CC BY-SA 2.5
null
2008-08-19T11:52:14.633
2008-08-19T11:52:14.633
null
null
1,904
null
16,032
2
null
16,007
-2
null
I think this should work. It might be off on the slashes. Not sure if they are needed or not. ``` string url = Request.ApplicationPath + "/" + photosLocation + "/" + files[0]; ```
null
CC BY-SA 3.0
null
2008-08-19T11:55:37.997
2013-08-25T20:25:03.253
2013-08-25T20:25:03.253
572,771
1,629
null
16,035
2
null
15,731
0
null
The [DOM Inspector](https://addons.mozilla.org/en-US/firefox/addon/6622) will let you add/edit/remove inputs - copying existing ones is the easiest way of adding new ones. I highly recommend getting [Inspect This](https://addons.mozilla.org/en-US/firefox/addon/1913) as well.
null
CC BY-SA 2.5
null
2008-08-19T11:58:12.780
2008-08-19T11:58:12.780
null
null
1,612
null
16,037
2
null
3,319
31
null
You might find your code is more maintainable if you keep all your styles, etc. in CSS and just set / unset class names in JavaScript. Your CSS would obviously be something like: ``` .highlight { background:#ff00aa; } ``` Then in JavaScript: ``` element.className = element.className === 'highlight' ? '' : 'hig...
null
CC BY-SA 3.0
null
2008-08-19T11:59:40.470
2016-01-14T18:58:04.590
2016-01-14T18:58:04.590
2,678,454
1,904
null
16,031
2
null
16,007
0
null
So far as I know there's no single function which does this (maybe you were looking for the inverse of [MapPath](http://msdn.microsoft.com/en-us/library/ms524632.aspx)?). I'd love to know if such a function exists. Until then, I would just take the filename(s) returned by GetFiles, remove the path, and prepend the URL ...
null
CC BY-SA 2.5
null
2008-08-19T11:53:30.247
2008-08-19T11:53:30.247
null
null
null
null
15,966
2
null
5,863
3
null
OK, we needed to resolve this issue in the short term, and so we came up with the idea of a "interop", or compatibility layer. Baiscally, all we did was added a traditional ASMX web service to the project, and called the WCF service from that using native WCF calls. We were then able to return the appropriate types b...
null
CC BY-SA 2.5
null
2008-08-19T10:45:19.497
2008-08-19T10:45:19.497
null
null
377
null
16,044
2
null
15,087
0
null
> but have you tried setting the compatibilty mode for the database to sql server 2000. I just checked the 2005 database, I selected the database, and clicked Properties->Options, and it says the db is already in 2000 compatibility mode.
null
CC BY-SA 2.5
null
2008-08-19T12:12:28.727
2008-08-19T12:12:28.727
null
null
1,749
null
16,039
2
null
16,007
14
null
As far as I know, there's no method to do what you want; at least not directly. I'd store the `photosLocation` as a path relative to the application; for example: `"~/Images/"`. This way, you could use MapPath to get the physical location, and `ResolveUrl` to get the URL (with a bit of help from `System.IO.Path`): ```...
null
CC BY-SA 3.0
null
2008-08-19T12:02:18.700
2016-01-20T05:39:05.067
2016-01-20T05:39:05.067
4,143,855
1,710
null
16,016
2
null
15,744
1
null
It's for conditional compilation, so you can include or remove bits of code based upon project attributes which tend to be: - - They can also be used to disable large parts of a system quickly, for example, during development of a game, I might define ``` #define PLAYSOUNDS ``` and then wrap the final call to pl...
null
CC BY-SA 2.5
null
2008-08-19T11:29:13.417
2008-08-19T11:29:13.417
null
null
1,169
null
16,014
2
null
15,851
1
null
@[Nicolas](https://stackoverflow.com/questions/15851?sort=newest#15981) > > Some of them are broken, or were before they were edited. Most damning is the fact that people are having to think quite hard about how to write the code without labels and not break anything.I have a different point of view: some of...
null
CC BY-SA 2.5
null
2008-08-19T11:28:13.823
2008-08-19T11:28:13.823
2017-05-23T10:32:51.507
-1
1,000
null
16,050
2
null
15,900
3
null
Here are some 3rd-party diagramming tools: - [http://www.nevron.com/Products.DiagramFor.NET.Overview.aspx](http://www.nevron.com/Products.DiagramFor.NET.Overview.aspx)- [http://www.nwoods.com/GO/dotnet.htm](http://www.nwoods.com/GO/dotnet.htm)- [http://www.syncfusion.com/products/diagram/web/default.aspx](http://www.s...
null
CC BY-SA 2.5
null
2008-08-19T12:17:14.740
2008-08-19T12:17:14.740
null
null
null
null
16,045
2
null
15,678
2
null
This is a pain. What we really need is for Microsoft to allow us to hook into a Post-Solution Build event. You can do this via macros but that's too complicated. I'm assuming this is a C++ project because I don't have this problem with C#. This is my solution, it's not elegant but it works: - - - - - This project,...
null
CC BY-SA 2.5
null
2008-08-19T12:12:43.173
2008-08-19T12:12:43.173
null
null
887
null
16,051
2
null
15,828
152
null
``` var fileName = string.Format("{0}\\fileNameHere", Directory.GetCurrentDirectory()); var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", fileName); var adapter = new OleDbDataAdapter("SELECT * FROM [workSheetNameHere$]", connectionString); var ds...
null
CC BY-SA 2.5
null
2008-08-19T12:18:20.197
2008-08-19T12:18:20.197
null
null
1,629
null
16,058
2
null
15,087
2
null
I've had a similar problem before when using ODBC linked tables to connect to an Sql Server. The solution was to relink the tables and specify the primary key to the table. If Access doesn't know the primary key it cannot perform inserts or updates. I haven't any experience with ADPs but it could be a similar thing, t...
null
CC BY-SA 2.5
null
2008-08-19T12:24:55.690
2008-08-19T12:24:55.690
null
null
961
null
16,056
2
null
15,731
6
null
If you're a windows user, use [Fiddler](http://www.fiddler2.com/fiddler2/version.asp). It is invaluable for looking at the raw Http requests and responses. It also has the ability to create requests with the request builder and it has an auto responder also, so you can intercept requests. It even lets you inspect HT...
null
CC BY-SA 2.5
null
2008-08-19T12:22:44.277
2008-08-19T23:15:29.587
2008-08-19T23:15:29.587
1,117
1,117
null
16,057
2
null
15,674
3
null
Recommended to use separate repository per project. In my Apache conf.d directory I have subversion.conf that contains: ``` <Location /svn> DAV svn SVNParentPath /var/www/svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /var/www/svn/password Require valid-user </Location> ``` Then whenev...
null
CC BY-SA 2.5
null
2008-08-19T12:22:46.570
2008-08-19T14:05:44.397
2008-08-19T14:05:44.397
486
486
null
16,062
2
null
15,674
0
null
One repository per project. Steven Murawski's comment about CC.NET is an interesting one. I would be interested to hear how it works if you need to specify several source control repositories.
null
CC BY-SA 2.5
null
2008-08-19T12:28:22.157
2008-08-19T12:28:22.157
null
null
470
null
16,040
2
null
16,007
3
null
Maybe this is not the best way, but it works. ``` // Here is your path String p = photosLocation + "whatever.jpg"; // Here is the page address String pa = Page.Request.Url.AbsoluteUri; // Take the page name String pn = Page.Request.Url.LocalPath; // Here is the server address String sa = pa.Replace(pn, "");...
null
CC BY-SA 2.5
null
2008-08-19T12:03:22.457
2008-08-19T12:25:38.467
2008-08-19T12:25:38.467
968
968
null
16,049
2
null
15,995
3
null
Not sure if this is what you are after but you can [search source code on Google](http://www.google.com/codesearch). Follow the link for a search on ['function:reduce() lang:python'](http://www.google.com/codesearch?q=function%3Areduce()+lang%3Apython&hl=en&btnG=Search+Code) on Google Code search At first glance the ...
null
CC BY-SA 3.0
null
2008-08-19T12:16:01.030
2017-05-30T04:31:40.930
2017-05-30T04:31:40.930
355,230
199
null
16,064
1
16,095
null
9
9,189
> [What Ruby IDE do you prefer?](https://stackoverflow.com/questions/16991/what-ruby-ide-do-you-prefer) I've generally been doing stuff on Microsoft .NET out of college almost 2 years ago. I just started looking at Ruby on Rails. So what editor should I use? I'm using [Notepad++](http://en.wikipedia.org/wiki/No...
What IDE to use for developing in Ruby on Rails on Windows?
CC BY-SA 2.5
0
2008-08-19T12:30:25.977
2012-08-05T11:10:14.033
2017-05-23T12:25:02.703
-1
1,688,440
[ "ruby-on-rails", "ruby", "ide", "editor" ]
16,061
2
null
15,917
5
null
[EDIT] Post NH2.0 release, please look at the Event Listeners as suggested below. My answer is outdated. --- The IInterceptor is the recommended way to modify any data in nhibernate in a non-invasive fashion. It's also useful for decryption / encryption of data without your application code needing to know. Tr...
null
CC BY-SA 2.5
null
2008-08-19T12:26:56.560
2009-11-17T11:03:57.583
2009-11-17T11:03:57.583
1,297
1,297
null
16,074
1
null
null
31
12,537
Is it possible to open a project in Visual Studio 2008 without opening all the files that were previously opened last time I had the project open. I have a habit of keeping many files open as I am working on them, so next time I open the project, it (very slowly) loads up a bunch of files into the editor that I may no...
Visual Studio open files question
CC BY-SA 2.5
0
2008-08-19T12:34:33.190
2011-11-11T16:53:18.110
2008-11-02T02:23:44.863
null
1,749
[ "visual-studio", "visual-studio-2008", "settings", "projects-and-solutions" ]
16,067
1
1,661,276
null
22
4,811
I have been mulling over writing a peak-fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually. IIRC, one of Python's original remits was as a prototyping languag...
Prototyping with Python code before compiling
CC BY-SA 4.0
0
2008-08-19T12:32:38.903
2022-12-03T19:08:21.523
2020-09-22T10:10:12.000
2,897,989
199
[ "python", "swig", "ctypes", "prototyping", "python-sip" ]
16,084
2
null
16,074
3
null
Edit: Totally read the question wrong at first - ignore my first (now gone) answer. :) I changed the keyboard mapping for CTRL-SHIFT-C from bringing up the Class View to closing all document windows - something I use several orders of magnitude more often - and then I just clear my workspace before closing a solution....
null
CC BY-SA 2.5
null
2008-08-19T12:38:03.713
2008-08-19T12:38:03.713
null
null
35
null
16,086
2
null
16,064
2
null
I've been using Aptana/Eclipse/RadRails, but if I were to do it again, I'd definitely try NetBeans. Aptana has been a major headache. I've never used IronRuby, but that might make you feel more at home.
null
CC BY-SA 2.5
null
2008-08-19T12:38:42.450
2008-08-19T12:38:42.450
null
null
1,190
null
16,054
2
null
15,732
355
null
The Java runtime library supports validation. Last time I checked this was the Apache Xerces parser under the covers. You should probably use a [javax.xml.validation.Validator](http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/Validator.html). ``` import javax.xml.XMLConstants; import javax.xml.transform.So...
null
CC BY-SA 3.0
null
2008-08-19T12:21:16.883
2017-06-14T22:29:27.277
2017-06-14T22:29:27.277
32,453
304
null
16,080
2
null
15,398
1
null
It's very complex matter indeed. When you hit TAB focus jumps to another control only when these controls belong to a Modal Dialog Box. In fact there are some buttons like ESC, LEFT, RIGHT, DOWN, UP, TAB which modal dialog message function treats in a special way. If you want these keys to behave in similar way with m...
null
CC BY-SA 2.5
null
2008-08-19T12:36:47.977
2008-08-19T12:44:45.963
2008-08-19T12:44:45.963
1,007
1,007
null
16,088
2
null
16,074
0
null
Or you can close all open document from the Window menu before closing VS.
null
CC BY-SA 2.5
null
2008-08-19T12:39:36.253
2008-08-19T12:39:36.253
null
null
968
null
16,089
2
null
16,064
2
null
The Netbeans IDE is a good, all around editor for many languages. I'm pretty sure the 6.5 beta has support for Ruby on Rails, along with Javascript and a few other web languages. It's worth checking out [(Netbeans.org)](http://www.netbeans.org).
null
CC BY-SA 2.5
null
2008-08-19T12:40:19.497
2008-08-19T12:40:19.497
null
null
null
null
16,091
2
null
15,995
1
null
I have an old Python implementation of [pipegrep](http://examples.oreilly.com/upt2/split/pipegrep) that uses reduce and the glob module to build a list of files to process: ``` files = [] files.extend(reduce(lambda x, y: x + y, map(glob.glob, args))) ``` I found it handy at the time, but it's really not necessary, a...
null
CC BY-SA 2.5
null
2008-08-19T12:43:36.497
2008-08-19T12:43:36.497
null
null
1,199
null
16,071
2
null
16,064
6
null
[Aptana Studio](http://www.aptana.com/) I use it for all web development - HTML, CSS, PHP, JavaScript, Rails... EDIT: For full disclosure, I'm biased toward Aptana and RadRails as I know a few members of the original RadRails dev team.
null
CC BY-SA 2.5
null
2008-08-19T12:32:59.420
2008-08-19T12:41:34.660
2008-08-19T12:41:34.660
572
572
null
16,095
2
null
16,064
7
null
Try both NetBeans and RadRails for maybe a week each, then you can find which works best for you. The best advice is to learn your tool. If you are not checking out something new about your editor, something that could potentially save you time (regexp, etc) then you are doing yourself a huge disservice. I have been...
null
CC BY-SA 2.5
null
2008-08-19T12:47:25.613
2008-08-19T12:47:25.613
null
null
1,611
null
16,097
1
16,101
null
3
1,055
Here is the scenario that I have. I have a cvs repository in one location (A) and I want to replicate it and keep it in sync with a repository in another location(B). This would be a single directional sync from A to B. What is the best way to do this? If it is not really feasible in CVS then which source code control ...
What is the best way to replicate a version control repository?
CC BY-SA 2.5
null
2008-08-19T12:48:21.477
2012-04-25T16:59:20.843
null
null
1,353
[ "version-control", "cvs" ]
16,096
1
167,308
null
168
110,537
In WPF, how would I apply multiple styles to a `FrameworkElement`? For instance, I have a control which already has a style. I also have a separate style which I would like to add to it without blowing away the first one. The styles have different TargetTypes, so I can't just extend one with the other.
How to apply multiple styles in WPF
CC BY-SA 2.5
0
2008-08-19T12:47:44.833
2023-01-01T19:30:57.673
null
null
93
[ ".net", "wpf", "styles" ]
16,098
2
null
15,678
1
null
flipdoubt: they are projects created originally in 2008. My suggestion if it's not working C# is to look in the Build Events tab and check the setting of the "Run the post-build event:" drop down. If it is set to 'When the build updates the project output' this might be your problem, try setting to 'On successful build...
null
CC BY-SA 2.5
null
2008-08-19T12:49:46.250
2008-08-19T12:49:46.250
null
null
887
null
16,094
2
null
15,838
0
null
To optimize that code the best bet would be to rewrite the strcmp routine since you are only checking for equality and don't need to evaluate the entire word. Other than that you can't do much else. You can't sort as it appears you are looking for text within a larger text. Binary search won't work either since the te...
null
CC BY-SA 2.5
null
2008-08-19T12:46:12.777
2008-08-19T12:46:12.777
null
null
342
null
16,102
2
null
15,621
0
null
Thanks to everyone who answered. lomaxx, I spent the morning looking into using the external feature and it looks like this is the way to go. I was not aware of it, probably because it is not exactly prominent in Tortoise.
null
CC BY-SA 2.5
null
2008-08-19T12:53:28.160
2008-08-19T12:53:28.160
null
null
1,511
null
16,103
2
null
16,100
128
null
You're looking for [Enum.Parse](https://msdn.microsoft.com/en-us/library/aa328348.aspx). ``` SomeEnum enum = (SomeEnum)Enum.Parse(typeof(SomeEnum), "EnumValue"); ```
null
CC BY-SA 3.0
null
2008-08-19T12:53:52.747
2015-08-30T12:37:12.360
2015-08-30T12:37:12.360
63,550
1,297
null
16,100
1
16,104
null
1,225
1,101,843
What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do some...
Convert a string to an enum in C#
CC BY-SA 4.0
0
2008-08-19T12:51:55.043
2023-01-11T03:20:31.030
2023-01-11T03:20:31.030
2,063,755
203
[ "c#", "string", "enums" ]
16,092
2
null
16,064
1
null
[Sapphire in Steel](http://www.sapphiresteel.com/) integrates with Visual Studio.
null
CC BY-SA 2.5
null
2008-08-19T12:44:42.360
2008-08-19T12:44:42.360
null
null
1,659
null
16,105
2
null
16,097
2
null
I would recommend you migrate from CVS to a proper distributed version control system such as [git](http://git.or.cz), which will provide this sort of functionality very naturally. Subversion also provides svnsync which does the same sort of thing.
null
CC BY-SA 2.5
null
2008-08-19T12:54:44.990
2008-08-19T12:54:44.990
null
null
893
null
16,107
2
null
16,100
18
null
[Enum.Parse](https://msdn.microsoft.com/en-us/library/aa328348.aspx) is your friend: ``` StatusEnum MyStatus = (StatusEnum)Enum.Parse(typeof(StatusEnum), "Active"); ```
null
CC BY-SA 3.0
null
2008-08-19T12:55:31.743
2015-08-30T12:37:32.907
2015-08-30T12:37:32.907
63,550
192
null
16,112
2
null
16,100
23
null
``` object Enum.Parse(System.Type enumType, string value, bool ignoreCase); ``` So if you had an enum named mood it would look like this: ``` enum Mood { Angry, Happy, Sad } // ... Mood m = (Mood) Enum.Parse(typeof(Mood), "Happy", true); Console.WriteLine("My mood is: {0}", m.ToStr...
null
CC BY-SA 2.5
null
2008-08-19T12:58:57.730
2008-08-19T12:58:57.730
null
null
225
null
16,110
1
16,130
null
5
3,715
I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents. The contents need to be handle when enter is pushed. That part I think I have figured out but any suggestions would be welcome. The part I need hel...
C# Auto Clearing Winform Textbox
CC BY-SA 3.0
0
2008-08-19T12:55:46.423
2013-01-23T06:31:26.887
2013-01-23T06:31:26.887
1,410,342
1,629
[ "c#", "winforms", "textbox" ]
16,108
2
null
16,096
35
null
But you can extend from another.. take a look at the BasedOn property ``` <Style TargetType="TextBlock"> <Setter Property="Margin" Value="3" /> </Style> <Style x:Key="AlwaysVerticalStyle" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}"> <Setter Property="VerticalAlignment" Valu...
null
CC BY-SA 3.0
null
2008-08-19T12:55:32.417
2012-12-14T10:05:28.263
2012-12-14T10:05:28.263
45,382
900
null
16,118
2
null
16,114
0
null
Right-click the toolbox, click "Choose Items" from the context menu, browse to your DLL, and select it.
null
CC BY-SA 2.5
null
2008-08-19T13:01:30.000
2008-08-19T13:01:30.000
null
null
35
null
16,114
1
16,134
null
7
3,562
This is in reference to my other question [Auto Clearing Textbox](https://stackoverflow.com/questions/16110/c-auto-clearing-winform-textbox). If I choose to derive a new TextBox control from TextBox instead of implement a user control just containing my Textbox, how would I include that in the toolbox.
C# Include Derived Control in Toolbox
CC BY-SA 3.0
null
2008-08-19T12:59:41.690
2013-07-04T12:23:31.530
2017-05-23T11:52:17.120
-1
1,629
[ "c#", "visual-studio", "winforms", "textbox" ]
16,113
1
16,696
null
25
9,158
Can I get some recommendations (preferably with some reasons) for good log analysis software for Apache 2.2 access log files? I have heard of [Webalizer](http://www.webalizer.org/) and [AWStats](http://awstats.sourceforge.net/), but have never really used any of them, and would like to know: - - - Any and all comme...
Software for Webserver Log Analysis?
CC BY-SA 3.0
0
2008-08-19T12:59:40.550
2012-04-25T16:59:27.820
2012-04-25T16:59:27.820
1,332,690
277
[ "apache", "logging", "logfile-analysis" ]
16,120
2
null
16,113
5
null
I use [Analog](http://analog.cx) because it's free, but it is rather dated now (wow, last release was 4 years ago!) and I'm sure it doesn't have as many fancy features as newer ones.
null
CC BY-SA 2.5
null
2008-08-19T13:03:13.447
2008-08-19T13:03:13.447
null
null
893
null
16,122
2
null
16,097
2
null
If you do take the rsync/filecopy approach with CVS, it is important to only sync the files at a time when there is not an active commit. Otherwise, the repository's lock file will get copied over and you will be unable to checkout/update on the target side until the next sync. This reason alone may make CVS a bad cho...
null
CC BY-SA 2.5
null
2008-08-19T13:04:06.813
2008-08-19T13:04:06.813
null
null
1,820
null
16,119
2
null
16,110
1
null
OK, are you sure that is wise? I am picturing two scenarios here: 1. There is a default button on the form, which is "clicked" when enter is pushed". 2. There is no default button, and you want the user to have to press enter, regardless. Both of these raise the same questions: - - - Also, as a polite note, can...
null
CC BY-SA 2.5
null
2008-08-19T13:02:44.850
2008-08-19T13:02:44.850
null
null
832
null
16,125
2
null
16,097
0
null
The Best (and perhaps costliest) way is [Clearcase Multisite](http://www-01.ibm.com/software/awdtools/clearcase/multisite/) But if you are looking for opensource, [Git](http://git.or.cz/) is becoming quickly replacing svn everywhere..
null
CC BY-SA 2.5
null
2008-08-19T13:06:40.507
2008-08-19T13:06:40.507
null
null
123
null
16,126
2
null
15,816
1
null
> On the other hand, if there's a way to move an existing window from one X-server to another, that might solve the problem. I think you can use [xmove](http://ubuntuforums.org/showthread.php?t=202589) to move windows between two separate x-servers. So if it works, this should at least give you a way to do what ...
null
CC BY-SA 2.5
null
2008-08-19T13:07:41.220
2008-08-19T13:07:41.220
null
null
238
null
16,128
2
null
13,620
12
null
Don't get too caught up on trying to optimize string operations in PHP. Concatenation vs. interpolation is meaningless (in real world performance) if your database queries are poorly written or you aren't using any kind of caching scheme. Write your string operations in such a way that debugging your code later will be...
null
CC BY-SA 2.5
null
2008-08-19T13:12:17.407
2008-08-19T13:44:12.503
2008-08-19T13:44:12.503
302
302
null
16,130
2
null
16,110
4
null
Hook into the KeyPress event on the TextBox, and when it encounters the Enter key, run your hardware setting code, and then highlight the full text of the textbox again (see below) - Windows will take care of clearing the text with the next keystroke for you. ``` TextBox1.Select(0, TextBox1.Text.Length); ```
null
CC BY-SA 2.5
null
2008-08-19T13:12:51.867
2008-08-19T13:12:51.867
null
null
35
null
16,131
2
null
16,100
8
null
``` // str.ToEnum<EnumType>() T static ToEnum<T>(this string str) { return (T) Enum.Parse(typeof(T), str); } ```
null
CC BY-SA 3.0
null
2008-08-19T13:13:38.277
2014-09-05T15:06:47.143
2014-09-05T15:06:47.143
1,659
1,659
null
16,138
2
null
16,113
5
null
[Splunk >](http://www.splunk.com/) is great, and free. It allows you to visualize and search all of your logs in real time. And it's all web based, so you can view your logs from just about anywhere.
null
CC BY-SA 2.5
null
2008-08-19T13:19:03.990
2008-08-19T13:19:03.990
null
null
194
null
16,134
2
null
16,114
8
null
> Right-click the toolbox, click "Choose Items" from the context menu, browse to your DLL, and select it. To extend on Greg's answer... Just to clarify, you cannot add a user control to the tool box if the code for it is in the same project that you want to use it in. For some reason MS has never added this abili...
null
CC BY-SA 2.5
null
2008-08-19T13:16:12.793
2008-08-19T13:16:12.793
null
null
194
null
16,142
1
16,163
null
1,210
456,587
I've seen these words a lot around Subversion (and I guess general repository) discussions. I have been using for my projects for the last few years, but I've never grasped the complete concept of these directories. What do they mean?
What do "branch", "tag" and "trunk" mean in Subversion repositories?
CC BY-SA 4.0
0
2008-08-19T13:22:03.750
2021-01-06T08:26:44.423
2021-01-06T08:26:44.423
2,932,052
914
[ "svn", "branch", "terminology", "trunk" ]
16,140
1
16,817
null
45
12,054
What makes a module/service/bit of application functionality a particularly good candidate for an OSGi module? I'm interested in using [OSGi](http://en.wikipedia.org/wiki/OSGi) in my applications. We're a Java shop and we use Spring pretty extensively, so I'm leaning toward using [Spring Dynamic Modules for OSGi(tm) ...
What's the best way to get started with OSGI?
CC BY-SA 2.5
0
2008-08-19T13:20:49.010
2018-09-19T21:06:35.393
2008-08-19T17:00:07.867
765
765
[ "java", "spring", "osgi" ]
16,139
2
null
13,545
1
null
No it is a side effect of Crystal Reports. If you don't need it, remove it from your computer it is nothing but a headache. It is safe to delete the aspnet_client folder.
null
CC BY-SA 2.5
null
2008-08-19T13:20:16.953
2008-08-19T13:20:16.953
null
null
17
null
16,145
1
null
null
3
5,492
I have a custom action in a workflow and would like to report an error to the user when something goes wrong. What's the best way of doing that? Ideally I would like to put the workflow in the error state and log a message to the workflow log. That doesn't seem possible. What's the closest I can get to it? I want ...
What's the best way to report errors from a SharePoint workflow?
CC BY-SA 3.0
null
2008-08-19T13:24:19.953
2012-09-20T11:14:34.907
2012-09-20T11:14:34.907
1,288
1,533
[ "sharepoint", "error-handling", "moss", "workflow" ]
16,146
2
null
16,142
39
null
In SVN a tag and branch are really similar. = a defined slice in time, usually used for releases = also a defined slice in time that development can continue on, usually used for major version like 1.0, 1.5, 2.0, etc, then when you release you tag the branch. This allows you to continue to support a production r...
null
CC BY-SA 2.5
null
2008-08-19T13:25:17.410
2008-08-19T13:25:17.410
null
null
17
null
15,971
2
null
15,954
3
null
You can take the C code almost without changes: ``` uint sdbm( string str ) { uint hash = 0; foreach( char ch in str ) { hash = ch + (hash << 6) + (hash << 16) - hash; } return hash; } ``` Or did you think of something more sophisticated?
null
CC BY-SA 2.5
null
2008-08-19T10:52:35.800
2008-08-19T10:52:35.800
null
null
1,810
null
16,151
2
null
16,142
33
null
They don't really have any formal meaning. A folder is a folder to SVN. They are a generally accepted way to organize your project. - The trunk is where you keep your main line of developmemt. The branch folder is where you might create, well, branches, which are hard to explain in a short post.- A branch is a copy o...
null
CC BY-SA 3.0
null
2008-08-19T13:27:23.193
2016-01-03T20:01:46.727
2016-01-03T20:01:46.727
63,550
1,219
null
16,160
2
null
16,142
5
null
I'm not really sure what 'tag' is, but branch is a fairly common source control concept. Basically, a branch is a way to work on changes to the code without affecting trunk. Say you want to add a new feature that's fairly complicated. You want to be able to check in changes as you make them, but don't want it to aff...
null
CC BY-SA 3.0
null
2008-08-19T13:34:21.200
2012-04-09T18:26:25.110
2012-04-09T18:26:25.110
63,550
1,409
null
16,079
2
null
16,074
27
null
Simply delete the .suo file. It contains the list of open files.
null
CC BY-SA 2.5
null
2008-08-19T12:36:13.470
2008-08-19T12:36:13.470
null
null
968
null
16,161
1
290,184
null
1
244
The [cvsnt manual](http://www.cvsnt.org/manual/html/commit-files.html#syntax) provides a detailed list of parameters than can be passed to the postcommand module, but none of them specify the file name. Is anybody aware of an option not listed here that would provide the name of the file being checked in? ColinYounge...
cvs checkin: Identifying the names of the files checked in
CC BY-SA 2.5
null
2008-08-19T13:34:24.710
2008-11-14T14:12:36.420
2008-11-14T14:12:36.420
259
259
[ "cvs", "cvsnt" ]
16,048
2
null
15,851
1
null
> > I believe the question was how to remove the labels, not how to optimize the algorithm. It appeared to me that the original poster was unaware of how to use 'continue' and 'break' keywords without labels, but of course, my assumptions may be wrong. When it comes to performance, the post does not give any inform...
null
CC BY-SA 2.5
null
2008-08-19T12:15:13.370
2008-08-19T12:22:07.037
2008-08-19T12:22:07.037
1,709
1,709
null
16,162
2
null
15,674
2
null
If having the revision numbers change based on other projects bothers you, then put the projects in separate repositories. That is the only way to make the revision numbers independent. To me, the big reason to use different repositories is to provide separate access control for users and/or using different hook scrip...
null
CC BY-SA 2.5
null
2008-08-19T13:35:16.047
2008-08-19T13:35:16.047
null
null
1,441
null
16,101
2
null
16,097
4
null
When using CVS, I don't know any tools to do that other than files syncing. You can achieve that using tools like `rsync` (Unix) or `xcopy`/`robocopy` (Windows). If you plan on migrating to Subversion, it provides a tool called svnsync that allows to sync a repository from another one.
null
CC BY-SA 3.0
null
2008-08-19T12:52:05.653
2012-04-25T16:59:20.843
2012-04-25T16:59:20.843
1,332,690
268
null
16,155
1
16,245
null
2
2,416
The Example: I'm probably doing something wrong, but here is what I have: ``` interface iVendor{ public function __construct($vendors_no = null); public function getName(); public function getVendors_no(); public function getZip(); public function getCountryCode(); public function setName($n...
Making one interface overwrite a method it inherits from another interface in PHP
CC BY-SA 3.0
null
2008-08-19T13:32:12.247
2016-01-14T13:02:51.490
2016-01-14T13:02:51.490
4,932,070
58
[ "php", "oop", "interface", "extends" ]
16,166
2
null
16,164
0
null
I have seen RSS used to syndicate gas prices from a service for a specific zip code.
null
CC BY-SA 2.5
null
2008-08-19T13:38:54.153
2008-08-19T13:38:54.153
null
null
17
null
16,169
2
null
16,164
0
null
[immobilienscout24](http://www.immobilienscout24.com/) they use RSS feeds for updates on your search.
null
CC BY-SA 3.0
null
2008-08-19T13:40:52.683
2013-01-23T05:09:13.227
2013-01-23T05:09:13.227
1,410,342
1,168
null
16,164
1
16,746
null
6
1,147
I wondered if anyone can give an example of a professional use of RSS/Atom feeds in a company product. Does anyone use feeds for other things than updating news? For example, did you create a product that gives results as RSS/Atom feeds? Like price listings or current inventory, or maybe dates of training lessons? Or...
RSS/Atom for professional use
CC BY-SA 2.5
0
2008-08-19T13:36:19.040
2017-05-06T14:28:55.897
2017-05-23T12:34:21.327
-1
834
[ "rss", "use-case", "feed", "atom-feed" ]
16,168
2
null
15,949
11
null
[Tomcat Documentation](http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html) DBCP uses the Jakarta-Commons Database Connection Pool. It relies on number of Jakarta-Commons components: ``` * Jakarta-Commons DBCP * Jakarta-Commons Collections * Jakarta-Commons Pool ``` This attribute may help y...
null
CC BY-SA 2.5
null
2008-08-19T13:40:10.283
2008-08-19T13:40:10.283
null
null
1,310
null
16,152
2
null
16,142
9
null
The trunk directory is the directory that you're probably most familiar with, because it is used to hold the most recent changes. Your main codebase should be in trunk. The branches directory is for holding your branches, whatever they may be. The tags directory is basically for tagging a certain set of files. You do...
null
CC BY-SA 3.0
null
2008-08-19T13:28:01.397
2012-04-09T18:08:45.227
2012-04-09T18:08:45.227
63,550
1,546
null
16,170
2
null
16,064
0
null
I mainly code ColdFusion or PHP (and JS/CSS/xHTML), but have dabbled in a bit of RoR. RadRails/Apatana has been great for me, because it's built on Eclipse, which I was already using for my other work. It also integrates with Subversion via the Subclipse plugin. The Eclipse platform is so extensible that it's worth i...
null
CC BY-SA 2.5
null
2008-08-19T13:41:03.807
2008-08-19T13:41:03.807
null
null
1,025
null
16,176
2
null
16,164
1
null
Most of the digital libraries uses RSS/ATOM to display their search/results, data update, according to the [OAI-PMH protocol](http://www.openarchives.org/OAI/openarchivesprotocol.html)
null
CC BY-SA 2.5
null
2008-08-19T13:44:36.140
2008-08-19T13:44:36.140
null
null
1,730
null