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
37,550
2
null
37,529
3
null
Apple provides sample code for [reading and writing audio data](https://developer.apple.com/library/content/navigation/index.html#topic=Sample+Code&section=Resource+Types). Additionally there is a lot of good information in the [Audio section of the Apple Developer site](http://developer.apple.com/audio/).
null
CC BY-SA 3.0
null
2008-09-01T07:00:17.753
2017-09-13T06:01:43.880
2017-09-13T06:01:43.880
61,654
116
null
37,548
2
null
37,516
6
null
> Is there a way to determine at what point I would encounter a stack overflow? Not really. A stack overflow happens when you exhaust the stack space - however... - - - The only times I've ever hit one is in an infinite loop, or using the aforementioned 200k buffer. I find it far more prefereable for my app to ju...
null
CC BY-SA 2.5
null
2008-09-01T06:58:57.333
2008-09-01T06:58:57.333
null
null
234
null
37,554
2
null
33,055
0
null
as others have said, hot-backup.py from the Subversion team has some nice features over just plain `svnadmin hotcopy` I run a scheduled task on a python script that spiders for all my repositories on the machine, and uses hotbackup to keep several days worth of hotcopies (paranoid of corruption) and an `svnadmin svndu...
null
CC BY-SA 2.5
null
2008-09-01T07:02:54.440
2008-09-01T07:02:54.440
null
null
3,716
null
37,553
2
null
37,535
8
null
You can try this [recipe on Active State](http://code.activestate.com/recipes/362715/). There is also a [DBFReader module](http://code.google.com/p/lino/source/browse/lino/utils/dbfreader.py) which you can try. For support for [memo fields](http://www.physics.ox.ac.uk/users/santoso/dbf.py.src).
null
CC BY-SA 3.0
null
2008-09-01T07:02:10.853
2013-12-21T05:00:45.893
2013-12-21T05:00:45.893
57,318
1,448
null
37,562
2
null
37,471
1
null
I dunno if it works, but no matter what . Finding cycles will be the freaking huge bottleneck that will kill it. Also doing that without iterations is impossible. Why don't you implement some standard algorithm, let's say [Prim's](http://en.wikipedia.org/wiki/Prim%27s_algorithm).
null
CC BY-SA 2.5
null
2008-09-01T07:17:30.567
2008-09-01T07:17:30.567
null
null
3,105
null
37,555
1
37,916
null
5
990
I have an extender control that raises a textbox's `OnTextChanged` event 500ms after the user has finished typing. The problem with this is that `OnTextChanged` gets raised when the textbox loses focus, which causes problems (because of the postback). What I'd like to do is give the extender control its own server-sid...
Adding server-side event to extender control
CC BY-SA 3.0
0
2008-09-01T07:04:07.760
2014-12-13T02:21:59.217
2014-12-13T02:21:59.217
1,810,429
1,003
[ "asp.net", ".net-3.5" ]
37,477
2
null
37,471
1
null
What happens if two cycles overlap? Which one has its longest edge removed first? Does it matter if the longest edge of each is shared between the two cycles or not? For example: ``` V = { a, b, c, d } E = { (a,b,1), (b,c,2), (c,a,4), (b,d,9), (d,a,3) } ``` There's an a -> b -> c -> a cycle, and an a -> b -> d ->...
null
CC BY-SA 2.5
null
2008-09-01T05:16:46.487
2008-09-01T05:16:46.487
null
null
1,190
null
37,567
2
null
308
3
null
In the absence of a VCS for table changes I've been logging them in a wiki. At least then I can see when and why it was changed. It's far from perfect as not everyone is doing it and we have multiple product versions in use, but better than nothing.
null
CC BY-SA 2.5
null
2008-09-01T07:29:33.593
2008-09-01T07:29:33.593
null
null
1,895
null
37,551
1
null
null
6
6,958
I have a problem with an application running on Fedora Core 6 with JDK 1.5.0_08. After some amount of uptime (usually some days) threads begin getting stuck in native methods. The threads are locked in something like this: ``` "pool-2-thread-2571" prio=1 tid=0x08dd0b28 nid=0x319e waiting for monitor entry [0xb91fe000.....
Multiple threads stuck in native calls (Java)
CC BY-SA 4.0
0
2008-09-01T07:01:34.613
2022-05-19T14:03:58.123
2022-05-19T14:03:58.123
4,294,399
3,904
[ "java", "multithreading", "native-methods", "blocked-threads" ]
37,564
1
5,651,141
null
46
32,692
I am trying to figure out what exactly is Appdomain recycling? When a aspx page is requested for the first time from a DotNet application, i understand that an appdomain for that app is created, and required assemblies are loaded into that appdomain, and the request will be served. Now, if the web.config file or the c...
What exactly is Appdomain recycling
CC BY-SA 2.5
0
2008-09-01T07:24:22.857
2014-12-01T19:43:09.860
null
null
1,647
[ "asp.net" ]
37,568
1
37,641
null
16
6,278
How do I find duplicate addresses in a database, or better stop people already when filling in the form ? I guess the earlier the better? Is there any good way of abstracting street, postal code etc so that typos and simple attempts to get 2 registrations can be detected? like: ``` Quellenstrasse 66/11 Quellenstr. ...
find duplicate addresses in database, stop users entering them early?
CC BY-SA 2.5
0
2008-09-01T07:30:48.367
2021-02-02T14:10:07.023
2013-10-24T03:33:42.513
246,246
925
[ "database", "sanitization", "street-address" ]
37,573
1
38,104
null
1
728
So I've been using InstantRails to check out Ruby on rails. I've been using Notepad++ for the editing. Now I don't want to install Ruby or Rails on my machine. Is there any walk through/tutorial on how to integrate Radrails or Netbeans with InstantRails?
Integrating InstantRails with Aptana or any other IDE
CC BY-SA 2.5
null
2008-09-01T07:41:10.603
2017-08-09T20:24:17.533
null
null
1,688,440
[ "ruby-on-rails", "ruby", "ide", "aptana", "radrails" ]
37,574
2
null
37,378
2
null
Don't make it a religion or faith discussion. Those are hard to win (and is not what you want anyway) Don't frame it the way you just did in your question. The issue is not getting anyone to agree that this way or that way is the general way they should work. You should talk about how each one needs to think in order ...
null
CC BY-SA 2.5
null
2008-09-01T07:41:29.837
2008-09-01T07:41:29.837
null
null
350
null
37,565
2
null
37,263
0
null
[Andy Rutledge](http://www.andyrutledge.com/) has written a pretty interesting article on success. Though the title is [Pre-bid Discussions](http://andyrutledge.com/pre-bid-discussions.php), the article defines , which for Andy entails: 1. Will I or my team be allowed to bring our best work to the final result? 2. Is...
null
CC BY-SA 2.5
null
2008-09-01T07:25:37.130
2008-09-01T07:25:37.130
null
null
341
null
37,577
2
null
37,568
0
null
Often you use constraints in a database to ensure data to be "unique" in the data-based sense. Regarding "isomorphisms" I think you are on your own, ie writing the code your self. If in the database you could use a trigger.
null
CC BY-SA 2.5
null
2008-09-01T07:44:36.647
2008-09-01T07:44:36.647
null
null
86
null
37,571
2
null
37,479
2
null
> Very close, but then I lose everything from ClassX. Below is something a collegue gave me that does do the trick, but it's hideous. There has to be a better way. Looks like you're trying to set up some sort of proxy object scheme. That's doable, and there are better solutions than your colleague's, but first conside...
null
CC BY-SA 2.5
null
2008-09-01T07:33:45.487
2008-09-01T07:33:45.487
null
null
3,560
null
37,578
2
null
37,519
1
null
I believe it's not possible to keep xml comments in sync with autogenerated code automatically. However, xml comments can leave in separate file (just set "XML documentation file" option on "Project properties"->"Build" tab). You can create initial version of XML documentation file and update in manually if necessary
null
CC BY-SA 2.5
null
2008-09-01T07:46:12.180
2008-09-01T07:46:12.180
null
null
1,196
null
37,576
2
null
23,930
14
null
# x86-64 Assembly: Procedural You can call this from C (only tested with GCC on linux amd64). Assembly was assembled with nasm. ``` section .text global factorial ; factorial in x86-64 - n is passed in via RDI register ; takes a 64-bit unsigned integer ; returns a 64-bit unsigned integer in RAX register ; C de...
null
CC BY-SA 2.5
null
2008-09-01T07:42:49.257
2008-10-06T13:26:50.413
2008-10-06T13:26:50.413
3,836
3,836
null
37,575
2
null
37,157
1
null
It may be complete overkill for what you're attempting, but have a look at [eAccelerator](http://eaccelerator.net/) or [memcache](http://www.danga.com/memcached/). If you have queries that will change regularly and queries that won't, you may not want all of your db queries cached for the same length of time by mysql. ...
null
CC BY-SA 2.5
null
2008-09-01T07:42:26.013
2008-09-01T07:42:26.013
null
null
2,287
null
37,566
2
null
37,043
48
null
[Mate](http://mate.asfusion.com/) is my pick. The first and foremost reason is that it is completely unobtrusive. My application code has no dependencies on the framework, it is highly decoupled, reusable and testable. One of the nicest features of Mate is the declarative configuration, essentially you wire up your a...
null
CC BY-SA 2.5
null
2008-09-01T07:27:05.347
2008-12-15T10:35:01.310
2008-12-15T10:35:01.310
1,109
1,109
null
37,583
2
null
37,579
7
null
What about SQL 2005's [service broker](http://msdn.microsoft.com/en-us/library/ms345108.aspx)?
null
CC BY-SA 3.0
null
2008-09-01T07:51:25.367
2017-02-08T10:10:58.800
2017-02-08T10:10:58.800
271,200
2,562
null
37,579
1
390,982
null
33
24,911
If you want to use a queuing product for durable messaging under Windows, running .NET 2.0 and above, which alternatives to MSMQ exist today? I know of ActiveMQ ([http://activemq.apache.org/](http://activemq.apache.org/)), and I've seen references to WSMQ (pointing to [http://wsmq.net](http://wsmq.net)), but the site s...
Queue alternatives to MSMQ on Windows?
CC BY-SA 2.5
0
2008-09-01T07:46:43.867
2017-05-30T17:35:10.917
null
null
3,985
[ ".net", "msmq", "soa", "messaging" ]
37,580
2
null
37,564
7
null
Take a look at this - that might explain it: [http://weblogs.asp.net/owscott/archive/2006/02/21/ASP.NET-v2.0-2D00-AppDomain-recycles_2C00_-more-common-than-before.aspx#440333](http://weblogs.asp.net/owscott/archive/2006/02/21/ASP.NET-v2.0-_2D00_-AppDomain-recycles_2C00_-more-common-than-before.aspx#440333) In genera...
null
CC BY-SA 2.5
null
2008-09-01T07:47:12.007
2008-09-01T07:47:12.007
null
null
2,972
null
37,584
1
46,000
null
3
285
I am implementing exception handling for our BizTalk services, and have run into a fairly major stumbling block. In order to make the exception processing as generic as possible, and therefore to allow us to use it for any BizTalk application, our XML error schema includes an xs:any node, into which we can place a var...
InfoPath 2003 and the xs:any type
CC BY-SA 3.0
null
2008-09-01T07:52:00.450
2015-11-20T11:46:40.473
2015-11-20T11:46:40.473
3,218,692
377
[ "xml", "forms", "infopath" ]
37,587
2
null
37,374
10
null
A quick answer: Use the Repository pattern (see Domain Driven Design by Evans) to fetch your entities. Each repository will cache the things it will hold, ideally by letting each instance of the repository access a singleton cache (each thread/request will instantiate a new repository but there can be only one cache). ...
null
CC BY-SA 2.5
null
2008-09-01T07:55:00.320
2010-12-07T15:45:43.457
2010-12-07T15:45:43.457
16,487
3,985
null
37,588
2
null
37,568
10
null
You could use the [Google GeoCode API](http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct) Wich in fact gives results for both of your examples, just tried it. That way you get structured results that you can save in your database. If the lookup fails, ask the user to write the address in an...
null
CC BY-SA 2.5
null
2008-09-01T07:58:58.890
2008-09-01T07:58:58.890
null
null
2,257
null
37,586
1
67,977
null
10
15,401
Our application is interfacing with a lot of web services these days. We have our own package that someone wrote a few years back using UTL_HTTP and it generally works, but needs some hard-coding of the SOAP envelope to work with certain systems. I would like to make it more generic, but lack experience to know how man...
Consuming web services from Oracle PL/SQL
CC BY-SA 2.5
0
2008-09-01T07:54:44.610
2016-05-07T03:14:30.783
2016-05-07T03:14:30.783
116
1,895
[ "sql", "oracle", "web-services", "plsql" ]
37,593
1
37,596
null
1
289
What is the best source of free Vista style graphics for application development? I want and that I can use in a Winforms application.
Where can I get free Vista style developer graphics?
CC BY-SA 3.0
null
2008-09-01T08:04:39.937
2017-07-04T08:52:56.990
2017-07-04T08:52:31.887
5,423,108
2,608
[ "winforms", "graphics" ]
37,595
2
null
37,593
3
null
Best place I've found for commercial toolbar icons etc is [glyfx.com](http://glyfx.com).
null
CC BY-SA 2.5
null
2008-09-01T08:05:51.057
2008-09-01T08:05:51.057
null
null
615
null
37,585
2
null
37,568
6
null
The earlier you can stop people, the easier it'll be in the long run! Not being too familiar with your db schema or data entry form, I'd suggest a route something like the following: - have distinct fields in your db for each address "part", e.g. street, city, postal code, Länder, etc.- have your data entry form bro...
null
CC BY-SA 2.5
null
2008-09-01T07:52:42.900
2008-09-01T07:52:42.900
null
null
2,287
null
37,596
2
null
37,593
3
null
If you're using Visual Studio Professional or above, you've got a zip file of icons in your VS path under `Common7\VS2008ImageLibrary`. Some of the images use the Vista style.
null
CC BY-SA 2.5
null
2008-09-01T08:07:11.477
2008-09-01T08:07:11.477
null
null
1,968
null
37,597
1
37,609
null
5
987
TreeNodeCollection, like some of the other control collections in System.Windows.Forms, implements IEnumerable. Is there any design reason behind this or is it just a hangover from the days before generics?
Why does TreeNodeCollection not implenent IEnumerable<TreeNode>?
CC BY-SA 2.5
0
2008-09-01T08:08:16.527
2015-08-31T12:07:19.257
null
null
2,608
[ ".net", "winforms" ]
37,604
2
null
37,486
0
null
Regular expressions are not scary, but writing your own regexes to strip HTML is a sure path to madness (and it won't work, either). Follow the path of wisdom, and use one of the many good HTML-parsing libraries. Lucas' example is also broken because "sub" is not a method of a Python string. You'd have to "import re...
null
CC BY-SA 2.5
null
2008-09-01T08:15:28.493
2008-09-01T08:15:28.493
null
null
3,207
null
37,589
2
null
17,333
14
null
> `return fabs(a - b) < EPSILON; This is fine if: - - But otherwise it'll lead you into trouble. Double precision numbers have a resolution of about 16 decimal places. If the two numbers you are comparing are larger in magnitude than EPSILON*1.0E16, then you might as well be saying: ``` return a==b; ``` I'll e...
null
CC BY-SA 2.5
null
2008-09-01T08:00:56.937
2008-09-01T08:00:56.937
null
null
null
null
37,570
2
null
37,532
0
null
It should be possible as the Task Scheduler has a scriptable [COM API](http://msdn.microsoft.com/en-us/library/aa383614%28VS.85%29.aspx) that can be used for interacting with tasks. You could therefore either create a custom task that uses COM interop to call the Task Scheduler API, or it'd probably be quicker to use ...
null
CC BY-SA 2.5
null
2008-09-01T07:32:40.420
2008-09-01T07:37:51.717
2008-09-01T07:37:51.717
2,562
2,562
null
37,607
2
null
37,597
0
null
Yes, Windows Forms dates back to before generics in .Net
null
CC BY-SA 2.5
null
2008-09-01T08:16:01.550
2008-09-01T08:16:01.550
null
null
3,974
null
37,612
2
null
37,591
0
null
You could try using the `DataGridView` control. To see an example, load an XML file in DevStudio and then right-click on the XML and select "View Data Grid". You'll need to read the API documentation on the control to use it.
null
CC BY-SA 3.0
null
2008-09-01T08:21:08.883
2012-07-03T13:15:33.727
2012-07-03T13:15:33.727
142,162
1,898
null
37,615
2
null
21,987
0
null
If that's the expected functionality I think it's not so useful, at least there should be a reset. I fixed it now just using the `FLASHW_ALL | FLASHW_TIMERNOFG` combination.
null
CC BY-SA 4.0
null
2008-09-01T08:25:52.727
2022-05-14T06:15:37.443
2022-05-14T06:15:37.443
850,848
2,090
null
37,609
2
null
37,597
7
null
Yes, there are many .NET Framework collection, that does not implement generic IEnumerable. I think that's because after 2.0 there was no (at least not so match) development of the core part of FW. Meanwhile I suggest you to make use of following workaround: ``` using System.Linq; ... var nodes = GetTreeNodeColle...
null
CC BY-SA 3.0
null
2008-09-01T08:17:21.467
2015-08-31T12:07:19.257
2015-08-31T12:07:19.257
1,169,228
2,313
null
37,620
2
null
36,647
9
null
I recommend [nose](https://nose.readthedocs.org/en/latest/). It is the most Pythonic of the unit test frameworks. The test runner runs both doctests and unittests, so you are free to use whatever style of test you like.
null
CC BY-SA 3.0
null
2008-09-01T08:30:52.620
2016-03-06T17:53:06.583
2016-03-06T17:53:06.583
3,571
3,571
null
37,619
2
null
37,479
2
null
Both of John's solutions would work. Another option that allows HTMLDecorator to remain very simple and clean is to monkey-patch it in as a base class. This also works only for user-defined classes, not builtin types: ``` import cgi class ClassX(object): pass # ... with own __repr__ class ClassY(object): p...
null
CC BY-SA 2.5
null
2008-09-01T08:30:41.247
2008-09-01T08:36:28.537
2008-09-01T08:36:28.537
3,207
3,207
null
37,623
2
null
37,568
2
null
One thing you might want to look at are [Soundex](http://en.wikipedia.org/wiki/Soundex) searches, which are quite useful for misspellings and contractions. This however is not an in-database validation so it may or may not be what you're looking for.
null
CC BY-SA 2.5
null
2008-09-01T08:34:10.757
2008-09-01T08:34:10.757
null
null
372
null
37,591
1
37,631
null
3
3,647
I would like to display details of an xml error log to a user in a winforms application and am looking for the best control to do the job. The error data contains all of the sever variables at the time that the error occurred. These have been formatted into an XML document that looks something to the effect of: ``` <...
Displaying XML data in a Winforms control
CC BY-SA 2.5
null
2008-09-01T08:03:52.047
2012-07-03T13:15:33.727
2010-10-03T09:10:04.630
18,061
231
[ "c#", "xml", "winforms", "formatting" ]
37,606
2
null
37,579
20
null
May not be "best practice" advice here... but based on real life needs and experience: we have distributed system, 60 boxes running each 10 clients all do task X, and they need to take the next task from a queue. The queue is being fed from one other "client"... We had used inter process communication, we used MSMQ, w...
null
CC BY-SA 3.0
null
2008-09-01T08:15:33.563
2017-05-30T17:35:10.917
2017-05-30T17:35:10.917
712,526
350
null
37,379
2
null
32,428
8
null
This is how I was able to solve the issue: - - modify the rssrvpolicy.config file to add permissions for the assembly``` <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Test" ...
null
CC BY-SA 2.5
null
2008-09-01T02:16:49.710
2008-09-01T02:16:49.710
null
null
326
null
37,622
2
null
37,568
2
null
Before you start searching for duplicate addresses in your database, you should first make sure you store the addresses in a standard format. Most countries have a standard way of formatting addresses, in the US it's the USPS CASS system: [http://www.usps.com/ncsc/addressservices/certprograms/cass.htm](http://www.usps...
null
CC BY-SA 2.5
null
2008-09-01T08:31:35.583
2008-09-01T08:31:35.583
null
null
373
null
37,625
2
null
37,614
1
null
I think it's not possible with Team Explorer. But you can with [CodePlex Source Control Client](http://www.codeplex.com/CodePlexClient) or [Tortoise](http://www.codeplex.com/CodePlex/Wiki/View.aspx?title=Using%20TortoiseSVN%20with%20CodePlex&referringTitle=Source%20control%20clients)
null
CC BY-SA 2.5
null
2008-09-01T08:36:35.413
2008-09-01T08:36:35.413
null
null
1,893
null
37,628
1
37,632
null
2,505
1,009,576
What is reflection, and why is it useful? I'm particularly interested in Java, but I assume the principles are the same in any language.
What is reflection and why is it useful?
CC BY-SA 4.0
0
2008-09-01T08:39:21.633
2022-11-27T07:51:35.143
2022-11-27T07:51:35.143
452,775
142
[ "java", "reflection", "terminology" ]
37,626
2
null
37,614
2
null
I think you have to use the [CodePlex Source Control Client](http://www.codeplex.com/CodePlexClient). In includes cpc.exe which supports the anonymous access features of CodePlex TFS servers for non-coordinator/developer access. But according to the site: > The CodePlex Client is not currently being maintained. The ...
null
CC BY-SA 2.5
null
2008-09-01T08:36:47.800
2008-09-01T08:36:47.800
null
null
718
null
37,603
2
null
1,711
5
null
There are a lot of votes for Steve McConnell's Code Complete, but what about his [Software Project Survival Guide](http://www.stevemcconnell.com/sg.htm) book? I think they're both required reading but for different reasons.
null
CC BY-SA 2.5
null
2008-09-01T08:14:50.537
2008-09-01T08:14:50.537
null
null
null
null
37,634
2
null
37,628
17
null
Reflection is a set of functions which allows you to access the runtime information of your program and modify it behavior (with some limitations). It's useful because it allows you to change the runtime behavior depending on the meta information of your program, that is, you can check the return type of a function an...
null
CC BY-SA 4.0
null
2008-09-01T08:50:52.260
2020-03-27T20:37:23.493
2020-03-27T20:37:23.493
1,446,845
2,695
null
37,635
2
null
37,628
48
null
Not every language supports reflection, but the principles are usually the same in languages that support it. Reflection is the ability to "reflect" on the structure of your program. Or more concrete. To look at the objects and classes you have and programmatically get back information on the methods, fields, and inter...
null
CC BY-SA 4.0
null
2008-09-01T08:50:57.813
2020-10-09T03:53:34.040
2020-10-09T03:53:34.040
1,402,846
3,320
null
37,636
2
null
37,378
1
null
Most programmers don't like to stray out of their comfort zones (note that the intersection of the 'most programmers' set and the 'Stack Overflow' set is the probably the empty set). "If it worked before (or even just worked) then keep on doing it". The project I'm currently on required a lot of argument to get the old...
null
CC BY-SA 3.0
null
2008-09-01T08:50:58.237
2012-07-03T14:17:39.493
2012-07-03T14:17:39.493
142,162
1,898
null
37,644
1
37,655
null
61
70,936
I have a set of Berkeley DB files on my Linux file system that I'd like to examine. What useful tools exist for getting a quick overview of the contents? I can write Perl scripts that use BDB modules for examining them, but I'm looking for some CLI utility to be able to take a look inside without having to start writi...
Examining Berkeley DB files from the CLI
CC BY-SA 2.5
0
2008-09-01T09:10:27.487
2022-02-23T20:25:49.943
null
null
1,951
[ "linux", "command-line-interface", "berkeley-db" ]
37,632
2
null
37,628
1,990
null
The name reflection is used to describe code which is able to inspect other code in the same system (or itself). For example, say you have an object of an unknown type in Java, and you would like to call a 'doSomething' method on it if one exists. Java's static typing system isn't really designed to support this unles...
null
CC BY-SA 4.0
null
2008-09-01T08:44:58.657
2020-03-07T23:08:52.583
2020-03-07T23:08:52.583
12,989,494
797
null
37,638
2
null
37,628
297
null
> is a language's ability to inspect and dynamically call classes, methods, attributes, etc. at runtime. For example, all objects in Java have the method `getClass()`, which lets you determine the object's class even if you don't know it at compile time (e.g. if you declared it as an `Object`) - this might seem trivi...
null
CC BY-SA 3.0
null
2008-09-01T08:52:29.400
2016-01-24T00:36:55.563
2016-01-24T00:36:55.563
1,533,054
890
null
37,646
2
null
3,823
2
null
I have found these two links useful: Using CLR and single audit table. [Creating a generic audit trigger with SQL 2005 CLR](http://web.archive.org/web/20090429064008/www.sqljunkies.ddj.com/Article/4CD01686-5178-490C-A90A-5AEEF5E35915.scuk) Using triggers and separate audit table for each table being audited. [How do ...
null
CC BY-SA 3.0
null
2008-09-01T09:14:48.070
2013-01-27T12:44:00.137
2018-11-13T23:39:40.310
-1
3,416
null
37,641
2
null
37,568
4
null
> Johannes:> @PConroy: This was my initial thougt also. the interesting part on this is to find good transformation rules for the different parts of the address! Any good suggestions? When we were working on this type of project before, our approach was to take our existing corpus of addresses (150k or so), then apply ...
null
CC BY-SA 4.0
null
2008-09-01T09:05:24.770
2021-02-02T14:10:07.023
2021-02-02T14:10:07.023
1,677,209
2,287
null
37,631
2
null
37,591
1
null
You can transform your XML data using [XSLT](http://www.xml.com/pub/a/2002/08/14/dotnetxslt.html) Another option is to use XLinq. If you want concrete code example provide us with sample data : here is a sample XSLT transform for your XML file: ``` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL...
null
CC BY-SA 2.5
null
2008-09-01T08:42:23.827
2008-09-01T09:41:19.207
2008-09-01T09:41:19.207
1,196
1,196
null
37,653
2
null
37,649
4
null
Two alternatives 1. Use a temporary table 2. Investigate the [XOR algorithm](http://en.wikipedia.org/wiki/XOR_swap_algorithm)
null
CC BY-SA 2.5
null
2008-09-01T09:24:35.563
2008-09-01T09:24:35.563
null
null
2,902
null
37,647
2
null
23,930
2
null
# Visual Basic: Linq ``` <Extension()> _ Public Function Product(ByVal xs As IEnumerable(Of Integer)) As Integer Return xs.Aggregate(1, Function(a, b) a * b) End Function Public Function Fact(ByVal n As Integer) As Integer Return Aggregate x In Enumerable.Range(1, n) Into Product() End Function ``` This ...
null
CC BY-SA 2.5
null
2008-09-01T09:16:11.933
2008-09-01T09:16:11.933
null
null
1,968
null
37,614
1
37,626
null
1
527
I was using Codeplex and tried connecting to their source control using Team Explorer, with no joy. I also tried connecting with HTTPS or HTTP, using the server name and the project name. As I do not have a user account on Codeplex I could not login. I am just trying to check out some code without changing it. My qu...
Connecting Team Explorer to Codeplex anonymously
CC BY-SA 3.0
null
2008-09-01T08:23:52.013
2016-06-11T20:06:27.347
2016-06-11T20:06:27.347
5,202,687
1,583
[ "version-control", "tfs", "codeplex" ]
37,650
1
37,656
null
25
73,209
What is the best way to implement, from a web page a download action using asp.net 2.0? Log files for a action are created in a directory called [Application Root]/Logs. I have the full path and want to provide a button, that when clicked will download the log file from the IIS server to the users local pc.
How to implement a file download in asp.net
CC BY-SA 2.5
0
2008-09-01T09:21:14.637
2013-10-13T15:04:54.817
2008-09-09T21:13:42.653
-1
3,416
[ "asp.net", "file", "download" ]
37,649
1
559,291
null
155
117,567
I have a MySQL table with coordinates, the column names are X and Y. Now I want to swap the column values in this table, so that X becomes Y and Y becomes X. The most apparent solution would be renaming the columns, but I don't want to make structure changes since I don't necessarily have permissions to do that. Is th...
Swapping column values in MySQL
CC BY-SA 2.5
0
2008-09-01T09:19:56.560
2022-09-28T20:42:58.850
2008-09-01T09:54:32.013
890
890
[ "mysql", "database" ]
37,654
2
null
37,568
1
null
To add an answer to my own question: A different way of doing it is ask users for their mobile phone number, send them a text msg for verification. This stops most people messing with duplicate addresses. I'm talking from personal experience. (thanks [pigsback](http://www.pigsback.ie) !) They introduced confirmation...
null
CC BY-SA 2.5
null
2008-09-01T09:24:46.313
2008-09-01T09:24:46.313
null
null
925
null
37,661
2
null
37,525
0
null
On Vista could it also be that it's "marked" as unsafe because it's been downloaded from the internet and you have to click the unblock button on it's explorer properties dialog?
null
CC BY-SA 2.5
null
2008-09-01T09:34:16.027
2008-09-01T09:34:16.027
null
null
2,541
null
37,656
2
null
37,650
38
null
Does this help: [http://www.west-wind.com/weblog/posts/76293.aspx](http://www.west-wind.com/weblog/posts/76293.aspx) ``` Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition","attachment; filename=logfile.txt"); Response.TransmitFile( Server.MapPath("~/logfile.txt") ); Respons...
null
CC BY-SA 2.5
null
2008-09-01T09:25:28.073
2008-09-01T09:31:57.387
2008-09-01T09:31:57.387
770
770
null
37,662
1
38,278
null
1
6,563
I'm writing a Perl script and would like to use a n-ary tree data structure. Is there a good implementation that is available as source code (rather than part of a Perl library) ?
Is there an n-ary tree implementation in Perl?
CC BY-SA 2.5
0
2008-09-01T09:34:37.880
2020-08-26T15:17:56.710
2010-01-07T13:26:05.937
2,766,176
381
[ "perl", "algorithm", "tree" ]
37,655
2
null
37,644
27
null
Check out the package. If you use apt, you can install it with the following: `apt-get install db-util` (or `apt-get install db4.8-util` or whatever version you have or prefer.) Additional links: - [http://rpmfind.net/linux/rpm2html/search.php?query=db-utils](http://rpmfind.net/linux/rpm2html/search.php?query=db-u...
null
CC BY-SA 4.0
null
2008-09-01T09:24:51.850
2019-07-04T10:16:48.513
2019-07-04T10:16:48.513
5,048,049
2,783
null
37,659
2
null
37,628
51
null
Reflection is a key mechanism to allow an application or framework to work with code that might not have even been written yet! Take for example your typical web.xml file. This will contain a list of servlet elements, which contain nested servlet-class elements. The servlet container will process the web.xml file, and...
null
CC BY-SA 2.5
null
2008-09-01T09:30:55.270
2008-09-01T09:30:55.270
null
null
3,295
null
37,660
2
null
37,649
13
null
will do precisely what you want (edit: in PostgreSQL, not MySQL, see below). The values are taken from the old row and assigned to a new copy of the same row, then the old row is replaced. You do not have to resort to using a temporary table, a temporary column, or other swap tricks. @D4V360: I see. That is shocking ...
null
CC BY-SA 3.0
null
2008-09-01T09:31:30.213
2012-07-31T21:32:21.573
2012-07-31T21:32:21.573
890,308
893
null
37,664
2
null
23,930
6
null
PowerShell ``` function factorial( [int] $n ) { $result = 1; if ( $n -gt 1 ) { $result = $n * ( factorial ( $n - 1 ) ) } $result } ``` Here's a one-liner: ``` $n..1 | % {$result = 1}{$result *= $_}{$result} ```
null
CC BY-SA 2.5
null
2008-09-01T09:38:02.130
2008-09-02T03:23:35.673
2008-09-02T03:23:35.673
3,950
3,950
null
37,668
2
null
37,665
4
null
It's to guard against [multiple definitions](http://www.fredosaurus.com/notes-cpp/preprocessor/ifdef.html).
null
CC BY-SA 2.5
null
2008-09-01T09:43:02.727
2008-09-01T09:43:02.727
null
null
3,827
null
37,669
2
null
37,665
0
null
I think it's a throwback of C include issues, where multiple copies of the source would get included - unless you are meticulous with include chains (One file includes n others). Checking if a symbol is defined and including only if the symbol is defined - was a way out of this.
null
CC BY-SA 2.5
null
2008-09-01T09:43:06.160
2008-09-01T09:43:06.160
null
null
1,695
null
37,666
1
37,675
null
19
7,674
I have a few Visual Studio Solutions/Projects that are being worked on in my company, which now require a scheme for automatic nightly builds. Such a scheme needs to be able to check the latest versions from SVN, build the solutions, create the appropriate downloadable files (including installers, documentation, etc.),...
What tool to use for automatic nightly builds?
CC BY-SA 2.5
0
2008-09-01T09:41:14.777
2010-11-16T11:30:25.300
2008-09-02T05:08:13.317
305
3,379
[ "visual-studio", "build-process" ]
37,670
2
null
37,666
1
null
I've recently started using CruiseControl.NET ([http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET](http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET)). It works reasonably well, although configuration could be easier. CruiseControl.NET is free and op...
null
CC BY-SA 2.5
null
2008-09-01T09:43:42.307
2008-09-01T09:43:42.307
null
null
890
null
37,665
1
37,668
null
4
279
When creates a new file ( or file) in a C project the editor always auto creates a `#define` at the top of the file like this: If the file is named 'myCFile.c' there will be a `#define` at the start of the file like this ``` #ifndef MYCFILE_C_ #define MYCFILE_C_ ``` I have seen other editors do this as well (Codew...
Auto defines in C editors... Why?
CC BY-SA 3.0
null
2008-09-01T09:38:46.700
2015-06-02T14:45:32.817
2015-06-02T14:45:32.817
2,587,908
2,079
[ "c", "eclipse", "header-files", "c-preprocessor", "include-guards" ]
37,672
1
null
null
1
16,745
I have created a database model in Visio Professional (2003). I know that the Enterprise version has the ability to create a DB in SQL Server based on the data in Visio. I do not have the option to install Enterprise. Aside from going through the entire thing one table and relationship at a time and creating the whole ...
Create DB in SQL Server based on Visio Data Model
CC BY-SA 3.0
0
2008-09-01T09:44:58.573
2017-11-28T19:10:45.313
2017-11-28T18:19:03.573
5,251,104
51
[ "sql-server", "database", "visio", "scripting" ]
37,657
2
null
37,649
5
null
````` ALTER TABLE table ADD COLUMN tmp; UPDATE table SET tmp = X; UPDATE table SET X = Y; UPDATE table SET Y = tmp; ALTER TABLE table DROP COLUMN tmp; ``` Something like this? Edit: About Greg's comment: No, this doesn't work: ````` mysql> select * from test; +------+------+ | x | y | +------+------+ | 1 | ...
null
CC BY-SA 2.5
null
2008-09-01T09:25:56.467
2008-09-01T09:38:37.450
2008-09-01T09:38:37.450
3,215
3,215
null
37,679
2
null
34,988
0
null
While I'm not 100% sure what the Web Service behavior does, I recall it allows client-side script to call Web Services, which would make AJAX it's contemporary replacement. Since you're using .NET 1.1 how about using [Ajax.NET Professional](http://www.ajaxpro.info) to connect to the web services?
null
CC BY-SA 2.5
null
2008-09-01T09:53:56.773
2008-09-01T09:53:56.773
null
null
2,562
null
37,673
2
null
37,665
2
null
Sometimes people include a whole .c file in other .c files (or even .h files), so it has the exact same purpose of preventing an include file from getting included multiple times and the compiler spitting out multiple definition errors. It is strange, though, that it would be the default behavior of an editor to put t...
null
CC BY-SA 2.5
null
2008-09-01T09:46:05.857
2008-09-01T09:46:05.857
null
null
2,666
null
37,680
2
null
37,666
6
null
FinalBuilder does support emailing and just executing FinalBuilder each night will give you nightly builds. You don't really need other software for that if you don't want to. You could also use CCNet to trigger a build when needed and have it execute FinalBuilder for the build. You can then decide if FinalBuilder or...
null
CC BY-SA 2.5
null
2008-09-01T09:55:13.010
2008-09-01T09:55:13.010
null
null
1,242
null
37,684
1
21,925,491
null
488
293,842
I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match. How I can replace all the URL? I guess I should be using the command, but I did not really figure how to do it. ``` function rep...
How to replace plain URLs with links?
CC BY-SA 3.0
0
2008-09-01T09:58:49.647
2021-04-19T15:57:43.580
2011-08-13T19:25:20.553
63,550
2,138
[ "javascript", "regex" ]
37,686
2
null
17,333
27
null
The portable way to get epsilon in C++ is ``` #include <limits> std::numeric_limits<double>::epsilon() ``` Then the comparison function becomes ``` #include <cmath> #include <limits> bool AreSame(double a, double b) { return std::fabs(a - b) < std::numeric_limits<double>::epsilon(); } ```
null
CC BY-SA 2.5
null
2008-09-01T09:59:55.200
2010-08-08T00:44:16.593
2010-08-08T00:44:16.593
3,836
3,836
null
37,690
2
null
25,458
13
null
Not massively. I've never had an issue with it in desktop development unless, as Martin states, you're using it in a silly location. I've heard a lot of people have utterly irrational fears about its performance in desktop development. In the [Compact Framework](https://en.wikipedia.org/wiki/.NET_Compact_Framework) (w...
null
CC BY-SA 4.0
null
2008-09-01T10:04:46.920
2018-05-08T16:59:39.027
2018-05-08T16:59:39.027
-1
1,143
null
37,675
2
null
37,666
14
null
At my work we use CCNET, but with builds on check-in more than nightly - although it's easily configured for either or both. You can very easily set up unit testing to run on every checkin as well, FXCop testing, and a slew of other products. I would also advise checking out [Team City](http://www.jetbrains.com/teamc...
null
CC BY-SA 2.5
null
2008-09-01T09:50:26.143
2008-09-01T09:50:26.143
2017-05-23T11:45:36.473
-1
3,717
null
37,700
2
null
37,696
3
null
Yep, you can do it across the 3 something like the below: ``` SELECT page_tag.id, page.name, group_concat(tags.name) FROM tag, page, page_tag WHERE page_tag.page_id = page.page_id AND page_tag.tag_id = tag.id; ``` Has not been tested, and could be probably be written a tad more efficiently, but should get you starte...
null
CC BY-SA 3.0
null
2008-09-01T10:23:06.563
2016-12-02T08:52:16.980
2016-12-02T08:52:16.980
2,571,493
2,287
null
37,687
2
null
37,684
287
null
### Replacing URLs with links (Answer to the General Problem) The regular expression in the question misses of edge cases. When detecting URLs, it's always better to use a specialized library that handles international domain names, new TLDs like `.museum`, parentheses and other punctuation within and at the end o...
null
CC BY-SA 3.0
null
2008-09-01T10:00:52.217
2014-02-24T09:57:20.393
2017-05-23T12:10:54.147
-1
2,541
null
37,692
1
39,989
null
6
4,045
I'm writing a plugin that will parse a bunch of files in a project. But for the moment I'm stuck searching through the Eclipse API for answers. The plugin works like this: Whenever I open a source file I let the plugin parse the source's corresponding build file (this could be further developed with caching the parse ...
Eclipse Plugin Dev: How do I get the paths for the currently selected project?
CC BY-SA 2.5
0
2008-09-01T10:06:42.407
2012-07-27T07:57:40.233
2012-07-27T07:57:40.233
918,414
3,713
[ "java", "eclipse", "eclipse-api" ]
37,693
2
null
37,198
3
null
Any information you can get about the user's environment can be fetched from ``` System.getProperty("..."); ``` For a list of what you can get, take a look [here](https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html). I don't think you'll be able to get the path you require (the All Users path...
null
CC BY-SA 4.0
null
2008-09-01T10:09:37.517
2019-01-26T18:32:44.810
2019-01-26T18:32:44.810
558,825
1,900
null
37,683
2
null
37,381
1
null
Usually when creating Cocoa applications that front UNIX commands or other headless programs you use an [NSTask](http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTask_Class/Reference/Reference.html): > Using the NSTask class, your program can run another program as a subprocess and can moni...
null
CC BY-SA 2.5
null
2008-09-01T09:58:29.663
2008-09-01T09:58:29.663
2020-06-20T09:12:55.060
-1
1,109
null
37,704
2
null
37,591
0
null
You could use a treeview control and use a recursive XLinq algorithm to put the data in there. I've done that myself with an interface allow a user to build up a custom XML representation and it worked really well.
null
CC BY-SA 2.5
null
2008-09-01T10:26:19.707
2008-09-01T10:26:19.707
null
null
3,394
null
37,702
1
37,707
null
25
24,611
Sorry for this not being a "real" question, but Sometime back i remember seeing a post here about randomizing a randomizer randomly to generate truly random numbers, not just pseudo random. I dont see it if i search for it. Does anybody know about that article?
True random number generator
CC BY-SA 2.5
0
2008-09-01T10:25:46.090
2015-10-22T15:38:56.677
2009-03-07T00:17:10.250
15,168
2,759,376
[ "algorithm", "language-agnostic", "random", "prng" ]
37,706
2
null
37,702
2
null
It's not possible to obtain 'true' random numbers, a computer is a logical construct that can't possibly create 'truly' random anything, only pseudo-random. There are better and worse pseudo-random algorithms out there, however. In order to obtain a 'truly' random number you need a physical random source, some gamblin...
null
CC BY-SA 2.5
null
2008-09-01T10:30:51.163
2008-09-01T10:30:51.163
null
null
3,394
null
37,712
2
null
37,525
0
null
Lets change this around a bit. If your program is trying to write to a file and failing you either need to change the location of the file to one where the user can write to, or check the correct rights when the program starts and refuse to run if the user doesn't have them. Trampling over the system permissions is not...
null
CC BY-SA 2.5
null
2008-09-01T10:33:16.820
2008-09-01T10:33:16.820
null
null
null
null
37,707
2
null
37,702
17
null
I believe that was on [thedailywtf.com](http://thedailywtf.com/Articles/Random-Stupidity.aspx) - ie. not something that you want to do. It is not possible to get a truly random number from pseudorandom numbers, no matter how many times you call randomize(). You get "true" random numbers from special [hardware](http:...
null
CC BY-SA 2.5
null
2008-09-01T10:30:54.780
2008-09-01T10:30:54.780
null
null
369
null
37,696
1
37,761
null
5
5,709
I have three tables `tag`, `page`, `pagetag` With the data below ``` ID NAME 1 page 1 2 page 2 3 page 3 4 page 4 ``` ``` ID NAME 1 tag 1 2 tag 2 3 tag 3 4 tag 4 ``` ``` ID PAGEID TAGID 1 2 1 2 2 3 3 3 4 4 1 ...
Concatenate several fields into one with SQL
CC BY-SA 3.0
0
2008-09-01T10:16:45.003
2016-12-02T10:23:57.023
2016-12-02T09:20:53.293
2,571,493
2,138
[ "sql", "mysql" ]
37,717
2
null
37,662
4
null
I don't really understand why you want it was "source" rather than as a perl library, but you can download the source for any CPAN module. I haven't used it, but [Tree](http://search.cpan.org/~rkinyon/Tree-1.01/lib/Tree.pm) looks to fill your requirements.
null
CC BY-SA 2.5
null
2008-09-01T10:37:02.457
2008-09-01T10:37:02.457
null
null
3,839
null
37,711
2
null
37,696
0
null
I think you may need to use multiple updates. Something like (not tested): ``` select ID as 'PageId', Name as 'PageName', null as 'Tags' into #temp from [PageTable] declare @lastOp int set @lastOp = 1 while @lastOp > 0 begin update p set p.tags = isnull(tags + ', ', '' ) + t.[Tagid] from #temp p ...
null
CC BY-SA 2.5
null
2008-09-01T10:33:16.553
2016-12-02T10:23:57.023
2016-12-02T10:23:57.023
905
905
null
37,723
2
null
37,428
1
null
[The C++ Programming Language](https://rads.stackoverflow.com/amzn/click/com/0201700735) by Bjarne Stroustrup covers C++ in depth. Bjarne is the inventor of C++. It also provides insights into why the language is the way it is. Some people find the book a little terse. I found it to be an enjoyable read. If you have do...
null
CC BY-SA 2.5
null
2008-09-01T10:50:25.920
2008-09-01T10:50:25.920
null
null
3,836
null