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
8,624
1
8,654
null
2
759
I've started to add the time taken to render a page to the footer of our internal web applications. Currently it appears like this > Rendered in 0.062 seconds Occasionally I get rendered times like this > Rendered in 0.000 seconds Currently it's only meant to be a guide for users to judge whether a page is quick to...
Best format for displaying rendered time on a webpage
CC BY-SA 3.0
null
2008-08-12T09:08:05.217
2017-12-29T14:25:34.023
2017-12-29T14:25:34.023
1,873,567
982
[ "render" ]
8,636
2
null
8,625
21
null
For many types (integer, double, DateTime etc), there is a static Parse method. You can invoke it using reflection: ``` MethodInfo m = typeof(T).GetMethod("Parse", new Type[] { typeof(string) } ); if (m != null) { return m.Invoke(null, new object[] { base.Value }); } ```
null
CC BY-SA 3.0
null
2008-08-12T09:32:06.480
2016-02-07T18:18:36.630
2016-02-07T18:18:36.630
2,921,691
838
null
8,633
2
null
8,625
441
null
I am not sure whether I understood your intentions correctly, but let's see if this one helps. ``` public class TypedProperty<T> : Property where T : IConvertible { public T TypedValue { get { return (T)Convert.ChangeType(base.Value, typeof(T)); } set { base.Value = value.ToString();} } } `...
null
CC BY-SA 3.0
null
2008-08-12T09:24:33.203
2015-09-09T14:52:52.183
2015-09-09T14:52:52.183
105,445
275
null
8,642
2
null
8,569
1
null
Spring is also very much about unit testing and therefore testability of your classes. That basically means thinking about modularization, separation of concerns, referencing a class through interfaces etc.
null
CC BY-SA 2.5
null
2008-08-12T10:00:45.017
2008-08-12T10:00:45.017
null
null
837
null
8,643
2
null
8,612
0
null
I would look at the crash in more detail - if it's crashing in a test case, then it sounds pretty easily reproducible, which is usually most of the challenge.
null
CC BY-SA 2.5
null
2008-08-12T10:04:14.590
2008-08-12T10:04:14.590
null
null
987
null
8,632
2
null
8,625
4
null
You could possibly use a construct such as a [traits class](http://www.boost.org/community/generic_programming.html#traits). In this way, you would have a parameterised helper class that knows how to convert a string to a value of its own type. Then your getter might look like this: ``` get { return StringConverter<Da...
null
CC BY-SA 2.5
null
2008-08-12T09:23:51.737
2008-08-12T09:51:42.040
2008-08-12T09:51:42.040
893
893
null
8,625
1
8,633
null
275
166,539
I have a class that I want to use to store "properties" for another class. These properties simply have a name and a value. Ideally, what I would like is to be able to add properties, so that the "value" returned is always of the type that I want it to be. The type should always be a primitive. This class subclasses ...
Generic type conversion FROM string
CC BY-SA 3.0
0
2008-08-12T09:13:23.520
2020-03-06T13:28:16.957
2014-09-07T19:16:56.473
3,041,194
832
[ "c#", "generics", "primitive", "type-safety" ]
8,644
2
null
8,612
1
null
Can you add the debug symbols to the release build and run it in the debugger to see where and why it crashed?
null
CC BY-SA 2.5
null
2008-08-12T10:12:57.737
2008-08-12T10:12:57.737
null
null
259
null
8,635
2
null
8,569
2
null
A good way to get started is to concentrate on the "Springframework". The Spring portfolio has grown to a big pile of projects around various aspects of Enterprise Software. Stick to the core at the beginning and try to grasp the concepts. [Download](http://www.springframework.org/download) the latest binaries and chec...
null
CC BY-SA 2.5
null
2008-08-12T09:31:41.737
2008-08-12T09:31:41.737
null
null
198
null
8,653
1
8,656
null
2
1,410
Are there any codes that allow for numerical formatting of data when using string.format?
Numerical formatting using String.Format
CC BY-SA 2.5
0
2008-08-12T10:40:05.030
2020-06-25T20:43:41.470
2008-11-11T06:41:34.247
242
1,076
[ ".net", "formatting", "numeric" ]
8,637
2
null
8,472
205
null
[A method that I have developed](http://gatekiller.co.uk/Post/JavaScript_Captcha) and which seems to work perfectly (although I probably don't get as much comment spam as you), is to have a hidden field and fill it with a bogus value e.g.: ``` <input type="hidden" name="antispam" value="lalalala" /> ``` I then have ...
null
CC BY-SA 3.0
null
2008-08-12T09:34:30.670
2011-10-28T05:46:31.177
2011-10-28T05:46:31.177
558,592
383
null
8,655
2
null
8,599
6
null
You might want to take a look at [wbxml](http://en.wikipedia.org/wiki/WBXML) (Wireless Binary XML) it is optimized for size, and often used on mobile phones, but it is not optimized for parsing speed.
null
CC BY-SA 2.5
null
2008-08-12T10:42:35.917
2008-08-12T10:42:35.917
null
null
238
null
8,645
2
null
8,599
1
null
What kind of data are you planning to use? I would say, that if the server is also done in Java, easiest way for small footprint is to send/receive binary data in predefined format. Just write everything in known order into `DataOutputStream`. But it would really depend, what what kind of data are you working on and c...
null
CC BY-SA 3.0
null
2008-08-12T10:13:29.687
2014-03-21T03:12:40.260
2014-03-21T03:12:40.260
996,493
706
null
8,648
1
null
null
4
3,994
I'm looking for a c# snippet which I can insert in a Windows service. The code must empty the recycle bin for all users on the computer. I have previously tried using `SHEmptyRecycleBin` (ref [http://www.codeproject.com/KB/cs/Empty_Recycle_Bin.aspx](http://www.codeproject.com/KB/cs/Empty_Recycle_Bin.aspx)) however the...
How can I empty the recycle bin for all users from a Windows service application in c#
CC BY-SA 3.0
null
2008-08-12T10:32:40.100
2011-09-02T12:09:08.750
2011-09-02T12:09:08.750
520,162
254
[ "c#", "recycle-bin" ]
8,654
2
null
8,624
1
null
I'm not sure there's any value in telling users how long it took for the server to render the page. It could well be worth you logging that sort of information, but they don't care. If it takes the server 0.001 of a second to draw the page but it takes 17 seconds for them to load it (due to network, javascript, page ...
null
CC BY-SA 2.5
null
2008-08-12T10:40:26.590
2008-08-12T10:40:26.590
null
null
905
null
8,566
1
null
null
48
176,780
First off, this is a question about a desktop application using Windows Forms, not an [ASP.NET](http://en.wikipedia.org/wiki/ASP.NET) question. I need to interact with controls on other forms. I am trying to access the controls by using, for example, the following... ``` otherForm.Controls["nameOfControl"].Visible = ...
Best way to access a control on another form in Windows Forms?
CC BY-SA 3.0
0
2008-08-12T07:32:32.540
2018-12-13T21:59:03.327
2017-05-23T12:26:24.527
-1
551
[ "c#", "winforms", "controls" ]
8,656
2
null
8,653
6
null
Loads, stick `string.Format` into Google :-) A quite good tutorial is at [iduno](http://web.archive.org/web/20150303084355/http://idunno.org:80/archive/2004/07/14/122.aspx)
null
CC BY-SA 4.0
null
2008-08-12T10:42:59.953
2020-06-25T20:43:41.470
2020-06-25T20:43:41.470
9,780,149
905
null
8,661
2
null
8,612
0
null
Another thing to consider: in debug mode, the variables are initialized with 0xCCCCCCCC instead of zero. That might have some nasty side effects.
null
CC BY-SA 3.0
null
2008-08-12T10:48:18.663
2012-09-07T22:59:47.557
2012-09-07T22:59:47.557
450,827
null
null
8,663
2
null
8,651
1
null
Make sure your project is set to target 3.5, and not 2.0. As others have said, your 'var' test is a test of C#3 (i.e. VS2008), not the 3.5 framework. If you set the project framework target settings properly, you should not expect to need to manually add dll references at this point.
null
CC BY-SA 2.5
null
2008-08-12T10:49:50.503
2008-08-12T10:49:50.503
null
null
987
null
8,651
1
8,687
null
4
6,750
I am trying to load Linq on my .Net 3.5 enabled web server by adding the following to my .aspx page: ``` <%@ Import Namespace="System.Query" %> ``` However, this fails and tells me it cannot find the namespace. > The type or namespace name 'Query' does not exist in the namespace 'System' I have also tried with no...
Import Namespace System.Query
CC BY-SA 3.0
0
2008-08-12T10:37:50.107
2012-04-25T15:08:24.523
2012-04-25T15:08:24.523
623,518
383
[ "asp.net", "linq" ]
8,657
2
null
8,651
0
null
The `var hello` stuff is compiler magic and will work without Linq. Try adding a reference to `System.Core` --- Sorry, I wasn't clear. I meant add `System.Core` to the web project's references, not to the page. The `Import` on the page are basically just using statements, allowing you to skip the namespace on th...
null
CC BY-SA 2.5
null
2008-08-12T10:44:41.323
2008-08-12T10:53:37.827
2008-08-12T10:53:37.827
905
905
null
8,659
2
null
8,653
4
null
Yes, you could format it this way: ``` string.Format("Format number to: {0 : #.00}", number); string.Format("Format date to: {0 : MM/dd/yyyy}", date); ```
null
CC BY-SA 2.5
null
2008-08-12T10:45:13.930
2008-08-12T10:45:13.930
null
null
372
null
8,664
2
null
8,653
2
null
There are a number. This [MS site is probably the best place to look](http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx)
null
CC BY-SA 2.5
null
2008-08-12T10:51:10.593
2008-08-12T10:51:10.593
null
null
1,075
null
8,658
2
null
8,653
1
null
As Keith said above. The most common one I use is currency: ``` String.Format("{0:c}", 12000); ``` Which would output £12,000.00
null
CC BY-SA 2.5
null
2008-08-12T10:45:07.860
2008-08-12T10:45:07.860
null
null
383
null
8,676
1
110,153
null
866
289,820
Now that .NET v3.5 SP1 has been released (along with VS2008 SP1), we now have access to the .NET entity framework. My question is this. When trying to decide between using the Entity Framework and LINQ to SQL as an ORM, what's the difference? The way I understand it, the Entity Framework (when used with LINQ to Enti...
Entity Framework vs LINQ to SQL
CC BY-SA 2.5
0
2008-08-12T11:04:11.677
2022-08-12T21:26:18.780
2014-03-08T00:02:04.950
168,868
475
[ ".net", "entity-framework", "linq-to-sql" ]
8,666
2
null
8,653
2
null
Here is another very good reference that compliments what Keith mentioned. [http://www.scribd.com/doc/2547864/msnetformattingstrings](http://www.scribd.com/doc/2547864/msnetformattingstrings)
null
CC BY-SA 2.5
null
2008-08-12T10:51:58.843
2008-08-12T10:51:58.843
null
null
1,082
null
8,678
2
null
8,648
2
null
I think doing something like this is against Microsoft recommended practices. What are you trying to do that requires emptying the Recycle Bin from a Windows service?
null
CC BY-SA 2.5
null
2008-08-12T11:07:25.693
2008-08-12T11:07:25.693
null
null
1,065
null
8,668
2
null
7,885
23
null
You should definitely take a look at [Moose](http://search.cpan.org/perldoc?Moose). ``` package Point; use Moose; # automatically turns on strict and warnings has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); sub clear { my $self = shift; $self->x(0); $self->y(0); } ``` Moos...
null
CC BY-SA 2.5
null
2008-08-12T10:54:25.360
2009-07-15T04:48:37.023
2009-07-15T04:48:37.023
1,337
238
null
8,669
1
9,319
null
3
980
I'm trying to write a Crystal Report which has totals grouped in a different way to the main report. The only way I've been able to do this so far is to use a subreport for the totals, but it means having to hit the data source again to retrieve the same data, which seems like nonsense. Here's a simplified example: ``...
Is there some way of recycling a Crystal Reports dataset?
CC BY-SA 2.5
null
2008-08-12T10:54:54.330
2008-09-12T20:12:16.037
2008-09-12T20:12:16.037
4,223
1,030
[ "asp.net", "crystal-reports", "dataset" ]
8,679
2
null
2,844
105
null
You may want to try using the inttypes.h library that gives you types such as `int32_t`, `int64_t`, `uint64_t` etc. You can then use its macros such as: ``` #include <inttypes.h> uint64_t x; uint32_t y; printf("x: %"PRIu64", y: %"PRIu32"\n", x, y); ``` This is "guaranteed" to not give you the same trouble as `long`,...
null
CC BY-SA 4.0
null
2008-08-12T11:07:50.060
2022-09-13T20:57:38.787
2022-09-13T20:57:38.787
1,468,842
1,084
null
8,686
2
null
8,676
99
null
There are a number of obvious differences outlined in that article @lars posted, but short answer is: - - - - - The original premise was L2S is for Rapid Development, and EF for more "enterprisey" n-tier applications, but that is selling L2S a little short.
null
CC BY-SA 2.5
null
2008-08-12T11:15:24.803
2008-08-12T11:15:24.803
null
null
1,075
null
8,681
1
9,269
null
13
1,762
If you're using Opera 9.5x you may notice that our client-side [JQuery.Validate](http://docs.jquery.com/Plugins/Validation) code is disabled here at Stack Overflow. ``` function initValidation() { if (navigator.userAgent.indexOf("Opera") != -1) return; $("#post-text").rules("add", { required: true, minlength: ...
JQuery.Validate failure in Opera
CC BY-SA 2.5
null
2008-08-12T11:11:29.680
2021-01-26T15:30:53.487
2008-08-29T15:54:41.783
1,790
1
[ "jquery", "validation", "opera" ]
8,687
2
null
8,651
5
null
> I have version 2 selected in IIS and I Well, surely that's your problem? Select 3.5. Actually, here's the real info: [http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx](http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx)
null
CC BY-SA 2.5
null
2008-08-12T11:15:29.797
2008-08-12T11:19:22.470
2008-08-12T11:19:22.470
987
987
null
8,688
1
12,447
null
4
11,798
I am trying to install VS2008 sp1 to my work machine - it has a pathetic 10Gb C drive. The SP1 bootstrapper doesn't give the option to install items to D, only C. It needs 3Gb free and the machine only has about 700Mb. VS allowed me to install to D originally why not the SP. The only thing I can think of that it requi...
Install Visual Studio 2008 Sp1 on "D" Drive
CC BY-SA 2.5
0
2008-08-12T11:20:43.887
2009-06-11T22:31:37.513
2008-11-14T04:07:57.763
2,660
1,075
[ "visual-studio", "visual-studio-2008", "visual-studio-2008-sp1" ]
8,690
2
null
1,669
7
null
Python comes bundled with a python compiler written in Python. You can see the source code, and it includes all phases, from parsing, abstract syntax tree, emitting code, etc. Hack it.
null
CC BY-SA 2.5
null
2008-08-12T11:25:34.113
2008-08-12T11:25:34.113
null
null
null
null
8,692
1
null
null
253
359,802
What are the libraries that support XPath? Is there a full implementation? How is the library used? Where is its website?
How to use XPath in Python?
CC BY-SA 4.0
0
2008-08-12T11:28:36.900
2022-11-02T11:25:50.533
2020-07-10T14:39:28.570
9,926,721
null
[ "python", "xml", "dom", "xpath", "python-2.x" ]
8,689
2
null
8,685
1
null
Kevin, you work off a solid absolute base (i.e. a date / time), not a relative time period. You then convert to the relative time periods. So, for example, by default, if you were showing a calendar, you'd work from todays date. ``` int strtotime ( string $time [, int $now ] ) ``` You can see in the function def...
null
CC BY-SA 2.5
null
2008-08-12T11:23:28.733
2008-08-12T11:23:28.733
null
null
1,087
null
8,685
1
113,115
null
7
2,816
I'm trying to use `strtotime()` to respond to a button click to advance -1 and +1 days (two buttons) relative to the day advanced to on the previous click. - - - I understand the buttons and the displaying the date and using `$_GET` and PHP to pass info, but how do I get `strtotime()` to work on the relative d...
Advancing through relative dates using strtotime()
CC BY-SA 4.0
null
2008-08-12T11:14:27.660
2019-06-04T09:31:13.543
2019-06-04T09:31:13.543
6,556,397
1,149
[ "php", "date", "strtotime" ]
8,695
2
null
8,214
0
null
Perhaps the [Microsoft UI Automation](http://msdn.microsoft.com/en-us/library/ms747327.aspx) for WPF can help out ? Its a framework for automating your UI, perhaps it can be used to log stuff for you... We use the Automation Framework for auto-testing our UI in WPF.
null
CC BY-SA 2.5
null
2008-08-12T11:31:13.367
2008-08-12T11:31:13.367
null
null
900
null
8,697
2
null
7,118
0
null
Safari 3.1 doesn't need any magical commandline preferences -- the Advanced tab of the preferences window has an enable develop menu checkbox. That said if you can use the webkit nightlies ([http://nightly.webkit.org](http://nightly.webkit.org)), you're probably better off doing that as the developer tools are vastly ...
null
CC BY-SA 2.5
null
2008-08-12T11:36:59.753
2008-08-12T11:36:59.753
null
null
784
null
8,693
2
null
8,691
6
null
`DesignerCategory` is used to say if the class is a form, component etc. For full windows the attribute you want is: ``` [System.ComponentModel.Category("Custom")] ``` and for the description you can use `[System.ComponentModel.Description("This is the description")]` To use both together: ``` [System.ComponentMo...
null
CC BY-SA 4.0
null
2008-08-12T11:29:40.610
2020-01-19T13:30:44.720
2020-01-19T13:30:44.720
5,468,953
33
null
8,699
2
null
8,692
85
null
The [lxml package](http://lxml.de/) supports xpath. It seems to work pretty well, although I've had some trouble with the self:: axis. There's also [Amara](http://pypi.python.org/pypi/Amara/1.1.6), but I haven't used it personally.
null
CC BY-SA 3.0
null
2008-08-12T11:40:13.630
2013-01-10T19:26:13.750
2013-01-10T19:26:13.750
1,468,366
207
null
8,707
2
null
8,688
1
null
If you have an empty partition, you can try to [create a mounted drive](http://support.microsoft.com/kb/307889) (i.e. map the partition to an empty folder on the C: drive) and see whether the SP1 bootstrapper will be able to use it.
null
CC BY-SA 2.5
null
2008-08-12T11:54:49.483
2008-08-12T11:54:49.483
null
null
95
null
8,706
2
null
8,691
4
null
Is this of use to you? I am not into CF development, but it looks like you need to add some XML metadata to enable it: [http://blogs.msdn.com/bluecollar/archive/2007/02/08/adding-compact-framework-design-time-attributes-or-more-fun-with-textboxes.aspx](http://blogs.msdn.com/bluecollar/archive/2007/02/08/adding-compact...
null
CC BY-SA 2.5
null
2008-08-12T11:51:49.753
2008-08-12T11:54:55.037
2008-08-12T11:54:55.053
832
832
null
8,691
1
8,706
null
10
15,161
For a C# UserControl on Windows Mobile (though please answer if you know it for full Windows...it might work) how do you change what shows up in the Designer Properties window for one of the Control's public Properties. For example: ``` private Color blah = Color.Black; public Color Blah { get { return this.blah...
User Control Property Designer Properties
CC BY-SA 3.0
0
2008-08-12T11:25:41.227
2020-01-19T13:30:44.720
2016-02-07T18:17:33.180
2,921,691
194
[ "c#", "user-controls", "windows-mobile" ]
8,711
2
null
4,724
0
null
Syntax is irrelevant, readability is not!
null
CC BY-SA 2.5
null
2008-08-12T11:59:37.350
2008-08-12T11:59:37.350
null
null
1,065
null
8,713
2
null
7,758
1
null
Ok, here's the deal: In silverlight, you can't bind values from one UI element to another declaratively. The only way to do what I was trying to do here would be in the C# code. I had a reference for this yesterday, but now I guess you'll just have to take my word for it :)
null
CC BY-SA 2.5
null
2008-08-12T12:00:26.977
2008-08-12T12:00:26.977
null
null
93
null
8,704
1
192,733
null
7
1,975
I have an MFC application compiled with /clr and I'm trying to implement a final handler for otherwise un-caught managed exceptions. For native exceptions, overriding `CWinApp::ProcessWndProcException` works. The two events suggested in Jeff's [CodeProject article](http://www.codeproject.com/KB/exception/ExceptionHand...
Final managed exception handler in a mixed native/managed executable?
CC BY-SA 3.0
null
2008-08-12T11:48:52.850
2012-04-25T16:08:49.480
2012-04-25T16:08:49.480
1,332,690
1,042
[ "exception", "executable", "mixed", "unhandled" ]
8,725
2
null
1,644
1
null
I listen to The Guardian's [TechWeekly](http://www.guardian.co.uk/technology/series/techweekly), it's very informed for being done by journalists for a mainstream newspaper. Well produced and up to date. Has a focus on Britain and Europe.
null
CC BY-SA 2.5
null
2008-08-12T12:06:03.157
2008-08-12T12:06:03.157
null
null
null
null
8,712
2
null
8,681
0
null
I can't seem to reproduce this bug. Can you give more details? I have my copy of Opera masquerading as Firefox so the validation should be executing: ``` >>> $.browser.opera false ``` When I go to the edit profile page and enter a malformed date, the red text comes up and says "Please enter a valid date". That's j...
null
CC BY-SA 2.5
null
2008-08-12T12:00:24.010
2008-08-12T14:10:41.940
2008-08-12T14:10:41.940
619
619
null
8,731
2
null
1,323
3
null
This problem is called color quantization, and has many well known algorithms: [http://en.wikipedia.org/wiki/Color_quantization](http://en.wikipedia.org/wiki/Color_quantization) I know people who implemented the octree approach to good effect.
null
CC BY-SA 2.5
null
2008-08-12T12:11:29.387
2008-08-12T12:11:29.387
null
null
279
null
8,709
2
null
7,118
1
null
The best method I've used for debugging JavaScript in Internet Explorer is through the . The debugger is full featured and very easy to use. The article bellow teaches how to install the and configure it. [HOW-TO: Debug JavaScript in Internet Explorer](http://web.archive.org/web/20100522094920/http://www.jonathanboute...
null
CC BY-SA 4.0
null
2008-08-12T11:58:34.110
2020-06-26T15:40:26.407
2020-06-26T15:40:26.407
9,780,149
1,100
null
8,730
2
null
8,715
1
null
If a query is more then just a simple SELECT on a single table I always run it through EXPLAIN if I am on MySQL or PostgreSQL. If you are using SQL Server then Management Studio has a Display Estimated Execution Plan which is essentially the same. It is useful to see how the engine will access each table and what index...
null
CC BY-SA 2.5
null
2008-08-12T12:11:23.910
2008-08-12T12:11:23.910
null
null
200
null
8,726
1
8,794
null
7
2,862
I have a script that checks responses from HTTP servers using the PEAR HTTP classes. However, I've recently found that the script fails on FTP servers (and probably anything that's not HTTP or HTTPS). I tried Google, but didn't see any scripts or code that returned the server status code from servers other than HTTP se...
Checking FTP status codes with a PHP script
CC BY-SA 2.5
null
2008-08-12T12:07:15.557
2022-07-23T12:32:35.197
2008-09-17T08:00:59.793
2,961
572
[ "php", "http", "ftp", "pear", "server-response" ]
8,728
1
161,214
null
4
5,604
I've got an MDI application written in Delphi 2006 which runs XP with the default theme. Is there a way of controlling the appearance of the MDI Children to avoid the large XP-style title bar on each window? I've tried setting the `BorderStyle` of the `MDIChildren` to `bsSizeToolWin` but they are still rendered as ...
Delphi MDI Application and the titlebar of the MDI Children
CC BY-SA 3.0
0
2008-08-12T12:10:14.663
2016-07-22T13:44:25.660
2016-07-22T13:44:25.660
4,311,889
1,008
[ "delphi", "forms", "mdi" ]
8,739
2
null
2,525
45
null
Back with .Net 1.1 obfuscation was essential: decompiling code was easy, and you could go from assembly, to IL, to C# code and have it compiled again with very little effort. Now with .Net 3.5 I'm not at all sure. Try decompiling a 3.5 assembly; what you get is a long long way from compiling. Add the optimisations f...
null
CC BY-SA 2.5
null
2008-08-12T12:19:13.800
2008-08-12T12:19:13.800
null
null
905
null
8,715
1
null
null
6
1,043
Jeff mentioned in one of the podcasts that one of the things he always does is put in instrumentation for database calls, so that he can tell what queries are causing slowness etc. This is something I've measured in the past using SQL Profiler, but I'm interested in what strategies other people have used to include th...
Instrumenting Database Access
CC BY-SA 2.5
null
2008-08-12T12:01:01.780
2010-05-25T19:18:02.230
2008-09-05T13:10:05.737
908
908
[ "database", "logging", "instrumentation" ]
8,742
1
8,764
null
16
16,967
I'm trying to rebuild an old metronome application that was originally written using MFC in C++ to be written in .NET using C#. One of the issues I'm running into is getting the timer to "tick" accurately enough. For example, assuming an easy BPM (beats per minute) of 120, the timer should tick every .5 seconds (or 5...
Getting accurate ticks from a timer in C#
CC BY-SA 2.5
0
2008-08-12T12:20:29.853
2014-12-18T14:26:56.997
null
null
1,108
[ ".net", "timer" ]
8,740
2
null
8,726
0
null
Wouldn't it be simpler to use the built-in PHP FTP* functionality than trying to roll your own? If the URI is coming from a source outside your control, you would need to check the protocal definition (http:// or ftp://, etc) in order to determine which functionality to use, but that is fairly trivial. If there is no...
null
CC BY-SA 2.5
null
2008-08-12T12:19:34.300
2008-08-12T12:19:34.300
null
null
377
null
8,750
2
null
8,715
0
null
If you're writing queries in SQL Management Studio you can enter: `SET STATISTICS TIME ON` and SQl Server will tell you how long the individual parts of a query took to parse, compile and execute. You might be able to log this information by handling the InfoMessage event of the SqlConnection class (but I think using t...
null
CC BY-SA 2.5
null
2008-08-12T12:27:58.137
2008-08-12T12:27:58.137
null
null
961
null
8,754
2
null
8,443
0
null
Is it specific to the app you're working on or do all breakpoints in any app break the debugger? Is anything different if you attach the debugger manually after launching the app normally?
null
CC BY-SA 2.5
null
2008-08-12T12:28:32.380
2008-08-12T12:28:32.380
null
null
1,042
null
8,747
1
8,767
null
19
4,918
Where should I start learning about version control systems? I've used SVN, Team Foundation, and Sourcesafe in the past but I don't really feel like I grasp it completely, and my team doesn't seem to grasp it either. Which points are the most important to master? I realise this differs from VCS to VCS, but for the sak...
Learning Version Control, and learning it well
CC BY-SA 2.5
0
2008-08-12T12:24:11.733
2014-10-28T07:44:41.243
2009-04-27T22:34:31.327
15,168
614
[ "svn", "version-control" ]
8,751
2
null
8,669
1
null
The only way I can think of doing this without a second run through the data would be by creating some formulas to do running totals per group. The problem I assume you are running into with the existing running totals is that they are intended to follow each of the groups that they are totaling. Since you seem to want...
null
CC BY-SA 2.5
null
2008-08-12T12:28:06.280
2008-08-12T12:28:06.280
null
null
1,104
null
8,753
2
null
2,222
5
null
The [dpUint](http://code.google.com/p/dpuint/) testing framework has a test runner built with AIR which can be integrated with a build script. There is also my [FlexUnit](http://developer.iconara.net/objectlib/flexunitautomation.html) automation kit which does more or less the same for FlexUnit. It has an Ant macro th...
null
CC BY-SA 2.5
null
2008-08-12T12:28:18.340
2008-08-12T12:28:18.340
null
null
1,109
null
8,759
2
null
8,747
4
null
There are a couple of free ebooks on the subject. Try: Version Control With Subversion: [Version Control with Subversion](http://svnbook.red-bean.com) Subversion Version Control (PDF): [Subversion Version Control](http://www.informit.com/content/images/0131855182/downloads/Nagel_book.pdf) I have read and would rec...
null
CC BY-SA 3.0
null
2008-08-12T12:32:38.347
2013-01-27T14:03:43.417
2013-01-27T14:03:43.417
null
998
null
8,745
2
null
4,347
0
null
For business apps, Windows Forms is very mature. It provides a gentle path from auto-generating a lot for you into allowing fine-grained control and rolling your own. There are tons of high-quality third party controls and a large body of examples, docs, etc out there. It's hard to run into a problem that someone else...
null
CC BY-SA 2.5
null
2008-08-12T12:23:30.143
2008-08-12T12:23:30.143
null
null
1,042
null
8,764
2
null
8,742
11
null
There are three timer classes called 'Timer' in .NET. It sounds like you're using the Windows Forms one, but actually you might find the System.Threading.Timer class more useful - but be careful because it calls back on a pool thread, so you can't directly interact with your form from the callback. Another approach ...
null
CC BY-SA 2.5
null
2008-08-12T12:34:43.443
2008-08-12T12:34:43.443
null
null
987
null
8,763
1
8,777
null
20
37,042
I'm trying to rebuild an old metronome application that was originally written using `MFC` in C++ to be written in `.NET` using `C#`. One of the issues I'm running into is playing the midi files that are used to represent the metronome "clicks". I've found a few articles online about playing `MIDI` in .NET, but most o...
Best way to play MIDI sounds using C#
CC BY-SA 3.0
0
2008-08-12T12:34:07.733
2020-08-21T09:29:01.697
2015-12-14T06:04:21.993
4,169,569
1,108
[ "c#", ".net", "midi" ]
8,762
2
null
1,323
3
null
It seems perception is important to you, in that case you might want to consider working with a perceptual color space such as YUV, YCbCr or Lab. Everytime I've used those, they have given me much better results than sRGB alone. Converting to and from sRGB can be a pain but in your case it could actually make the alg...
null
CC BY-SA 2.5
null
2008-08-12T12:33:29.000
2008-08-12T12:33:29.000
null
null
42
null
8,766
2
null
8,747
9
null
I found this useful [Source Control HOWTO by Eric sink](http://www.ericsink.com/scm/source_control.html)
null
CC BY-SA 2.5
null
2008-08-12T12:35:22.413
2008-08-12T12:35:22.413
null
null
961
null
8,765
2
null
1,644
9
null
I can second Jon Galloway's mention of [Herding Code](http://herdingcode.com), and since I have absolutely nothing to do with the podcast, with nothing to gain, my opinion may be more valuable than his :-). There are only a few there as it's relatively new, but they are jam packed with good stuff that is very relevant...
null
CC BY-SA 2.5
null
2008-08-12T12:34:44.473
2010-02-22T03:56:43.263
2010-02-22T03:56:43.263
1,984,928
1,107
null
8,769
2
null
8,747
1
null
To answer your question re: Which are the most important points to master I would suggest that after you get through the whole checking in and out process, rolling back to old versions and performing diffs you should take a look at branching. Branching can help you deal with the pain of being in the middle of a large c...
null
CC BY-SA 2.5
null
2008-08-12T12:36:36.857
2008-08-12T12:36:36.857
null
null
1,104
null
8,773
2
null
8,763
1
null
I can't claim to know much about it, but I don't think it's that straightforward - Carl Franklin of [DotNetRocks](http://www.dotnetrocks.com/) fame has done a fair bit with it - have you seen [his DNRTV](http://dnrtv.com/default.aspx?showID=110)?
null
CC BY-SA 2.5
null
2008-08-12T12:39:17.460
2008-08-12T12:39:17.460
null
null
908
null
8,767
2
null
8,747
10
null
The wikipedia article on Revision Control is a great place to start [Revision control](http://en.wikipedia.org/wiki/Revision_control) When trying to teach my colleagues, I found getting him to understand the vocabulary at the end was a great way to start to introduce him to source code control techniques. Don't kno...
null
CC BY-SA 3.0
null
2008-08-12T12:35:51.740
2013-01-27T14:04:37.620
2013-01-27T14:04:37.620
null
1,087
null
8,770
2
null
2,222
2
null
About how to develop Flex applications the right way, I wouldn't look too much at the Cairngorm framework. It does claim to show "best practice" and so on, but I would say that the opposite is true. It's based around the use of global variables, and other things you should try to avoid. I've [outlined some of the probl...
null
CC BY-SA 2.5
null
2008-08-12T12:36:52.080
2008-08-12T12:36:52.080
null
null
1,109
null
8,776
2
null
8,756
5
null
I found [iphone-universal](http://code.google.com/p/iphone-universal/) on Google Code the other day. Haven't had a chance to try it out but it looks promising.
null
CC BY-SA 2.5
null
2008-08-12T12:45:01.550
2008-08-12T12:45:01.550
null
null
200
null
8,757
2
null
8,747
0
null
Check out [GIT](http://git.or.cz/). A talk on it [here](http://www.youtube.com/watch?v=4XpnKHJAok8).
null
CC BY-SA 2.5
null
2008-08-12T12:29:58.243
2008-08-12T12:29:58.243
null
null
1,071
null
8,774
2
null
8,648
1
null
First, have you tried running the service on an interactive user account? Maybe SHEmptyRecycleBin requires an interactive user even though it doesn't necessarily display a Window. Second, I'm not sure it's a good idea to delete other users' stuff but I guess you have a very good reason?
null
CC BY-SA 2.5
null
2008-08-12T12:40:35.210
2008-08-12T12:40:35.210
null
null
42
null
8,761
1
8,804
null
4
4,427
I'm updating some of our legacy C++ code to use the "MFC feature pack" that Microsoft released for Visual Studio 2008. We've used the new classes to derive our application from CFrameWndEx, and are applying the Office 2007 styles to give our application a more modern appearance. This gives us gradient filled window tit...
Find out which colours are in use when using the MFC Feature pack in Office 2007 style
CC BY-SA 2.5
null
2008-08-12T12:33:10.857
2008-10-14T17:28:54.917
2008-10-01T10:15:05.980
123
1,078
[ "colors", "mfc-feature-pack" ]
8,779
2
null
8,763
12
null
I'm working on a C# MIDI application at the moment, and the others are right - you need to use p/invoke for this. I'm rolling my own as that seemed more appropriate for the application (I only need a small subset of MIDI functionality), but for your purposes the [C# MIDI Toolkit](http://www.codeproject.com/KB/audio-vid...
null
CC BY-SA 2.5
null
2008-08-12T12:51:50.773
2008-08-12T12:51:50.773
null
null
991
null
8,778
2
null
8,756
0
null
This good, but unfortunately it's being licensed under GPLv3, so I'm actually a bit afraid to start looking at that code. The framework I either need to find, or develop if needs be, must be able to be used as part of a commercial program, without having to license the entire program different. Commercial libraries ar...
null
CC BY-SA 2.5
null
2008-08-12T12:50:24.970
2008-08-12T12:55:13.213
2008-08-12T12:55:13.213
267
267
null
8,784
2
null
8,688
0
null
When you say "10Gb C drive", do you mean it's a 10-gig disk or a partition? If the former, you should really be looking at replacing the drive - it's , and I'd be starting to worry about how much longer it has to live. If the latter, then assuming that the C: drive restriction can't easily be worked around, then I'd l...
null
CC BY-SA 2.5
null
2008-08-12T12:59:56.903
2008-08-12T12:59:56.903
null
null
1,060
null
8,756
1
8,776
null
22
20,868
Does anyone have any good starting points for me when looking at making web pages/sites/applications specifically for viewing on the iPhone? I've looked at templates like the one [Joe Hewitt](http://blog.wired.com/monkeybites/2007/07/meet-joe-hewitt.html) has made, and also seen some templates I can purchase, which I ...
iPhone web applications, templates, frameworks?
CC BY-SA 2.5
0
2008-08-12T12:29:32.017
2019-08-17T03:08:25.067
2008-12-06T08:59:37.043
714
267
[ "iphone", "web-applications", "dashcode" ]
8,777
2
null
8,763
9
null
I think you'll need to p/invoke out to the windows api to be able to play midi files from .net. This codeproject article does a good job on explaining how to do this: [vb.net article to play midi files](http://www.codeproject.com/KB/audio-video/vbnetSoundClass.aspx) To rewrite this is c# you'd need the following impo...
null
CC BY-SA 3.0
null
2008-08-12T12:46:31.750
2014-05-29T19:42:21.143
2014-05-29T19:42:21.143
1,078
1,078
null
8,772
2
null
8,648
4
null
Hopefully you can't. A service running as the local machine should not be clearing my Recycle bin, ever. You could promote the service to run as an Admin account then it would have the right (and be a security risk), but why do you want to do this? It sounds like the sort of think Viruses try to do.
null
CC BY-SA 2.5
null
2008-08-12T12:38:28.413
2008-08-12T12:38:28.413
null
null
905
null
8,782
2
null
8,747
1
null
I think the Subversion documentation is a good place to start. I found that Wikipedia doesn't really help, since it only covers a 'fundamental' point of view. In the [Subversion Book](http://svnbook.red-bean.com/) that alex mentioned, I'd especially recommend Chapter 1, although that might be on a level that's too low...
null
CC BY-SA 2.5
null
2008-08-12T12:53:08.397
2008-08-12T13:00:02.860
2008-08-12T13:00:02.860
1,037
1,037
null
8,789
2
null
4,724
6
null
Any language looks a lot harder when one doesn't use the common indentation conventions of a language. When one follows them of Lisp, one sees how it expresses a syntax-tree structure quite readily (note, this isn't quite right because the preview lies a little; the r's should align with the fns in the recursive quick...
null
CC BY-SA 3.0
null
2008-08-12T13:03:58.283
2013-08-04T14:58:51.040
2013-08-04T14:58:51.040
279
279
null
8,783
2
null
2,518
4
null
It's possible to open multiple databases at once in SQLite, but it's doubtful if can be done when working from Flex/AIR. In the command line client you run `ATTACH DATABASE path/to/other.db AS otherDb` and then you can refer to tables in that database as `otherDb.tableName` just as in MySQL or SQL Server. > Tables in a...
null
CC BY-SA 4.0
null
2008-08-12T12:55:01.623
2021-10-25T11:58:16.390
2021-10-25T11:58:16.390
17,169,050
1,109
null
8,792
2
null
8,728
0
null
I don't think there is; in my experience, MDI in Delphi is very strictly limited and controlled by its implementation in the VCL (and perhaps also by the Windows API?). For example, don't try hiding an MDI child (you'll get an exception if you try, and you'll have to jump through a couple of API hoops to work around th...
null
CC BY-SA 2.5
null
2008-08-12T13:06:23.987
2008-08-12T13:06:23.987
null
null
1,037
null
8,788
2
null
8,612
1
null
Yeah, those bastard crashes are the hardest to fix. Fortunatly, there are some steps you can do that will give you clues before you resort to manually looking at the code and hope to find the needle. When does it crash? At every test? At a specific test? What does that test does that the others don't? What's the erro...
null
CC BY-SA 2.5
null
2008-08-12T13:03:36.223
2008-08-12T13:03:36.223
null
null
42
null
8,798
2
null
4,724
18
null
I programmed in Lisp professionally for about a year, and it is definitely worth learning. You will have unparalleled opportunity to remove redundancy from your code, by being able to replace all boilerplate code with functions where possible, and macros where not. You will also be able to access unparalleled flexibi...
null
CC BY-SA 2.5
null
2008-08-12T13:10:30.033
2008-08-13T11:50:59.100
2008-08-13T11:50:59.100
279
279
null
8,796
2
null
8,761
0
null
Have you tried: [2007 Office System Document: UI Style Guide for Solutions and Add Ins](http://www.microsoft.com/downloads/details.aspx?FamilyId=19E3BF38-434B-4DDD-9592-3749F6647105&displaylang=en) ?
null
CC BY-SA 2.5
null
2008-08-12T13:09:23.077
2008-08-12T13:09:23.077
null
null
383
null
8,795
1
8,859
null
13
21,598
I would like to create a stored procedure in MySQL that took a list as argument. For example, say that I would like to be able to set multiple tags for an item in one call, then what I want to do is to define a procedure that takes the ID of the item and a list of tags to set. However, I can't seem to find any way to d...
Is there any list datatype in MySQL stored procedures, or a way to emulate them?
CC BY-SA 2.5
null
2008-08-12T13:09:22.220
2013-01-24T10:19:05.903
2008-08-24T19:53:49.627
2,134
1,109
[ "mysql", "stored-procedures" ]
8,802
2
null
8,715
1
null
Recording the database calls, the gross timing and the number of records (bytes) returned in the application is useful, but it's not going to give you all the information you need. It might show you usage patterns you were not expecting. It might show where your using "row-by-row" access instead of "set based" operati...
null
CC BY-SA 2.5
null
2008-08-12T13:13:32.913
2008-08-12T13:13:32.913
null
null
993
null
8,804
2
null
8,761
1
null
Have you looked in the MFC source code, which you'll find in something like C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\src\mfc
null
CC BY-SA 2.5
null
2008-08-12T13:14:00.273
2008-08-12T13:14:00.273
null
null
987
null
8,803
2
null
8,651
2
null
What does the part of your web.config file look like? Here's what it looks like for a brand new ASP.NET 3.5 project made with Visual Studio 2008: ``` <assemblies> <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Data.DataSetExtensions, Version...
null
CC BY-SA 2.5
null
2008-08-12T13:13:54.860
2008-08-12T13:13:54.860
null
null
267
null
8,794
2
null
8,726
4
null
HTTP works slightly differently than FTP though unfortunately. Although both may look the same in your browser, HTTP works off the basis of URI (i.e. to access resource A, you have an identifier which tells you how to access that). FTP is very old school server driven. Even anonymous FTP is a bit of a hack, since you ...
null
CC BY-SA 3.0
null
2008-08-12T13:07:00.117
2012-05-08T09:17:01.410
2012-05-08T09:17:01.410
736,564
1,087
null
8,790
1
8,805
null
27
23,647
I have a build script and as part of that script it copies a jar file to a directory, for ease lets call it the utils jar. the utils jar is built by another build script sitting in another directory. What im trying to do have my build script run the utils build script so that I can ensure the utils jar is up to date....
Ant build scripts, antcall, dependencies, etc
CC BY-SA 2.5
0
2008-08-12T13:04:28.890
2012-09-06T12:59:53.280
2010-04-02T21:02:11.353
59,087
292
[ "ant", "build-process" ]
8,800
1
8,811
null
79
203,036
So I've been poking around with C# a bit lately, and all the Generic Collections have me a little confused. Say I wanted to represent a data structure where the head of a tree was a key value pair, and then there is one optional list of key value pairs below that (but no more levels than these). Would this be suitable?...
Best implementation for Key Value Pair Data Structure?
CC BY-SA 2.5
0
2008-08-12T13:12:50.887
2018-04-12T13:45:21.823
2008-08-25T12:57:23.783
2,134
61
[ "c#", "data-structures", "collections" ]
8,805
2
null
8,790
33
null
I've got something similar set up: I have a main Ant build.xml which calls a separate build.xml that takes care of building my tests. This is how I do it: ``` <target name="build-tests"> <subant target="build"> <fileset dir="${test.home}" includes="build.xml"/> </subant> </target> ``` The trick is to u...
null
CC BY-SA 2.5
null
2008-08-12T13:14:50.273
2011-01-16T23:38:21.417
2011-01-16T23:38:21.417
183,172
1,109
null