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
10,296
2
null
10,229
0
null
Get the [Parallel Fx](http://www.microsoft.com/downloads/details.aspx?FamilyID=e848dc1d-5be3-4941-8705-024bc7f180ba). Look at the BlockingCollection. Use a thread to feed it batches of records, and 1 to n threads pulling records off the collection to service. You can control the rate at which the collection is fed, ...
null
CC BY-SA 2.5
null
2008-08-13T19:40:41.133
2008-08-13T19:40:41.133
null
null
null
null
10,305
2
null
10,230
2
null
For C strings, ``` if (s[0] == 0) ``` will be faster than either ``` if (strlen(s) == 0) ``` or ``` if (strcmp(s, "") == 0) ``` because you will avoid the overhead of a function call.
null
CC BY-SA 2.5
null
2008-08-13T19:51:33.653
2008-08-13T19:51:33.653
null
null
116
null
10,307
2
null
10,205
1
null
To do a shameless plug, I've been working on a library for a while called [fotelo](http://www.codeplex.com/fotelo) (Formatted Text Loader) that I use to quickly parse large amounts of text based off of delimiter, position, or regex. For a quick string it is overkill, but if you're working with logs or large amounts, i...
null
CC BY-SA 2.5
null
2008-08-13T19:54:40.807
2008-08-13T19:54:40.807
null
null
71
null
10,303
1
null
null
3
5,375
I have some SQL Server DTS packages that import data from a FoxPro database. This was working fine until recently. Now the script that imports data from one of the FoxPro tables bombs out about 470,000 records into the import. I'm just pulling the data into a table with nullable varchar fields so I'm thinking it mus...
What FoxPro data tools can I use to find corrupted data?
CC BY-SA 3.0
0
2008-08-13T19:51:02.437
2012-12-19T19:39:04.033
2012-10-30T14:34:00.443
null
571
[ "database", "foxpro" ]
10,306
2
null
10,230
3
null
> In languages that use C-style (null-terminated) strings, comparing to "" will be faster Actually, it may be better to check if the first char in the string is '\0': ``` char *mystring; /* do something with the string */ if ((mystring != NULL) && (mystring[0] == '\0')) { /* the string is empty */ } ``` In Perl...
null
CC BY-SA 2.5
null
2008-08-13T19:52:16.163
2008-08-13T19:56:15.440
2008-08-13T19:56:15.440
1,084
1,084
null
10,310
2
null
10,303
1
null
Have you tried writing a small program that just copies the existing data to a new table? Also, [http://fox.wikis.com/wc.dll?Wiki~TableCorruptionRepairTools~VFP](http://fox.wikis.com/wc.dll?Wiki~TableCorruptionRepairTools~VFP)
null
CC BY-SA 2.5
null
2008-08-13T19:58:04.047
2008-08-13T19:58:04.047
null
null
414
null
10,308
1
10,461
null
32
26,597
Are you aware of any tool that creates diagrams showing the branch/merge activity in a SVN repository? We've all seen these diagrams in various tutorials. Some good, some not so good. Can they be created automatically (or maybe with a little prodding -- you might have to tell it what if your branching philosophy is de...
Graphical representation of SVN branch/merge activity
CC BY-SA 3.0
0
2008-08-13T19:55:06.393
2016-04-14T13:53:05.423
2016-04-14T13:53:05.423
null
763
[ "svn" ]
10,287
2
null
10,274
18
null
The only reason why I wouldn't use the `ThreadPool` for cheap multithreading is if I need to… 1. interract with the method running (e.g., to kill it) 2. run code on a STA thread (this happened to me) 3. keep the thread alive after my application has died (ThreadPool threads are background threads) 4. in case I need t...
null
CC BY-SA 4.0
null
2008-08-13T19:32:25.253
2018-07-12T14:55:27.010
2018-07-12T14:55:27.010
6,916,677
null
null
10,301
2
null
9,846
5
null
First off, I would put some time into trying out a few [VB.NET to C# converters](http://www.google.com/search?q=VB.NET+to+C%23+converter&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a). You're basically porting syntax, and there's no reason to do that by hand if you don't have to. Sure, you mi...
null
CC BY-SA 2.5
null
2008-08-13T19:47:04.350
2008-08-13T19:47:04.350
null
null
872
null
10,309
1
10,338
null
6
987
I've used the CF [Remote Performance Monitor](http://blogs.msdn.com/stevenpr/archive/2006/04/17/577636.aspx), however this seems to only track memory initialised in the managed world as opposed to the unmanaged world. Well, I can only presume this as the numbers listed in the profiler are way short of the maximum allow...
Whats the best way of finding ALL your memory when developing on the Compact Framework?
CC BY-SA 2.5
0
2008-08-13T19:56:52.707
2021-02-15T06:38:16.057
2008-09-24T15:28:59.337
12,870
1,143
[ "compact-framework", "windows-ce" ]
10,315
2
null
10,313
-1
null
Yes you can. I suggest using a tool like robocopy.
null
CC BY-SA 2.5
null
2008-08-13T20:04:20.930
2008-08-13T20:04:20.930
null
null
17
null
10,311
2
null
10,300
2
null
Have you taken a look at this? [http://www.codeplex.com/MvcValidatorToolkit](http://www.codeplex.com/MvcValidatorToolkit) Quoted from the page > The Validator Toolkit provides a set of validators for the new ASP.NET MVC framework to validate HTML forms on the client and server-side using validation sets. I'm...
null
CC BY-SA 2.5
null
2008-08-13T19:59:49.783
2008-08-13T19:59:49.783
null
null
76
null
10,313
1
30,296
null
12
57,807
Is it possible, in Windows XP, to copy files to a Network Place from the command line, a batch file or, even better, a PowerShell script? What sent me down this road of research was trying to publish files to a WSS 3.0 document library from a user's machine. I can't map a drive to the library in question because the W...
Can I copy files to a Network Place from a script or the command line?
CC BY-SA 2.5
0
2008-08-13T20:02:06.533
2020-06-25T16:15:43.047
2012-03-21T23:24:25.930
3
1,245
[ "powershell", "scripting", "command-line", "moss", "wss" ]
10,317
2
null
10,313
1
null
you could use the 'net' commands to authenticate and then copy the files. ``` copy src \\dest-machine\shared-library-name\dest ``` I'm not sure exactly how to handle authentication if it's needed.
null
CC BY-SA 2.5
null
2008-08-13T20:08:47.893
2008-08-13T20:08:47.893
null
null
1,084
null
10,312
2
null
10,230
0
null
@Nathan > Actually, it may be better to check if the first char in the string is '\0': I almost mentioned that, but ended up leaving it out, since calling `strcmp()` with the empty string and directly checking the first character in the string are both O(1). You basically just pay for an extra function call, which i...
null
CC BY-SA 2.5
null
2008-08-13T20:00:55.633
2008-08-13T20:00:55.633
null
null
872
null
10,321
2
null
10,228
60
null
Maybe there is a design problem in your tests. Usually each test must not depend on any other tests, so they can run in any order. Each test needs to instantiate and destroy everything it needs to run, that would be the perfect approach, you should never share objects and states between tests. Can you be more specif...
null
CC BY-SA 2.5
null
2008-08-13T20:13:42.830
2008-08-13T20:13:42.830
null
null
727
null
10,314
1
11,994
null
4
3,091
Being new to Objective-C (but a long term C/++) programmer I'm looking for advice/recommendations on naming conventions for variables. My personal preference would be to utilize a prefix for instance variables both for clarity within functions and to prevent shadowing of function parameters. However I'm a fan of prope...
How do you name your instance/param values?
CC BY-SA 2.5
0
2008-08-13T20:03:53.503
2009-02-24T07:23:16.713
2009-02-24T07:23:16.713
4,556
1,043
[ "objective-c", "cocoa" ]
10,327
2
null
10,324
41
null
You want [strtol](http://www.cplusplus.com/reference/clibrary/cstdlib/strtol.html) or [strtoul](http://en.cppreference.com/w/c/string/byte/strtoul). See also the [Unix man page](http://man7.org/linux/man-pages/man3/strtoul.3.html)
null
CC BY-SA 3.0
null
2008-08-13T20:22:13.357
2016-05-10T20:32:07.930
2016-05-10T20:32:07.930
224,132
429
null
10,325
2
null
10,158
0
null
Yeah, my question was not very clear. Here's a solution but rather than a single pass with a regex, I use a and perform iteration. It works as well but isn't as elegant: ``` string xpath = "//foo/bar/baz[1]/ns:foo2/@attr/text()"; string[] nodetests = xpath.Split( new char[] { '/' } ); for (int i = 0; i < nodetests.L...
null
CC BY-SA 3.0
null
2008-08-13T20:21:08.400
2016-02-07T18:31:53.023
2016-02-07T18:31:53.023
2,921,691
64
null
10,324
1
10,327
null
28
243,621
In C, what is the most efficient way to convert a string of hex digits into a binary `unsigned int` or `unsigned long`? For example, if I have `0xFFFFFFFE`, I want an `int` with the base10 value `4294967294`.
Convert a hexadecimal string to an integer efficiently in C?
CC BY-SA 3.0
0
2008-08-13T20:20:27.620
2019-10-06T00:44:55.777
2016-05-10T20:22:39.760
224,132
null
[ "c", "performance", "hex", "strtol" ]
10,333
2
null
9,926
1
null
One thing to keep in mind with using log4net or similar tool is that they change the timing of the application and can often hide the underlying race conditions. We had some poorly written code to debug and introduced logging and this actually removed race conditions and deadlocks (or greatly reduced their frequency).
null
CC BY-SA 2.5
null
2008-08-13T20:27:23.190
2008-08-13T20:27:23.190
null
null
748
null
10,328
2
null
10,260
0
null
I don't think the MVC Framework is quite ready for prime time yet, though I definitely plan to use it sometime next year. I love the clean URLs, clean XHTML (web forms can really spew out some nasty HTML) and the ability to create controller actions with no associated view. I've been using Master Pages since they wer...
null
CC BY-SA 2.5
null
2008-08-13T20:22:25.213
2008-08-13T20:22:25.213
null
null
203
null
10,331
2
null
10,324
25
null
Try this: ``` #include <stdio.h> int main() { char s[] = "fffffffe"; int x; sscanf(s, "%x", &x); printf("%u\n", x); } ```
null
CC BY-SA 3.0
null
2008-08-13T20:25:01.793
2014-03-18T15:30:08.973
2014-03-18T15:30:08.973
950,427
116
null
10,340
2
null
10,303
4
null
[Cmrepair](http://www.cmstory.com/_cm/CMrepair.zip) is an excellent freeware utility to repair corrupted .DBF files.
null
CC BY-SA 2.5
null
2008-08-13T20:34:58.887
2008-08-13T20:34:58.887
null
null
394
null
10,341
2
null
10,293
1
null
As a rule, if you have to ask this question, it is a bad idea.
null
CC BY-SA 2.5
null
2008-08-13T20:35:48.667
2008-08-13T20:35:48.667
null
null
414
null
10,342
2
null
10,314
1
null
I don't like using underscores as prefixes for any identifiers, because C and C++ both reserve certain underscore prefixes for use by the implementation. I think using "self.variable" is ugly. In general, I use unadorned identifiers (that is, no prefixes nor suffixes) for instance variables. If your class is so comp...
null
CC BY-SA 2.5
null
2008-08-13T20:36:32.877
2008-08-13T20:36:32.877
null
null
1,175
null
10,343
2
null
6,371
1
null
If you are in the .NET environment then the solution is [Tarantino (archived)](http://web.archive.org/web/20150814180919/https://github.com/HeadspringLabs/Tarantino). It handles all of this (including which sql scripts to install) in a NANT build.
null
CC BY-SA 4.0
null
2008-08-13T20:36:45.670
2020-06-25T08:29:24.153
2020-06-25T08:29:24.153
73,603
1,208
null
10,335
2
null
10,323
3
null
Well, a StringBuffer is not quite as necessary in Ruby, mainly because Strings in Ruby are mutable... thus you can build up a string by modifying the existing string instead of constructing new strings with each concat. As a note, you can also use special string syntax where you can build a string which references oth...
null
CC BY-SA 2.5
null
2008-08-13T20:31:29.050
2008-08-13T20:31:29.050
null
null
122
null
10,339
2
null
9,846
1
null
> 1) does it make sense to do a GUI in winforms but the expensive stuff in native, unmanaged C/C++ ? Most likely not. Unless you're communicating with a lot of other native C dlls or so on, C# is likely to be between 5% slower to 5% than C++ (std::string really kills you if you're using it) > 2) any recommendations ...
null
CC BY-SA 2.5
null
2008-08-13T20:34:21.353
2008-08-13T20:34:21.353
null
null
234
null
10,338
2
null
10,309
3
null
Try enabling [Interop logging](http://blogs.msdn.com/stevenpr/archive/2005/06/22/431612.aspx). Also, if you have access to the code of the native dll you are using, check this out: [http://msdn.microsoft.com/en-us/netframework/bb630228.aspx](http://msdn.microsoft.com/en-us/netframework/bb630228.aspx)
null
CC BY-SA 2.5
null
2008-08-13T20:33:46.253
2008-08-13T20:33:46.253
null
null
194
null
10,323
1
10,350
null
57
30,678
I recently read a nice [post](http://macdevelopertips.com/ruby/using-a-string-as-a-file-in-ruby.html) on using `StringIO` in Ruby. What the author doesn't mention, though, is that `StringIO` is just an "I." There's no "O." You do this, for example: ``` s = StringIO.new s << 'foo' s << 'bar' s.to_s # => should be "...
Why doesn't Ruby have a real StringBuffer or StringIO?
CC BY-SA 3.0
0
2008-08-13T20:19:09.807
2019-04-19T16:08:21.067
2015-07-15T19:24:56.123
1,157,054
1,190
[ "ruby", "string", "io", "buffer" ]
10,344
2
null
10,314
2
null
Personally, I follow the Cocoa naming conventions, using camel-casing for functions and variables, and capitalized camel-casing for object names (without the leading NS of course). I find type prefixing makes code more opaque to anyone who didn't write it (since everyone invariably uses different prefixes), and in a m...
null
CC BY-SA 2.5
null
2008-08-13T20:38:36.397
2008-08-13T20:38:36.397
null
null
1,975,282
null
10,349
1
10,359
null
18
8,079
I'm sure there is a good (or at least decent) reason for this. What is it?
In WinForms, why can't you update UI controls from other threads?
CC BY-SA 2.5
0
2008-08-13T20:41:24.927
2015-04-17T15:43:23.437
null
null
337
[ "winforms", "multithreading" ]
10,354
2
null
10,349
1
null
It is so that you don't have two things trying to update the control at the same time. (This could happen if the CPU switches to the other thread in the middle of a write/read) Same reason you need to use mutexes (or some other synchronization) when accessing shared variables between multiple threads. Edit: > In othe...
null
CC BY-SA 2.5
null
2008-08-13T20:44:01.473
2008-08-13T20:50:36.890
2008-08-13T20:50:36.890
194
194
null
10,350
2
null
10,323
124
null
I looked at the ruby documentation for `StringIO`, and it looks like what you want is [StringIO#string](http://ruby-doc.org/stdlib/libdoc/stringio/rdoc/classes/StringIO.html#method-i-string), not `StringIO#to_s` Thus, change your code to: ``` s = StringIO.new s << 'foo' s << 'bar' s.string ```
null
CC BY-SA 3.0
null
2008-08-13T20:41:29.153
2013-10-01T09:02:17.237
2013-10-01T09:02:17.237
477,037
122
null
10,348
2
null
9,926
3
null
I'd focus on the shared memory locks first (the mutexes and semaphores) as they are most likely to cause issues. Look at which state is being protected by locks and then determine which state is under the protection of several locks. This will give you a sense of potential conflicts. Look at situations where code that ...
null
CC BY-SA 2.5
null
2008-08-13T20:41:07.983
2008-08-13T20:41:07.983
null
null
748
null
10,358
2
null
10,323
12
null
Your example works in Ruby - I just tried it. ``` irb(main):001:0> require 'stringio' => true irb(main):002:0> s = StringIO.new => #<StringIO:0x2ced9a0> irb(main):003:0> s << 'foo' => #<StringIO:0x2ced9a0> irb(main):004:0> s << 'bar' => #<StringIO:0x2ced9a0> irb(main):005:0> s.string => "foobar" ``` Unless I'm missi...
null
CC BY-SA 2.5
null
2008-08-13T20:46:30.500
2008-08-13T20:46:30.500
null
null
521
null
10,355
2
null
10,313
0
null
If it's something you need to script, you should consider [NAnt](http://nant.sourceforge.net/). It's a mainly used for build scripts, but it's very powerful and reasonably easy to get started with. There's also [NAntContrib](http://nantcontrib.sourceforge.net/) and the [nant ftp task](http://web.archive.org/web/2011031...
null
CC BY-SA 4.0
null
2008-08-13T20:44:29.460
2020-06-25T16:15:43.047
2020-06-25T16:15:43.047
6,262,124
1,122
null
10,362
2
null
10,349
2
null
Back in 1.0/1.1 no exception was thrown during debugging, what you got instead was an intermittent run-time hanging scenario. Nice! :) Therefore with 2.0 they made this scenario throw an exception and quite rightly so. The actual reason for this is probably (as Adam Haile states) some kind of concurrency/locky issue. ...
null
CC BY-SA 2.5
null
2008-08-13T20:52:21.190
2008-08-13T20:52:21.190
null
null
1,143
null
10,367
2
null
10,260
2
null
ListView and its friend DataPager are probably worth looking at, but they're hardly "Killer" features. Things outside of ASP.NET specifically (LINQ, for example) are probably more likely to be get the "Killer" commendation.
null
CC BY-SA 2.5
null
2008-08-13T21:03:54.537
2008-08-13T21:03:54.537
null
null
337
null
10,368
2
null
10,366
1
null
Check the error console (Tools Menu > Error Console in Firefox 3) to make sure that there isn't another error happening that you're not seeing, which is stopping your script from working.
null
CC BY-SA 2.5
null
2008-08-13T21:05:23.100
2008-08-13T21:05:23.100
null
null
1,975,282
null
10,359
2
null
10,349
9
null
Because you can easily end up with a deadlock (among other issues). For exmaple, your secondary thread could be trying to update the UI control, but the UI control will be waiting for a resource locked by the secondary thread to be released, so both threads end up waiting for each other to finish. As others have comm...
null
CC BY-SA 3.0
null
2008-08-13T20:47:12.760
2015-04-17T15:43:23.437
2015-04-17T15:43:23.437
1,078
1,078
null
10,364
2
null
10,300
0
null
I'm just learning the MVC framework too so I'm not sure how off this is, but from what I understand you would have a form on a View such as Edit.aspx. This form would then post to the controller to another action method such as Update() passing in the contents of the form that you set in Edit.aspx as parameters. ``` ...
null
CC BY-SA 2.5
null
2008-08-13T20:58:00.540
2008-08-13T21:08:53.233
2008-08-13T21:08:53.233
1,122
1,122
null
10,382
2
null
10,260
0
null
The split design/code view is pretty cool. It's not perfect yet, but it's pretty cool. Also editing in the design view now edits your css there and then.
null
CC BY-SA 2.5
null
2008-08-13T21:15:14.810
2008-08-13T21:15:14.810
null
null
1,122
null
10,379
2
null
10,260
1
null
> Master Pages(of course, these are in there from version 2.0) master pages are new in 3.5. I haven't used them yet, but I can only imagine they could turn into a hidious nightmare if not used very carefully. You only have to [look at the order in which the events are fired](http://msdn.microsoft.com/en-us/librar...
null
CC BY-SA 2.5
null
2008-08-13T21:12:48.153
2008-08-13T21:12:48.153
null
null
1,122
null
10,388
2
null
10,349
1
null
There would also be the need to implement synchronization within update functions that are sensitive to being called simultaneously. Doing this for UI elements would be costly at both application and OS levels, and completely redundant for the vast majority of code. Some APIs provide a way to change the current threa...
null
CC BY-SA 2.5
null
2008-08-13T21:26:44.617
2008-08-13T21:26:44.617
null
null
1,043
null
10,366
1
11,197
null
15
44,647
I have an absolutely positioned `div` that I want to show when the user clicks a link. The `onclick` of the link calls a js function that sets the display of the div to block (also tried: "", `inline`, `table-cell`, `inline-table`, etc). This works great in IE7, not at all in every other browser I've tried (FF2, FF3, O...
Style display not working in Firefox, Opera, Safari - (IE7 is OK)
CC BY-SA 4.0
0
2008-08-13T20:59:54.360
2020-02-26T14:00:46.887
2020-02-26T13:59:56.140
11,393,381
521
[ "javascript", "html", "css" ]
10,383
2
null
6,007
99
null
Within the definition of the appender, I believe you can do something like this: ``` <appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender"> <filter type="log4net.Filter.LevelRangeFilter"> <param name="LevelMin" value="INFO"/> <param name="LevelMax" value="INFO"/> </filter> ...
null
CC BY-SA 3.0
null
2008-08-13T21:18:38.423
2013-10-01T13:29:53.897
2013-10-01T13:29:53.897
463,828
423
null
10,405
2
null
10,260
1
null
> I don't think the MVC Framework is quite ready for prime time yet Just an FYI, this site is built in MVC. I also have 2 apps in production on mvc, I would argue that its definitely ready for prime time.
null
CC BY-SA 2.5
null
2008-08-13T21:51:47.857
2008-08-13T21:51:47.857
null
null
1,220
null
10,385
2
null
10,313
0
null
I could be wrong about this, but I think that neither Nick's robocopy solution or Nathan's copy command solution will work. Robocopy seems to want a mapped drive, which I can't do because it's not running on port 80 or 443, and Windows can't handle a path that includes the port in a UNC-style name: ``` copy src \\dest...
null
CC BY-SA 2.5
null
2008-08-13T21:23:10.583
2008-08-13T21:23:10.583
null
null
1,245
null
10,378
2
null
10,366
7
null
Can you provide some markup that reproduce the error? Your situation must have something to do with your code since I can get this to work on IE, FF3 and Opera 9.5: ``` function show() { var d = document.getElementById('testdiv'); d.style.display = 'block'; } ``` ``` #testdiv { position: absolute; height...
null
CC BY-SA 4.0
null
2008-08-13T21:10:41.933
2020-02-26T14:00:46.887
2020-02-26T14:00:46.887
11,393,381
31,505
null
10,369
2
null
10,274
30
null
@Eric, I'm going to have to agree with Dean. Threads are expensive. You can't assume that your program is the only one running. When everyone is greedy with resources, the problem multiplies. > I prefer to create my threads manually and control them myself. It keeps the code very easy to understand. That's fine wh...
null
CC BY-SA 3.0
null
2008-08-13T21:05:26.250
2013-10-25T18:53:38.267
2013-10-25T18:53:38.267
12,597
872
null
10,412
1
10,423
null
74
81,847
I have a project where I would like to generate a report export in MS Word format. The report will include images/graphs, tables, and text. What is the best way to do this? Third party tools? What are your experiences?
How can a Word document be created in C#?
CC BY-SA 2.5
0
2008-08-13T22:07:45.173
2019-11-09T21:21:22.333
2010-02-03T20:32:33.627
63,550
354
[ "c#", ".net", "ms-word", "openxml" ]
10,416
2
null
2,898
0
null
TextMate is a great editor, and there is a way to replicate some of the functionality in GEdit. Check the article out here: [http://rubymm.blogspot.com/2007/08/make-gedit-behave-roughly-like-textmate.html](http://rubymm.blogspot.com/2007/08/make-gedit-behave-roughly-like-textmate.html) to modify GEdit to behave like Te...
null
CC BY-SA 2.5
null
2008-08-13T22:12:06.443
2008-08-13T22:12:06.443
null
null
1,238
null
10,424
2
null
10,412
1
null
@Dale Ragan: That will work for the Office 2003 XML format, but that's not portable (as, say, .doc or .docx files would be). To read/write those, you'll need to use the Word Object Library ActiveX control: [http://www.codeproject.com/KB/aspnet/wordapplication.aspx](http://www.codeproject.com/KB/aspnet/wordapplication...
null
CC BY-SA 2.5
null
2008-08-13T22:21:07.313
2008-08-13T22:21:07.313
null
null
1,975,282
null
10,428
2
null
265
1
null
We follow the practice of using a vendor directory which contains all vendor specific headers and binaries. The goal is that anybody should be able to build the product just by checking it out and running some top level build script.
null
CC BY-SA 2.5
null
2008-08-13T22:25:16.183
2008-08-13T22:25:16.183
null
null
361
null
10,410
2
null
10,274
-1
null
@Eric > @Derek, I don't exactly agree with the scenario you use as an example. If you don't know exactly what's running on your machine and exactly how many total threads, handles, CPU time, RAM, etc, that your app will use under a certain amount of load, you are in trouble. Are you the only target customer for the p...
null
CC BY-SA 2.5
null
2008-08-13T22:05:27.050
2008-08-13T22:21:10.683
2008-08-13T22:21:10.683
872
872
null
10,438
2
null
10,412
1
null
@Danny Smurf: Actually this article describes what will become the Office Open XML format which Rob answered with. I will pay more attention to the links I post for now on to make sure there not obsolete. I actually did a search on WordML, which is what it was called at the time. I believe that the Office Open XML ...
null
CC BY-SA 2.5
null
2008-08-13T22:34:09.410
2008-08-13T22:34:09.410
null
null
1,117
null
10,413
2
null
10,274
2
null
> I'm not speaking as someone with only theoretical knowledge here. I write and maintain high volume applications that make heavy use of multithreading, and I generally don't find the thread pool to be the correct answer. Ah, argument from authority - but always be on the look out for people who might be on ...
null
CC BY-SA 2.5
null
2008-08-13T22:08:27.857
2008-08-13T22:08:27.857
null
null
987
null
10,435
1
267,243
null
7
14,332
I have a website that works correctly under IIS 6.0: It authenticates users with windows credentials, and then when talking to the service that hits the DB, it passes the credentials. In IIS 7.0, the same config settings do not pass the credentials, and the DB gets hit with NT AUTHORITY\ANONYMOUS. Is there something ...
Impersonation in IIS 7.0
CC BY-SA 2.5
0
2008-08-13T22:31:17.153
2014-02-12T20:49:14.033
2008-11-06T00:14:11.363
24,975
781
[ "configuration", "iis-7", "impersonation" ]
10,437
2
null
833
1
null
Another option is to test that the values in the record that you are changing are the still the same as they were when you started: ``` SELECT customer_nm, customer_nm AS customer_nm_orig FROM demo_customer WHERE customer_id = @p_customer_id ``` (display the customer_nm field and the user changes it) ``` ...
null
CC BY-SA 3.0
null
2008-08-13T22:32:37.230
2018-02-08T10:56:35.850
2018-02-08T10:56:35.850
4,393,935
993
null
10,443
1
null
null
9
3,273
I have this program, we'll call it Host. Host does all kinds of good stuff, but it needs to be able to accept input through the command line . This means it has to somehow send its other process data and then quit. For example, I need to be able to do this: ``` ./Host --blahblah 3 6 3 5 ``` This should somehow end u...
Send messages to program through command line
CC BY-SA 2.5
0
2008-08-13T22:40:57.603
2010-08-11T17:32:45.453
2010-08-11T16:58:25.837
56,338
432
[ "c", "architecture", "command-line", "io" ]
10,444
2
null
10,435
0
null
Interesting... I have the opposite problem - to get the authentication to be passed from the client browser, through the webserver and onto the database within a large corporate network over firewalls. I also feel that "end to end user" authentication to the database is a bad idea and a potential security risk. Ther...
null
CC BY-SA 2.5
null
2008-08-13T22:41:29.613
2008-08-21T09:00:00.703
2008-08-21T09:00:00.703
993
993
null
10,445
2
null
10,443
-2
null
So, I may be missing the point here, but by deafult a C program's main function takes two arguments; argc, a count of the number of arguments (at least one), and argv (or arg vector), the argument list. You could just parse through the arguments and call the correct method. For example: ``` int main(int argc, *argv[]...
null
CC BY-SA 2.5
null
2008-08-13T22:43:34.367
2008-08-13T22:52:18.530
2008-08-13T22:52:18.530
1,053
1,053
null
10,423
2
null
10,412
49
null
The answer is going to depend slightly upon if the application is running on a server or if it is running on the client machine. If you are running on a server then you are going to want to use one of the XML based office generation formats as there are know issues when [using Office Automation on a server](http://supp...
null
CC BY-SA 2.5
null
2008-08-13T22:19:48.597
2009-08-25T05:23:37.597
2009-08-25T05:23:37.597
1,185
1,185
null
10,448
2
null
9,240
0
null
I'm going to continue my habit of going against the grain and say that you should question why you are building all these horribly complex object layers. I think many developers think of the database as a simple persistence layer for their objects, and are only concerned with the CRUD operations that those objects nee...
null
CC BY-SA 2.5
null
2008-08-13T22:45:03.680
2008-08-13T22:45:03.680
null
null
1,219
null
10,451
2
null
10,443
6
null
If it needs to be cross-platform, you might want to consider making the running instance listen on a TCP port, and have the instance you fire up from the command-line send a message to that port.
null
CC BY-SA 2.5
null
2008-08-13T22:51:30.453
2008-08-13T22:51:30.453
null
null
414
null
10,458
1
null
null
59
43,566
Ideally, I'm looking for a templated logical Set class. It would have all of the standard set operations such as Union, Intersection, Etc., and collapse duplicated items. I ended up creating my own set class based on the C# Dictionary<>- just using the Keys.
Is there a "Set" data structure in .Net?
CC BY-SA 2.5
0
2008-08-13T23:03:42.253
2018-05-10T01:51:59.153
2008-08-25T12:57:42.380
2,134
null
[ "c#", "data-structures", "set" ]
10,461
2
null
10,308
2
null
prior to SVN 1.5 (which has been out all of a month or so), it didn't track merges at all, so the bits where branches 'reconnect' to the trunk are impossible for it to do anyway
null
CC BY-SA 2.5
null
2008-08-13T23:08:59.777
2008-08-13T23:08:59.777
null
null
234
null
10,346
2
null
10,243
5
null
I've found what looks to be a very good solution here: [Unit Interactive -> Labs -> Unit PNG Fix](http://web.archive.org/web/20170521133429/http://labs.unitinteractive.com:80/unitpngfix.php) Unit PNG is also featured on a [list of PNG fix options on NETTUTS](http://nettuts.com/videos/screencasts/5-easy-ways-to-tackle-...
null
CC BY-SA 4.0
null
2008-08-13T20:39:54.803
2020-06-26T12:54:01.853
2020-06-26T12:54:01.853
6,262,124
326
null
10,439
2
null
10,349
25
null
> I think this is a brilliant question - and I think there is need of a better answer.Surely the only reason is that there is something in a framework somewhere that isn't very thread-safe. That "something" is almost every single instance member on every single control in System.Windows.Forms. The MSDN docum...
null
CC BY-SA 2.5
null
2008-08-13T22:34:57.083
2008-08-13T23:03:07.980
2008-08-13T23:03:07.980
1,254
1,254
null
10,450
2
null
10,443
10
null
If you were on Windows, I'd tell you to use a hidden window to receive the messages, but since you used `./`, I assume you want something Unix-based. In that case, I'd go with a [named pipe](http://en.wikipedia.org/wiki/Named_pipe). Sun has a [tutorial](http://developers.sun.com/solaris/articles/named_pipes.html) abo...
null
CC BY-SA 2.5
null
2008-08-13T22:49:13.653
2008-08-13T22:53:16.783
2008-08-13T22:53:16.783
872
872
null
10,460
2
null
10,458
10
null
No, there is not one natively in the framework. There is an open source implementation that most projects use, (i.e. nHibernate) called Iesi.Collections. Here's a CodeProject article about it: [http://www.codeproject.com/KB/recipes/sets.aspx](http://www.codeproject.com/KB/recipes/sets.aspx)
null
CC BY-SA 2.5
null
2008-08-13T23:08:53.973
2008-08-13T23:12:22.733
2008-08-13T23:12:22.733
1,117
1,117
null
10,459
2
null
10,458
50
null
[HashSet<T>](http://msdn.microsoft.com/en-us/library/bb359438.aspx) is about the closest you'll get, I think.
null
CC BY-SA 3.0
null
2008-08-13T23:05:20.457
2018-03-11T01:15:49.350
2018-03-11T01:15:49.350
14,357
615
null
10,465
2
null
10,456
0
null
Definitely feels like a hack, but having done some research on this a long time ago and not finding any other solutions, probably your best bet. Better yet would be designing your application so it doesn't require many annoying page reloads.. for example, if you're refreshing an iframe to check for updates on the serv...
null
CC BY-SA 2.5
null
2008-08-13T23:13:02.750
2008-08-13T23:13:02.750
null
null
72
null
10,463
2
null
10,456
12
null
I've noticed that if you use WebBrowser.Document.Write rather than WebBrowser.DocumentText then the click sound doesn't happen. So instead of this: ``` webBrowser1.DocumentText = "<h1>Hello, world!</h1>"; ``` try this: ``` webBrowser1.Document.OpenNew(true); webBrowser1.Document.Write("<h1>Hello, world!</h1>"); ``...
null
CC BY-SA 2.5
null
2008-08-13T23:10:16.810
2008-08-13T23:10:16.810
null
null
615
null
10,462
2
null
10,349
7
null
Although it sounds reasonable Johns answer isn't correct. In fact even when using Invoke you're still not safe not running into dead-lock situations. When dealing with events fired on a background thread using Invoke might even lead to this problem. The real reason has more to do with race conditions and lays back i...
null
CC BY-SA 2.5
null
2008-08-13T23:09:03.443
2008-08-13T23:09:03.443
null
null
1,253
null
10,473
2
null
10,260
1
null
@IainMH Nested Master Pages were always supported by ASP.NET, just not by the designer.
null
CC BY-SA 2.5
null
2008-08-13T23:25:05.890
2008-08-13T23:25:05.890
null
null
571
null
10,464
2
null
10,243
0
null
> I might be mistaken, but I'm pretty sure IE6 and less just don't do transparency with PNG files. You sort of are, and you sort of aren't. IE6 has no support natively for them. However, IE has support for crazy custom javascript/css and COM objects (which is how they originally implemented XmlHttpRequest) All of t...
null
CC BY-SA 2.5
null
2008-08-13T23:11:57.807
2008-08-13T23:11:57.807
null
null
234
null
10,475
1
10,479
null
26
8,025
Since the keyboard is interface we use to the computer, I've always thought touch typing should be something I should learn, but I've always been, well, lazy is the word. So, anyone recommend any good touch typing software? It's easy enough to google, but I'ld like to hear recommendations.
Touch Typing Software recommendations
CC BY-SA 2.5
0
2008-08-13T23:29:38.707
2012-04-01T10:03:18.760
2008-09-11T02:13:53.970
-1
841
[ "editor", "touch-typing" ]
10,467
2
null
10,300
12
null
Here's an overview of the flow in MVC: 1. /new - render your "New" view containing a form for the user to fill out User fills out form and it is posted to /create The post is routed to the Create action on your controller In your action method, update the model with the data that was posted. Your Model should validat...
null
CC BY-SA 2.5
null
2008-08-13T23:15:32.277
2008-08-13T23:18:56.480
2008-08-13T23:18:56.480
571
571
null
10,472
2
null
10,412
4
null
Schmidty, if you want to generate Word documents on a web server you will need a licence for each (not just the web server). See this section in the first [link](http://support.microsoft.com/kb/257757) Rob posted: "Besides the technical problems, you must also consider licensing issues. Current licensing guidelines ...
null
CC BY-SA 2.5
null
2008-08-13T23:21:17.520
2008-08-13T23:21:17.520
null
null
133
null
10,477
1
10,538
null
9
4,762
Currently, I'm attempting to make multiple beziers have equidistant points. I'm currently using cubic interpolation to find the points, but because the way beziers work some areas are more dense than others and proving gross for texture mapping because of the variable distance.
Equidistant points across Bezier curves
CC BY-SA 2.5
0
2008-08-13T23:31:32.697
2016-01-15T18:23:31.907
null
null
1,256
[ "graphics", "interpolation", "bezier", "curve" ]
10,470
2
null
10,458
6
null
I don't think c# has anything built in, but I know there are a couple of implementations floating around on the net. There are also some good articles around on this sort of thing: [This is part 6](http://msdn.microsoft.com/en-us/library/ms379575(VS.80).aspx) of a series on efficiently representing data structure. Thi...
null
CC BY-SA 2.5
null
2008-08-13T23:17:00.557
2008-08-13T23:17:00.557
null
null
493
null
10,476
2
null
10,243
2
null
I've messed with trying to make a site with .pngs and it just isn't worth it. The site becomes slow, and you use hacks that don't work 100%. Here's a [good article on some options](http://24ways.org/2007/supersleight-transparent-png-in-ie6), but my advice is to find a way to make gifs work until you don't have to sup...
null
CC BY-SA 2.5
null
2008-08-13T23:31:12.307
2008-08-13T23:31:12.307
null
null
571
null
10,456
1
10,463
null
28
14,793
The 'click sound' in question is actually a system wide preference, so I only want it to be disabled when my application has focus and then re-enable when the application closes/loses focus. Originally, I wanted to ask this question here on stackoverflow, but I was not yet in the beta. So, after googling for the answe...
HowTo Disable WebBrowser 'Click Sound' in your app only
CC BY-SA 2.5
0
2008-08-13T23:01:01.477
2016-02-07T18:26:47.090
2008-09-26T20:05:37.943
2,134
1,147
[ "c#", ".net", "winforms" ]
10,483
2
null
10,475
2
null
If you want to learn by getting thrown in the deep end... [DasKeyboard ultimate](http://www.daskeyboard.com/) will have you touch typing in no time :)
null
CC BY-SA 2.5
null
2008-08-13T23:33:53.800
2008-08-13T23:33:53.800
null
null
493
null
10,479
2
null
10,475
28
null
[Typing of the Dead!](http://en.wikipedia.org/wiki/Typing_of_the_Dead) It's a good few years old so you may have to hunt around, but it's a lot of fun and as well as the main game there are numerous minigames to practice specific areas you may be weak on. ![alt text](https://i.stack.imgur.com/wM9Cv.jpg)
null
CC BY-SA 3.0
null
2008-08-13T23:32:27.560
2012-04-01T10:03:18.760
2012-04-01T10:03:18.760
1,219,121
1,043
null
10,485
2
null
10,366
1
null
Try setting the height and width of the div, and make sure it is on top by setting its z-index higher than everything else. If the absolutely positioned div is inside an element that is relatively positioned, it's top and left location is based off the top and left of the relatively positioned element. Try putting yo...
null
CC BY-SA 2.5
null
2008-08-13T23:36:09.770
2008-08-13T23:36:09.770
null
null
571
null
10,492
2
null
10,486
4
null
If we're talking strictly unit tests, I'd aim more for completeness than speed. If the run time starts to cause friction, separate the test into different project/classes etc., and only run the tests related to what you're working on. Let the Integration server run all the tests on checkin.
null
CC BY-SA 2.5
null
2008-08-13T23:44:35.290
2008-08-13T23:44:35.290
null
null
571
null
10,487
2
null
10,475
7
null
Mavis Beacon. Although not nearly as fun as Typing of the Dead!
null
CC BY-SA 2.5
null
2008-08-13T23:37:53.620
2008-08-13T23:37:53.620
null
null
116
null
10,478
1
10,502
null
14
9,605
One of the things I'd like to do in my browser-based application is allow the user to select some text (not in a <textarea>, just plain ol' text!), and have my application pop up a small toolbar that then can interact with the next (in my case, add annotations). I've found a lot of stuff on google that seems to be foc...
Getting selected text in a browser, cross-platform
CC BY-SA 3.0
0
2008-08-13T23:32:09.370
2019-01-04T13:02:29.923
2014-04-04T08:47:38.313
321,731
722
[ "javascript", "browser" ]
10,499
1
29,807
null
60
232,188
Sometimes I get Oracle connection problems because I can't figure out which tnsnames.ora file my database client is using. What's the best way to figure this out? ++happy for various platform solutions.
Oracle - What TNS Names file am I using?
CC BY-SA 2.5
0
2008-08-13T23:49:15.623
2016-04-10T13:02:16.583
2008-08-30T09:07:24.703
116
116
[ "oracle", "connection", "tnsnames", "tns" ]
10,493
2
null
10,458
15
null
The best set implementation I have seen is part of the wonderful Wintellect's Power Collections: [http://www.codeplex.com/PowerCollections](http://www.codeplex.com/PowerCollections). The set implementation can be found here: [http://www.codeplex.com/PowerCollections/SourceControl/FileView.aspx?itemId=101886&changeSetI...
null
CC BY-SA 2.5
null
2008-08-13T23:44:59.063
2008-08-13T23:44:59.063
null
null
708
null
10,491
2
null
10,486
1
null
I tend to focus more on readability of my tests than speed. However, I still try to make them reasonably fast. I think if they run on the order of milliseconds, you are fine. If they run a second or more per test... then you might be doing something that should be optimized. Slow tests only become a problem as the ...
null
CC BY-SA 2.5
null
2008-08-13T23:44:34.743
2008-08-13T23:44:34.743
null
null
122
null
10,486
1
10,513
null
25
17,315
What kind of execution rate do you aim for with your unit tests (# test per second)? How long is too long for an individual unit test? I'd be interested in knowing if people have any specific thresholds for determining whether their tests are too slow, or is it just when the friction of a long running test suite gets...
Unit test execution speed (how many tests per second?)
CC BY-SA 2.5
0
2008-08-13T23:36:28.130
2020-03-16T10:49:23.993
2009-01-09T01:32:09.240
906
906
[ "unit-testing", "performance" ]
10,484
2
null
10,229
6
null
Option 3 is the best: Use Async IO. Unless your request processing is complex and heavy, your program is going to spend 99% of it's time waiting for the HTTP requests. This is exactly what Async IO is designed for - Let the windows networking stack (or .net framework or whatever) worry about all the waiting, and jus...
null
CC BY-SA 3.0
null
2008-08-13T23:35:50.270
2014-01-10T16:30:51.670
2014-01-10T16:30:51.670
2,824,961
234
null
10,496
2
null
10,486
1
null
We're currently at 270 tests in around 3.something seconds. There are probably around 8 tests that perform file IO. These are run automatically upon a successful build of our libraries on every engineers machine. We have more extensive (and time consuming) smoke-testing that is done by the build machine every night, o...
null
CC BY-SA 2.5
null
2008-08-13T23:48:17.450
2008-08-13T23:48:17.450
null
null
1,043
null
10,502
2
null
10,478
8
null
Have a look at [jQuery](http://jquery.com) and the [wrapSelection plugin](http://plugins.jquery.com/project/wrapSelection). It may be what you are looking for.
null
CC BY-SA 2.5
null
2008-08-13T23:52:35.400
2008-08-13T23:52:35.400
null
null
312
null
10,503
2
null
10,486
0
null
I judge my unit tests on a per test basis, not by by # of tests per second. The rate I aim for is 500ms or less. If it is above that, I will look into the test to find out why it is taking so long. When I think a test is to slow, it usually means that it is doing too much. Therefore, just refactoring the test by sp...
null
CC BY-SA 2.5
null
2008-08-13T23:54:16.037
2008-08-13T23:54:16.037
null
null
1,117
null