Id
int64
4
8.51M
PostTypeId
int64
1
7
AcceptedAnswerId
int64
7
75.5M
ParentId
int64
4
41.8M
Score
int64
-208
27.7k
ViewCount
int64
11
12.4M
Body
stringlengths
0
45k
Title
stringlengths
2
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
225
CreationDate
stringdate
2008-07-31 21:42:52
2011-12-14 18:48:47
LastActivityDate
stringdate
2008-08-01 12:19:17
2023-03-05 04:40:26
LastEditDate
stringdate
2008-08-01 13:54:25
2023-03-05 03:12:45
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
-1
21.1M
Tags
listlengths
1
6
28,660
2
null
28,654
1
null
By default, .Net will not allow you to connect a packet analyzer like TCPTrace or Fiddler (which I prefer) to localhost or 127.0.0.1 connections (for reasons that I forget now..) Best way would be to reference your web services via a full IP address or FQDN where possible. That will allow you to trace the calls in th...
null
CC BY-SA 2.5
null
2008-08-26T17:17:13.057
2008-08-26T17:17:13.057
null
null
377
null
28,663
2
null
28,642
1
null
Would the "is" operator work? ``` if (myControl is ISomeInterface) { // do something } ```
null
CC BY-SA 2.5
null
2008-08-26T17:18:16.707
2008-08-26T17:24:01.420
2008-08-26T17:24:01.420
2,993
2,993
null
28,667
2
null
28,654
2
null
A somewhat manual process would be to use the [Poster](http://code.google.com/p/poster-extension/) add-in for Firefox. There is also a java utility called [SoapUI](http://sourceforge.net/project/showfiles.php?group_id=136013&package_id=163662&release_id=500134) that has some discovery based automated templates that yo...
null
CC BY-SA 2.5
null
2008-08-26T17:19:44.830
2008-08-26T17:19:44.830
null
null
312
null
28,669
2
null
16,233
0
null
I'd imagine any method of sending fonts with a web page would pose some sort of security risk. I have heard of methods where, in the case that the client doesn't have the required font, the text can be dynamically replaced with an image of or some sort a flash displayed. The only one like this I can find now is at [ALi...
null
CC BY-SA 2.5
null
2008-08-26T17:21:09.367
2008-08-26T17:21:09.367
null
null
1,352
null
28,668
1
28,692
null
10
10,824
My job would be easier, or at least less tedious if I could come up with an automated way (preferably in a Python script) to extract useful information from a FileMaker Pro database. I am working on Linux machine and the FileMaker database is on the same LAN running on an OS X machine. I can log into the webby interfac...
Best way to extract data from a FileMaker Pro database in a script?
CC BY-SA 2.5
0
2008-08-26T17:20:47.557
2009-06-24T17:37:14.203
2008-09-12T17:49:10.173
1,892
1,892
[ "python", "linux", "perl", "scripting", "filemaker" ]
28,684
2
null
28,675
7
null
I would say don't create a huge ByteBuffer that contains ALL of the data at once. Create a much smaller ByteBuffer, fill it with data, then write this data to the FileChannel. Then reset the ByteBuffer and continue until all the data is written.
null
CC BY-SA 2.5
null
2008-08-26T17:26:45.953
2008-08-26T17:26:45.953
null
null
1,471
null
28,666
2
null
28,642
5
null
You can just search on the Interface. This also uses recursion if the control has child controls, i.e. the button is in a panel. ``` private List<Control> FindControlsByType(ControlCollection controls, Type typeToFind) { List<Control> foundList = new List<Control>(); foreach (Control ctrl in this.Page.Contro...
null
CC BY-SA 3.0
null
2008-08-26T17:19:43.363
2015-04-16T05:24:31.180
2015-04-16T05:24:31.180
707,364
2,469
null
28,679
2
null
23,250
4
null
[C++] I agree with the "use it when you have to" brigade. Decorating code unnecessarily with isn't a great idea because the compiler won't warn you when you forget to do it. This introduces potential confusion for people expecting to always be there, i.e. they'll have to about it. So, when would you use it? I've j...
null
CC BY-SA 2.5
null
2008-08-26T17:25:29.043
2008-08-26T17:25:29.043
null
null
1,236
null
28,675
1
28,684
null
3
8,834
I'm using `ByteBuffers` and `FileChannels` to write binary data to a file. When doing that for big files or successively for multiple files, I get an `OutOfMemoryError` exception. I've read elsewhere that using `Bytebuffers` with NIO is broken and should be avoided. Does any of you already faced this kind of problem an...
How to avoid OutOfMemoryError when using Bytebuffers and NIO?
CC BY-SA 3.0
0
2008-08-26T17:23:01.267
2018-12-20T12:53:08.483
2014-02-22T21:38:25.853
772,385
2,612
[ "java", "nio", "bytebuffer", "filechannel" ]
28,686
2
null
27,983
8
null
In Oracle, something like this works nicely to separate your counting and ordering a little better. I'm not sure if it will work in MySql 4. ``` select 'Tag', counts.cnt from ( select count(*) as cnt, 'Tag' from 'images-tags' group by 'tag' ) counts order by counts.cnt desc ```
null
CC BY-SA 2.5
null
2008-08-26T17:34:48.617
2008-08-26T17:34:48.617
null
null
672
null
28,671
2
null
28,642
0
null
If you're going to do some work on it if it is of that type, then TryCast is what I'd use. ``` Dim c as IInterface = TryCast(obj, IInterface) If c IsNot Nothing 'do work End if ```
null
CC BY-SA 2.5
null
2008-08-26T17:21:54.280
2008-08-26T17:21:54.280
null
null
2,009
null
28,692
2
null
28,668
6
null
It has been a long time since I did anything with FileMaker Pro, but I know that it does have capabilities for an ODBC (and JDBC) connection to be made to it (however, I don't know how, or if, that translates to the linux/perl/python world though). This article shows how to share/expose your FileMaker data via ODBC...
null
CC BY-SA 2.5
null
2008-08-26T17:36:19.533
2008-08-26T17:36:19.533
null
null
1,627
null
28,695
2
null
27,071
0
null
Thanks for the advice, the pointer is to an C style abstract structure which I think if I leave that structure exposed to the managed code is going to cause further pain due to its lack of defined structure. So what I think I will do is wrap the C library in C++ and then wrap the C++ wrapper with managed C++, which wi...
null
CC BY-SA 2.5
null
2008-08-26T17:37:02.963
2008-08-26T17:37:02.963
null
null
39,040
null
28,690
2
null
28,675
1
null
If you access files in a (read here, skip, write there, move back) then you have a problem ;-) But if you only write big files, you should consider using streams. `java.io.FileOutputStream` can be used directly to write file byte after byte or wrapped in any other stream (i.e. `DataOutputStream`, `ObjectOutputStream...
null
CC BY-SA 4.0
null
2008-08-26T17:35:50.767
2018-12-20T12:52:29.660
2018-12-20T12:52:29.660
1,997,093
3,105
null
28,687
2
null
28,664
1
null
There is a great post on using PowerShell and TagLibSharp on Joel "Jaykul" Bennet's [site](http://huddledmasses.org/editing-media-tags-from-powershell/). You could use TagLibSharp to read the metatdata with any .NET based language, but PowerShell is quite appropriate for what you are trying to do.
null
CC BY-SA 2.5
null
2008-08-26T17:35:11.440
2010-12-07T04:45:55.747
2010-12-07T04:45:55.747
1,288
1,233
null
28,672
2
null
28,605
2
null
This is a legitimate response, I posted an IDE that uses the GNU compilers, so why has he been down modded? This is the type of thing that will make me SO, why down mod someone just because they are recommending a different compiler, and IMHO, a better one then Microsoft's? get real people, and @Antonio Haley I ga...
null
CC BY-SA 2.5
null
2008-08-26T17:22:06.837
2008-08-26T17:22:06.837
null
null
1,638
null
28,698
2
null
580
2
null
I'm using Subsonic's migrations mechanism so I just have a dll with classes in squential order that have 2 methods, up and down. There is a continuous integration/build script hook into nant, so that I can automate the upgrading of my database. Its not the best thign in the world, but it beats writing DDL.
null
CC BY-SA 2.5
null
2008-08-26T17:39:20.960
2008-08-26T17:39:20.960
null
null
1,220
null
28,662
2
null
28,642
1
null
Interfaces are close enough to types that it should feel about the same. I'd use the [as operator](http://msdn.microsoft.com/en-us/library/cscsdfbt.aspx). ``` foreach (Control c in this.Page.Controls) { IMyButtonInterface myButton = c as IMyButtonInterface; if (myButton != null) { // do something ...
null
CC BY-SA 2.5
null
2008-08-26T17:18:04.443
2008-08-26T17:18:04.443
null
null
2,688
null
28,674
2
null
28,637
7
null
@[Sean Chambers](https://stackoverflow.com/questions/28637/c-is-datetimenow-the-best-way-to-measure-a-functions-preformance#28656) FYI, the .NET Timer class is not for diagnostics, it generates events at a preset interval, like this (from [MSDN](http://msdn.microsoft.com/en-us/library/system.timers.timer.aspx)): ``` ...
null
CC BY-SA 2.5
null
2008-08-26T17:22:15.790
2008-08-26T17:22:15.790
2017-05-23T10:31:16.057
-1
194
null
28,700
2
null
28,664
0
null
@Thomas Owens PowerShell is now part of the Common Engineering Criteria (as of Microsoft's 2009 Product Line) and starting with Serve 2008 is included as a feature. It stands as much of a chance to be installed as Python or Ruby. You also mentioned that you were willing to go to C#, which could use TagLibSharp. Or y...
null
CC BY-SA 2.5
null
2008-08-26T17:40:36.653
2008-08-26T17:40:36.653
null
null
1,233
null
28,708
1
null
null
6
5,758
My code needs to determine how long a particular process has been running. But it continues to fail with an access denied error message on the `Process.StartTime` request. This is a process running with a User's credentials (ie, not a high-privilege process). There's clearly a security setting or a policy setting, or ...
Process.StartTime Access Denied
CC BY-SA 3.0
null
2008-08-26T17:48:01.097
2017-08-04T14:41:23.740
2017-08-04T14:41:23.740
1,836,618
1,975,282
[ "c#", ".net-1.1", "windows-server-2000" ]
28,712
2
null
28,642
0
null
you can always just use the as cast: ``` c as IMyButtonInterface; if (c != null) { // c is an IMyButtonInterface } ```
null
CC BY-SA 2.5
null
2008-08-26T17:49:27.660
2008-08-26T17:49:27.660
null
null
1,965
null
28,689
2
null
28,605
1
null
There's a very good reason to learn C and C++. The reason is that there's a lot of C and C++ code out there that are performing very real and important tasks. Someone who considers themselves a programmer and a learner(doubtful that you can separate the two) can learn a lot from these lines of code. You can learn a lo...
null
CC BY-SA 2.5
null
2008-08-26T17:35:45.713
2008-08-26T17:35:45.713
null
null
390
null
28,709
1
549,032
null
1
2,768
In Eclipse 3.2.2 on Linux content assist is not finding classes within the same project. Upgrading above 3.2 is not an option as SWT is not available above 3.2 for Solaris. I have seen suggestions to clean the workspace, reopen the workspace, run eclipse with the `-clean` command, none of which has worked.
Eclipse 3.2.2 content assist not finding classes in the project
CC BY-SA 3.0
null
2008-08-26T17:48:04.560
2015-08-20T22:01:35.743
2014-05-14T17:57:29.907
247,702
1,539
[ "linux", "eclipse", "eclipse-3.2" ]
28,707
2
null
28,664
0
null
@Thomas Owens TagLibSharp is a nice library to use. I always lean to PowerShell first, one to promote the language, and two because it is spreading fast in the Microsoft domain. I have nothing against using other languages, I just lean towards what I know and like. :) Good luck with your project.
null
CC BY-SA 2.5
null
2008-08-26T17:47:04.640
2008-08-26T17:47:04.640
null
null
1,233
null
28,713
1
28,728
null
22
55,807
Is there a simple way of getting a HTML textarea and an input type="text" to render with (approximately) equal width (in pixels), that works in different browsers? A CSS/HTML solution would be brilliant. I would prefer not to have to use Javascript. Thanks /Erik
Is there a simple way to make html textarea and input type text equally wide?
CC BY-SA 2.5
0
2008-08-26T17:50:24.273
2020-12-16T22:47:01.943
2008-08-27T04:44:26.417
276
276
[ "html", "css", "textarea" ]
28,710
2
null
25,323
6
null
In my experience DTOs are most useful for: 1. Strictly defining what will be sent over the wire and having a type specifically devoted to that definition. 2. Isolating the rest of your application, client and server, from future changes. 3. Interoperability with non-.Net systems. DTOs certainly aren't a requirement, ...
null
CC BY-SA 2.5
null
2008-08-26T17:48:12.530
2008-08-26T17:48:12.530
null
null
1,314
null
28,714
2
null
28,559
4
null
Short answer: there's no way to do inline variable assignment in a while loop in Python. Meaning that I say: ``` while x=next(): // do something here! ``` Since that's not possible, there are a number of "idiomatically correct" ways of doing this: ``` while 1: x = next() if x != END: // Blah ...
null
CC BY-SA 2.5
null
2008-08-26T17:50:30.357
2008-08-26T17:50:30.357
null
null
2,132
null
28,719
2
null
28,716
4
null
I can't tell you for sure, but the place where I am working now is looking at APC and eAccelerator. However, this might influence you - [APC will be integrated into a future release of PHP](http://www.php.net/~derick/meeting-notes.html#add-an-opcode-cache-to-the-distribution-apc) (thanks to Ed Haber for the link).
null
CC BY-SA 2.5
null
2008-08-26T17:52:25.937
2008-08-26T19:01:43.993
2008-08-26T19:01:43.993
572
572
null
28,717
2
null
28,599
8
null
These are usually referred to as client side certificates. I've not actually used it but a modified version of restful-authentication can be found here [here](http://github.com/labria/restful-authentication/tree/master) that looks like what your after. I found this via [Dr. Nic's post](http://drnicwilliams.com/2008/0...
null
CC BY-SA 2.5
null
2008-08-26T17:51:06.487
2008-08-26T17:51:06.487
null
null
2,178
null
28,721
2
null
28,241
11
null
Static is bad for extensibility since static methods and fields cannot be extended or overridden by subclasses. It's also bad for unit tests. Within a unit test you cannot keep the side effects of different tests from spilling over since you cannot control the classloader. Static fields initialized in one unit test w...
null
CC BY-SA 2.5
null
2008-08-26T17:52:52.363
2008-08-26T17:52:52.363
null
null
758
null
28,723
1
35,299
null
1
756
In handling a form post I have something like ``` public ActionResult Insert() { Order order = new Order(); BindingHelperExtensions.UpdateFrom(order, this.Request.Form); this.orderService.Save(order); return this.RedirectToAction("Details", new { id = order.ID }); } ``` I am...
Best way to unit test ASP.NET MVC action methods that use BindingHelperExtensions.UpdateFrom?
CC BY-SA 3.0
null
2008-08-26T17:53:56.887
2013-12-02T12:56:54.717
2013-12-02T12:56:54.717
2,432,317
3,046
[ "asp.net-mvc", "unit-testing" ]
28,715
2
null
28,642
7
null
Longhorn213 almost has the right answer, but as as Sean Chambers and bdukes say, you should use ``` ctrl is IInterfaceToFind ``` instead of ``` ctrl.GetType() == aTypeVariable ``` The reason why is that if you use `.GetType()` you will get the true type of an object, not necessarily what it can also be cast t...
null
CC BY-SA 3.0
null
2008-08-26T17:50:51.637
2015-09-06T13:40:05.963
2015-09-06T13:40:05.963
2,002,471
1,644
null
28,727
2
null
28,708
1
null
The underlying code needs to be able to call OpenProcess, for which you may require SeDebugPrivilege. Is the process you're doing the StartTime request on running as a different user to your own process?
null
CC BY-SA 2.5
null
2008-08-26T17:56:10.983
2008-08-26T17:56:10.983
null
null
987
null
28,728
2
null
28,713
16
null
You should be able to use ``` .mywidth { width: 100px; } ``` ``` <input class="mywidth"> <br> <textarea class="mywidth"></textarea> ```
null
CC BY-SA 4.0
null
2008-08-26T17:56:11.327
2020-12-16T22:47:01.943
2020-12-16T22:47:01.943
10,669,010
2,098
null
28,725
2
null
28,542
0
null
sparkes wrote > If you think you have found a bug in GCC the mailing lists will be glad you dropped by but generally they find some hole in your knowledge is to blame and mock mercilessly :( I figured I'd try my luck here first before going to the GCC mailing list to show my incompetence :) --- Adam Davi...
null
CC BY-SA 2.5
null
2008-08-26T17:54:48.083
2008-08-26T17:54:48.083
null
null
616
null
28,732
2
null
28,716
3
null
I've had good success with eAccelerator (speed improvement with no load is noticable) but XCache also seems pretty promising. You may want to run some trials with each though, your application might scale differently on each.
null
CC BY-SA 2.5
null
2008-08-26T17:57:14.227
2008-08-26T17:57:14.227
null
null
2,567
null
28,733
2
null
28,709
2
null
Go to Java/Editor/Content Assist/Advanced in Preferences, and make sure that the correct proposal kinds are selected. Same kind of thing happened to me when I first moved to 3.4.
null
CC BY-SA 2.5
null
2008-08-26T17:57:26.050
2008-08-26T17:57:26.050
null
null
3,087
null
28,734
2
null
27,726
4
null
Expression trees are useful when you need to access function logic in order to alter or reapply it in some way. Linq to SQL is a good example: ``` //a linq to sql statement var recs ( from rec in LinqDataContext.Table where rec.IntField > 5 select rec ); ``` If we didn't have expression trees this state...
null
CC BY-SA 2.5
null
2008-08-26T17:57:35.537
2008-08-26T17:57:35.537
null
null
905
null
28,705
2
null
1,171
56
null
I would strongly advocate you look at [NetworkX](http://networkx.github.com/). It's a battle-tested war horse and the first tool most 'research' types reach for when they need to do analysis of network based data. I have manipulated graphs with 100s of thousands of edges without problem on a notebook. Its feature rich ...
null
CC BY-SA 3.0
null
2008-08-26T17:43:06.413
2013-02-01T14:56:19.880
2013-02-01T14:56:19.880
343,834
620
null
28,730
2
null
28,713
1
null
Yes, there is. Try doing something like this: ``` <textarea style="width:80%"> </textarea> <input type="text" style="width:80%" /> ``` Both should equate to the same size. You can do it with absolute sizes (px), relative sizes (em) or percentage sizes.
null
CC BY-SA 2.5
null
2008-08-26T17:56:25.973
2008-08-26T17:56:25.973
null
null
2,951
null
28,739
1
28,828
null
0
8,417
I recently ran out of disk space on a drive on a FreeBSD server. I truncated the file that was causing problems but I'm not seeing the change reflected when running `df`. When I run `du -d0` on the partition it shows the correct value. Is there any way to force this information to be updated? What is causing the ou...
Get `df` to show updated information on FreeBSD
CC BY-SA 2.5
null
2008-08-26T18:00:52.423
2009-01-15T17:43:44.650
null
null
72
[ "filesystems", "sysadmin", "freebsd" ]
28,741
2
null
28,713
0
null
Just a note - the width is always influenced by something happening on the client side - PHP can't effect those sorts of things. Setting a common class on the elements and setting a width in CSS is your cleanest bet.
null
CC BY-SA 2.5
null
2008-08-26T18:01:35.540
2008-08-26T18:01:35.540
null
null
1,951
null
28,716
1
28,735
null
59
10,890
I'm trying to improve performance under high load and would like to implement opcode caching. Which of the following should I use? - [Installation Guide](http://www.howtoforge.com/apc-php5-apache2-debian-etch)- [Installation Guide](http://www.howtoforge.com/eaccelerator_php5_debian_etch)- [Installation Guide](http://w...
Which PHP opcode cacher should I use to improve performance?
CC BY-SA 3.0
0
2008-08-26T17:50:53.303
2015-06-20T21:50:57.320
2012-04-01T08:56:25.747
1,219,121
2,633
[ "php", "performance", "caching" ]
28,735
2
null
28,716
18
null
I think the answer might depend on the type of web applications you are running. I had to make this decision myself two years ago and couldn't decide between Zend Optimizer and eAccelerator. In order to make my decision, I used ab (apache bench) to test the server, and tested the three combinations (zend, eaccelerator...
null
CC BY-SA 2.5
null
2008-08-26T17:58:05.783
2008-08-26T17:58:05.783
null
null
1,951
null
28,726
2
null
28,428
4
null
``` System.getProperty("user.dir"); ``` The above method gets the user's working directory when the application was launched. This is fine if the application is launched by a script or shortcut that ensures that this is the case. However, if the app is launched from somewhere else (entirely possible if the command l...
null
CC BY-SA 2.5
null
2008-08-26T17:55:31.437
2008-08-26T17:55:31.437
null
null
304
null
28,744
2
null
28,716
1
null
I've been using XCache for more than a year now with no problems at all. I tried to switch to eAccelerator, but ended up with a bunch of segmentation faults (it's less forgiving of errors). The major benefit to eAccelerator is that it's not just an opcode cache, it's also an optimizer. You should fully test out your ...
null
CC BY-SA 2.5
null
2008-08-26T18:02:19.830
2008-08-26T18:02:19.830
null
null
291
null
28,742
2
null
28,599
2
null
Depends on the server, but the simplest solution I know of, using Apache: [FakeBasicAuth](http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions) > "When this option is enabled, the Subject Distinguished Name (DN) of the Client X509 Certificate is translated into a HTTP Basic Authorization username. This means ...
null
CC BY-SA 2.5
null
2008-08-26T18:01:41.237
2008-08-26T18:01:41.237
null
null
758
null
28,736
2
null
28,464
22
null
The main problem with dependency injection is that, while it gives the appearance of a loosely coupled architecture, it really doesn't. What you're really doing is moving that coupling from the compile time to the runtime, but still if class A needs some interface B to work, an instance of a class which implements int...
null
CC BY-SA 3.0
null
2008-08-26T17:58:20.963
2012-10-12T05:02:44.013
2012-10-12T05:02:44.013
70,149
2,695
null
28,743
2
null
28,675
5
null
Check out Java's [Mapped Byte Buffers](http://java.sun.com/j2se/1.4.2/docs/api/java/nio/MappedByteBuffer.html), also known as 'direct buffers'. Basically, this mechanism uses the OS's virtual memory paging system to 'map' your buffer directly to disk. The OS will manage moving the bytes to/from disk and memory auto-m...
null
CC BY-SA 2.5
null
2008-08-26T18:01:52.420
2008-08-26T18:47:35.430
2008-08-26T18:47:35.430
2,961
2,961
null
28,748
2
null
26,984
3
null
My own rule of thumb: I never throw Exception, except in unit tests when what you throw is irrelevant and theres no reason to spend any extra time on it. I create my own custom exception type for errors occuring in my custom business logic. This exception type is used as much as possible for recasting other exceptio...
null
CC BY-SA 2.5
null
2008-08-26T18:03:09.313
2008-08-26T18:03:09.313
null
null
292
null
28,752
2
null
28,739
-1
null
Does df --sync work?
null
CC BY-SA 2.5
null
2008-08-26T18:08:03.280
2008-08-26T18:08:03.280
null
null
1,951
null
28,755
2
null
28,713
4
null
Someone else mentioned this, then deleted it. If you want to style all textareas and text inputs the same way without classes, use the following CSS (does not work in IE6): ``` input[type=text], textarea { width: 80%; } ```
null
CC BY-SA 2.5
null
2008-08-26T18:09:22.090
2008-08-26T18:33:13.670
2008-08-26T18:33:13.670
1,786
1,786
null
28,753
2
null
28,709
1
null
Are you sure that "build automatically" in the Project menu is checked? :-) Another thing: is the Problems view, unfiltered, completely clear of compilation errors and of classpath errors?
null
CC BY-SA 2.5
null
2008-08-26T18:08:26.523
2008-08-26T23:55:28.157
2008-08-26T23:55:28.157
3,069
3,069
null
28,756
1
28,763
null
31
55,881
Whats the best/easiest way to obtain a count of items within an IEnumerable collection without enumerating over all of the items in the collection? Possible with LINQ or Lambda?
The best way to get a count of IEnumerable<T>
CC BY-SA 2.5
0
2008-08-26T18:09:30.903
2020-12-03T20:05:31.597
2008-08-26T18:12:37.043
1,968
2,993
[ "c#", "linq" ]
28,759
2
null
28,654
0
null
Same as palehorse, use soapUI or directly the specific component for that feature: [TCPMon](http://ws.apache.org/commons/tcpmon/).
null
CC BY-SA 2.5
null
2008-08-26T18:11:30.417
2008-08-26T18:11:30.417
null
null
3,069
null
28,757
1
28,821
null
7
5,991
I'm looking for a quick-and-dirty solution to this, I have to set up a Subversion server really quickly, like by the end of the day tomorrow. My initial thought was to just download a virtual appliance that we could load onto our host machine. The problem I am having however is that all the appliances I have found so...
Any good Subversion virtual appliance recommendations?
CC BY-SA 4.0
0
2008-08-26T18:09:36.693
2020-03-27T18:02:25.557
2020-03-27T18:02:25.557
761,095
37
[ "svn", "version-control" ]
28,761
2
null
28,756
20
null
In any case, you have to loop through it. Linq offers the `Count` method: ``` var result = myenum.Count(); ```
null
CC BY-SA 2.5
null
2008-08-26T18:12:17.420
2008-08-26T18:12:17.420
null
null
1,968
null
28,760
2
null
2,543
10
null
Depending on your needs, a couple others you might look at: [](http://flare.prefuse.org/demo) [](http://prefuse.org/)
null
CC BY-SA 3.0
null
2008-08-26T18:11:48.013
2012-03-29T19:08:02.087
2012-03-29T19:08:02.087
1,219,121
620
null
28,763
2
null
28,756
15
null
You will have to enumerate to get a count. Other constructs like the List keep a running count.
null
CC BY-SA 3.0
null
2008-08-26T18:12:23.893
2017-10-28T16:08:16.367
2017-10-28T16:08:16.367
237,934
580
null
28,762
2
null
28,756
0
null
Not possible with LINQ, as calling .Count(...) does enumerate the collection. If you're running into the problem where you can't iterate through a collection twice, try this: ``` List<MyTableItem> myList = dataContext.MyTable.ToList(); int myTableCount = myList.Count; foreach (MyTableItem in myList) { ... } ```
null
CC BY-SA 2.5
null
2008-08-26T18:12:21.617
2008-08-26T18:12:21.617
null
null
35
null
28,758
2
null
7,864
56
null
I have always found that ActiveRecord is good for quick CRUD-based applications where the Model is relatively flat (as in, not a lot of class hierarchies). However, for applications with complex OO hierarchies, a [DataMapper](http://martinfowler.com/eaaCatalog/dataMapper.html) is probably a better solution. While Activ...
null
CC BY-SA 2.5
null
2008-08-26T18:10:08.283
2008-08-26T18:10:08.283
null
null
577
null
28,769
2
null
28,756
1
null
There's also IList or ICollection, if you want to use a construct that is still somewhat flexible, but also has the feature you require. They both imply IEnumerable.
null
CC BY-SA 2.5
null
2008-08-26T18:15:15.243
2008-08-26T18:15:15.243
null
null
3,043
null
28,780
2
null
28,559
1
null
Can you provide more information about what you're trying to accomplish? It's not clear to me why you can't just say ``` for x in everything(): ... ``` and have the everything function return everything, instead of writing a next function to just return one thing at a time. Generators can even do this quite ef...
null
CC BY-SA 2.5
null
2008-08-26T18:18:42.443
2008-08-26T18:18:42.443
null
null
1,694
null
28,786
2
null
28,768
0
null
There are lots of choices of ORMs. Linq to Sql, nHibernate. For pure object databases there is db4o. It depends on the application, but for a high volume enterprise application, I would not go this route. You need more control of your data.
null
CC BY-SA 2.5
null
2008-08-26T18:23:09.063
2008-08-26T18:23:09.063
null
null
1,219
null
28,777
2
null
28,757
0
null
I'm not quite sure this is what you want, but [Tigris.org](http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91), which hosts the Svn project, has an [MSI installer for Subversion 1.5](http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91). It includes bindings for Apache. Perhaps you ...
null
CC BY-SA 2.5
null
2008-08-26T18:17:21.290
2008-08-26T18:17:21.290
null
null
1,037
null
28,765
1
28,822
null
4
4,774
I recently upgraded a VS2005 web deployment project to VS2008 - and now I get the following error when building: ``` The specified task executable location "bin\aspnet_merge.exe" is invalid. ``` Here is the source of the error (from the web deployment targets file): ``` <Target Name="AspNetMerge" Condition="'$(UseM...
Using Visual Studio 2008 Web Deployment projects - getting an error finding aspnet_merge.exe
CC BY-SA 2.5
0
2008-08-26T18:13:13.687
2010-07-09T19:27:25.730
2008-11-02T02:19:05.357
null
1,341
[ "asp.net", "visual-studio-2008" ]
28,790
2
null
28,560
1
null
Yes, sort of. There is no support included in the trunk, you need to write your own dialect. Or you can port the [Paradox dialect created for Hibernate](http://www.hxtt.com/hibernate.html).
null
CC BY-SA 2.5
null
2008-08-26T18:24:39.947
2008-08-26T18:24:39.947
null
null
2,676
null
28,787
2
null
28,768
0
null
I was discussing this with a friend over the weekend and it seems like the gains you make on ease of storage are lost if you need to be able to query the database outside of the application. My understanding is that these databases work by storing your object data in a de-normalized fashion. This makes it fast to retri...
null
CC BY-SA 2.5
null
2008-08-26T18:23:55.283
2008-08-26T18:23:55.283
null
null
2,567
null
28,768
1
28,868
null
0
508
I've been taking a look at some different products for .NET which propose to speed up development time by providing a way for business objects to map seamlessly to an automatically generated database. I've never had a problem writing a data access layer, but I'm wondering if this type of product will really save the ti...
Simple Object to Database Product
CC BY-SA 2.5
null
2008-08-26T18:14:42.733
2017-09-25T18:51:04.010
2008-08-28T14:07:45.460
12,081
12,081
[ "c#", ".net", "database", "orm" ]
28,747
2
null
28,675
0
null
The previous two responses seem pretty reasonable. As for whether the command line switch will work, it depends how quickly your memory usage hits the limit. If you don't have enough ram and virtual memory available to at least triple the memory available, then you will need to use one of the alternate suggestions give...
null
CC BY-SA 4.0
null
2008-08-26T18:02:58.703
2018-12-20T12:53:08.483
2018-12-20T12:53:08.483
1,997,093
2,567
null
28,799
2
null
28,723
0
null
Wrap it in an interface and mock it.
null
CC BY-SA 2.5
null
2008-08-26T18:28:10.250
2008-08-26T18:28:10.250
null
null
2,676
null
28,793
1
677,830
null
58
20,475
I have been doing some java development lately and have started using Eclipse. For the most part, I think it is great, but being a C/C++ guy used to doing all of his editing in vim, I find myself needlessly hitting the Esc key over and over. It would be really nice if I got all the nice features of Eclipse, but still...
vim commands in Eclipse
CC BY-SA 2.5
0
2008-08-26T18:26:07.400
2017-08-05T04:11:07.030
null
null
2,328
[ "eclipse", "vim" ]
28,795
2
null
28,768
1
null
I've found [iBatis](http://ibatis.apache.org/) from the Apache group to be an excellent solution to this problem. My team is currently using iBatis to map all of our calls from Java to our MySQL backend. It's been a huge benefit as it's easy to manage all of our SQL queries and procedures because they're all located ...
null
CC BY-SA 2.5
null
2008-08-26T18:26:16.167
2008-08-26T18:26:16.167
null
null
3,033
null
28,801
2
null
20,696
-1
null
I know nothing of specman, but a fixed sized list is an array, so that might point you somewhere.
null
CC BY-SA 2.5
null
2008-08-26T18:28:56.863
2008-08-26T18:28:56.863
null
null
3,043
null
28,773
2
null
28,757
11
null
You should consider this, it is really ZIRRO friction and it integrates well in various scenarios. Not to mention it is free of charge. [http://www.visualsvn.com/server/](http://www.visualsvn.com/server/) Cheers, Dragos
null
CC BY-SA 2.5
null
2008-08-26T18:16:20.793
2008-08-26T18:16:20.793
null
null
2,437
null
28,804
2
null
7,864
2
null
Although all the other comments regarding SQL optimization are certainly valid, my main complaint with the active record pattern is that it usually leads to [impedance mismatch](http://en.wikipedia.org/wiki/Object-relational_impedance_mismatch). I like keeping my domain clean and properly encapsulated, which the activ...
null
CC BY-SA 2.5
null
2008-08-26T18:31:26.623
2008-08-26T18:31:26.623
null
null
1,574
null
28,809
2
null
28,642
4
null
I'd make the following changes to Longhorn213's example to clean this up a bit: ``` private List<T> FindControlsByType<T>(ControlCollection controls ) { List<T> foundList = new List<T>(); foreach (Control ctrl in this.Page.Controls) { if (ctrl as T != null ) { // Do whatev...
null
CC BY-SA 2.5
null
2008-08-26T18:32:53.047
2008-08-26T18:32:53.047
null
null
2,187
null
28,811
2
null
9,033
583
null
are underrated. and they automatically (just make sure the signature match) as in: ``` Console.CancelKeyPress += (sender, e) => { Console.WriteLine("CTRL+C detected!\n"); e.Cancel = true; }; ``` Note that I don't have a `new CancellationEventHandler` nor do I have to specify types of `send...
null
CC BY-SA 4.0
null
2008-08-26T18:34:44.433
2019-03-04T18:39:27.027
2019-03-04T18:39:27.027
102,937
3,055
null
28,814
2
null
28,757
1
null
I second the Visual SVN Server suggestion. It packages SVN with an Apache server (with SSL support!) and a really nice, easy to use control panel. You can be up in running in less than 10 minutes. It even integrates with Active Directory or your local Windows accounts very nicely. [http://www.visualsvn.com/server/](ht...
null
CC BY-SA 2.5
null
2008-08-26T18:36:27.843
2008-08-26T18:36:27.843
null
null
2,527
null
28,813
2
null
28,793
15
null
There is this plugin that costs $20+ [http://satokar.com/viplugin/](http://satokar.com/viplugin/) I use it and it works great, you've got basic vi movement commands and a set of others. Here is an open source, free plugin but i've never been able to get it working (i'm on a mac). [http://sourceforge.net/projects/vi...
null
CC BY-SA 3.0
null
2008-08-26T18:35:46.473
2017-08-05T04:10:07.733
2017-08-05T04:10:07.733
1,402,846
1,425
null
28,796
1
29,770
null
74
41,272
I have a bunch of classes I want to rename. Some of them have names that are small and that name is reused in other class names, where I don't want that name changed. Most of this lives in Python code, but we also have some XML code that references class names. Simple search and replace only gets me so far. In my c...
What refactoring tools do you use for Python?
CC BY-SA 2.5
0
2008-08-26T18:26:51.517
2019-05-08T07:38:27.940
2008-08-26T19:45:53.497
52
2,900
[ "python", "refactoring" ]
28,820
1
33,251
null
6
7,394
We have a number of users with Windows Mobile 6 and need to apply minor changes. eg. update a registry setting. One option is push and execute an executable file using our device management software. I'd like this to be a little more friendly for the admins who are familiar with scripting in VBScript/JScript etc. What...
Windows Mobile - What scripting platforms are available?
CC BY-SA 2.5
0
2008-08-26T18:42:14.257
2013-09-30T19:43:57.477
2008-08-28T02:02:09.997
194
636
[ "windows-mobile", "scripting", "sysadmin", "administration" ]
28,816
2
null
28,713
0
null
Use a CSS class for width, then place your elements into HTML DIVs, DIVs having the mentioned class. This way, the layout control overall should be better.
null
CC BY-SA 2.5
null
2008-08-26T18:39:06.263
2008-08-26T18:39:06.263
null
null
2,437
null
28,817
1
34,953
null
8
28,070
There is a legacy CVS repository, which contains a large number of directories, sub-directories, and paths. There is also a large number of branches and tags that do not necessarilly cover all paths & files - usually a subset. How can I find out, which branch / tag covers, which files and paths? CVS log already provid...
How to find out which CVS tags cover which files and paths?
CC BY-SA 2.5
null
2008-08-26T18:40:27.133
2010-11-08T19:01:28.430
2008-08-26T20:12:17.800
2,877
2,877
[ "cvs" ]
28,808
1
157,505
null
2
636
I've been told that I should include [PAD files](http://en.wikipedia.org/wiki/Portable_Application_Description) with the freeware applications I distribute so hosting sites can list the information correctly and check for updates, etc. Can you give me some info on using PAD files? Here are general questions which come...
PAD (Portable Application Description) files for shareware / freeware
CC BY-SA 2.5
null
2008-08-26T18:32:35.217
2019-10-13T21:36:38.557
2019-10-13T21:36:38.557
3,002,139
5
[ "open-source", "software-distribution" ]
28,821
2
null
28,757
5
null
I would simply go with installing SVN, and using the SVN Daemon, and completely ignoring Apache. There should be no appliance needed. Very simple to install, very easy to configure. Just take a vanilla windows/linux box and install the subversion server. It'll probably take all of 1/2 and hour to set up.
null
CC BY-SA 2.5
null
2008-08-26T18:42:57.283
2008-08-26T19:35:10.510
2008-08-26T19:35:10.510
1,862
1,862
null
28,825
2
null
22,309
3
null
I believe that [IDA Pro](http://www.hex-rays.com/idapro) will do what you want. It was mentioned in the O'Reilly Security Warrior book and I've seen it recommended on Windows Mobile developer forums.
null
CC BY-SA 2.5
null
2008-08-26T18:47:47.583
2008-08-26T18:47:47.583
null
null
636
null
28,828
2
null
28,739
2
null
This probably centres on you truncated the file. and report different things as [this post on unix.com explains](http://www.unix.com/unix-dummies-questions-answers/29223-sco-unix-disk-space.html). Just because space is not used does not necessarily mean that it's free...
null
CC BY-SA 2.5
null
2008-08-26T18:50:47.233
2008-08-26T18:50:47.233
null
null
2,998
null
28,826
1
28,844
null
11
12,022
My university is part of MSDNAA, so I downloaded it a while back, but I just got around to installing it. I guess part of it replaces FrontPage for web editing, and there appears to be a video editor and a vector graphics editor, but I don't think I've even scratched the surface of what it is and what it can do. Could ...
What exactly is Microsoft Expression Studio and how does it integrate with Visual Studio?
CC BY-SA 2.5
0
2008-08-26T18:49:25.630
2012-05-03T19:36:26.180
2012-05-03T19:36:26.180
352,841
572
[ "visual-studio", "integration", "expression-studio" ]
28,829
2
null
28,675
0
null
Using the [transferFrom](http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileChannel.html#transferFrom(java.nio.channels.ReadableByteChannel,%20long,%20long)) method should help with this, assuming you write to the channel incrementally and not all at once as previous answers also point out.
null
CC BY-SA 2.5
null
2008-08-26T18:51:13.393
2008-08-26T18:51:13.393
null
null
3,071
null
28,827
2
null
28,826
1
null
From [Wikipedia](http://en.wikipedia.org/wiki/Microsoft_Expression_Studio): Microsoft Expression Studio is a suite of design and media applications from Microsoft aimed at developers and designers. It consists of: - - - - - For web development Expression Web is useful. For XAML development, Blend and Design are use...
null
CC BY-SA 2.5
null
2008-08-26T18:50:36.377
2008-08-26T18:50:36.377
null
null
1,508
null
28,834
2
null
28,826
0
null
Expression Studio is targeted more at designers. It integrates with Visual Studio in that Expression Studio uses solution and project files, just like Visual Studio. Which makes collaborating with designer easier. The developer and the designer open up the same project. The developer sets up the initial page with a...
null
CC BY-SA 2.5
null
2008-08-26T18:52:03.127
2008-08-26T18:52:03.127
null
null
1,117
null
28,830
2
null
9,033
5
null
Reflection Emit and Expression trees come to mind... Don't miss Jeffrey Richter's CLR via C# and Jon Skeet's ![alt text](https://www.manning.com/skeet/skeet_cover150.jpg) See here for some resources: [http://www.codeproject.com/KB/trace/releasemodebreakpoint.aspx](http://www.codeproject.com/KB/trace/releasemodebreak...
null
CC BY-SA 2.5
null
2008-08-26T18:51:13.473
2008-08-26T18:51:13.473
2017-02-08T14:07:39.803
-1
2,437
null
28,835
2
null
28,826
0
null
Please check for XAML .NET development, most of the tutorials makes use of many Expression tools.
null
CC BY-SA 2.5
null
2008-08-26T18:52:25.293
2008-08-26T18:52:25.293
null
null
1,508
null
28,822
2
null
28,765
8
null
Apparently aspnet_merge.exe (and all the other SDK tools) are NOT packaged in Visual Studio 2008. Visual Studio 2005 packaged these tools as part of its installation. The place to get this is an installation of the Windows 2008 SDK ([latest download](http://www.microsoft.com/downloads/thankyou.aspx?familyId=e6e1c3df-...
null
CC BY-SA 2.5
null
2008-08-26T18:43:11.183
2010-07-09T19:27:25.730
2010-07-09T19:27:25.730
1,341
1,341
null
28,823
1
29,500
null
1
1,963
I have never worked with web services and rails, and obviously this is something I need to learn. I have chosen to use hpricot because it looks great. Anyway, _why's been nice enough to provide the following example on the [hpricot website](http://code.whytheluckystiff.net/hpricot/): ``` #!ruby require 'hpricot' req...
XML => HTML with Hpricot and Rails
CC BY-SA 3.0
null
2008-08-26T18:44:40.540
2015-08-29T22:13:28.293
2015-08-29T22:13:28.293
2,642,553
2,293
[ "ruby-on-rails", "xml", "ruby", "hpricot", "open-uri" ]
28,837
2
null
28,768
1
null
I've recently set up [ActiveRecord](http://www.castleproject.org/projects/activerecord/) from the Castle Project for an app. It was pretty easy to get going. After creating a new app with it, I even used MyGeneration to script out class files for a legacy app that ActiveRecord could use in a pretty short time. It us...
null
CC BY-SA 3.0
null
2008-08-26T18:53:01.267
2017-09-25T18:51:04.010
2017-09-25T18:51:04.010
6,761,181
null
null
28,841
2
null
28,823
0
null
I'd probably go for a REST approach and have resources that represent the different entities within the XML file being consumed. Do you have a specific example of the XML that you can give?
null
CC BY-SA 2.5
null
2008-08-26T18:54:36.617
2008-08-26T18:54:36.617
null
null
1,450
null
28,832
1
28,906
null
18
20,148
If I call `finalize()` on an object from my program code, will the still run the method again when the garbage collector processes this object? This would be an approximate example: ``` MyObject m = new MyObject(); m.finalize(); m = null; System.gc() ``` Would the explicit call to `finalize()` make the 's garba...
Java and manually executing finalize
CC BY-SA 3.0
0
2008-08-26T18:51:41.520
2014-02-08T19:03:58.983
2014-02-08T19:03:58.983
321,731
2,697
[ "java", "garbage-collection", "finalize" ]