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
7,045
2
null
7,015
3
null
This will eliminate bottlenecks of having a single thread do the reading: ``` open file for each thread n=0,1,2,3: seek to file offset 1/n*filesize scan to next complete line process all lines in your part of the file ```
null
CC BY-SA 2.5
null
2008-08-10T04:41:43.367
2008-08-10T04:41:43.367
null
null
116
null
7,044
2
null
6,915
1
null
While this question has already been answered, I think there are some other points to mention: - - But as already stated, you can't guarantee threadsafe lazy-initialisation without using at least one synchronisation primitive. Edit: Yup Derek, you're right. My bad. :)
null
CC BY-SA 2.5
null
2008-08-10T04:34:59.793
2008-08-10T05:18:14.963
2008-08-10T05:18:14.963
611
611
null
7,052
2
null
6,915
1
null
> You could use Matt's solution, but you'd need to use a proper mutex/critical section for locking, and by checking "pObj == NULL" both before and after the lock. Of course, pObj would also have to be static ;) . A mutex would be unnecessarily heavy in this case, you'd be better going with a critical section. OJ, that...
null
CC BY-SA 2.5
null
2008-08-10T05:11:03.247
2008-08-10T05:27:50.123
2008-08-10T05:27:50.123
872
872
null
7,056
2
null
7,015
9
null
Mark's answer is the simpler, more elegant solution. Why build a complex program with inter-thread communication if it's not necessary? Spawn 4 threads. Each thread calculates size-of-file/4 to determine it's start point (and stop point). Each thread can then work entirely independently. The reason to add a speci...
null
CC BY-SA 2.5
null
2008-08-10T05:21:43.567
2008-08-10T05:21:43.567
null
null
872
null
7,068
2
null
7,035
164
null
I believe [Zenity](http://live.gnome.org/Zenity) will do what you want. It's specifically designed for displaying GTK dialogs from the command line, and it's available as an [Ubuntu package](http://packages.ubuntu.com/hardy/zenity).
null
CC BY-SA 2.5
null
2008-08-10T06:40:47.603
2008-08-10T06:40:47.603
null
null
872
null
6,933
2
null
6,578
8
null
If you're writing code for the desktop and you can target Mac OS X 10.5, you should at least look into using Objective-C garbage collection. It really will simplify most of your development — that's why Apple put all the effort into creating it in the first place, and making it perform well. As for the memory managem...
null
CC BY-SA 2.5
null
2008-08-09T22:27:12.860
2008-08-09T22:27:12.860
null
null
714
null
7,070
2
null
4,458
5
null
The architects of the DSL Tools team wrote a book, [Domain-Specific Development with Visual Studio DSL Tools.](https://rads.stackoverflow.com/amzn/click/com/0321398203) The book's [website](http://www.domainspecificdevelopment.com/) has some other links and resources.
null
CC BY-SA 3.0
null
2008-08-10T06:59:42.607
2011-08-15T21:11:40.007
2011-08-15T21:11:40.007
95
878
null
7,073
2
null
502
5
null
Is the PC likely to have Acrobat installed? I think Acrobat installs a shell extension so previews of the first page of a PDF document appear in Windows Explorer's thumbnail view. You can get thumbnails yourself via the IExtractImage COM API, which you'll need to wrap. [VBAccelerator has an example in C#](http://www.vb...
null
CC BY-SA 2.5
null
2008-08-10T07:10:19.153
2008-08-10T07:10:19.153
null
null
878
null
7,074
1
7,077
null
7,428
1,276,845
What are the differences between these two and which one should I use? ``` string s = "Hello world!"; String s = "Hello world!"; ```
What is the difference between String and string in C#?
CC BY-SA 4.0
0
2008-08-10T07:18:02.320
2023-01-25T16:49:45.133
2022-09-12T10:35:50.427
5,152,146
571
[ "c#", ".net", "string", "types", "alias" ]
7,076
2
null
2,092
10
null
Does your scripting language generate bytecode? Does it generate debug metadata? If so, bytecode instrumentation is probably the way to go. In fact existing tools will probably work (perhaps with minimal modification). The typical problem with such tools that they are written to work with Java and assume that a `class...
null
CC BY-SA 4.0
null
2008-08-10T07:19:47.650
2019-05-26T05:06:06.703
2019-05-26T05:06:06.703
1,722,709
878
null
7,039
2
null
6,926
31
null
Development of shaders in XNA (which obviously uses DirectX) requires knowledge of [HLSL](http://msdn.microsoft.com/en-us/library/bb509561(VS.85).aspx) or shader assembly. I'd recommend getting familiar with the former before diving into the latter. Before writing any shaders, it's a good idea to get solid understandi...
null
CC BY-SA 2.5
null
2008-08-10T04:21:32.333
2008-08-10T04:21:32.333
null
null
611
null
7,078
2
null
4,458
3
null
If you are interested in DSLs, [Jeff Moser](http://www.moserware.com/) has written some great articles about them (and the 'meta' frame of mind you need) [here,](http://www.moserware.com/2008/04/towards-moores-law-software-part-3-of-3.html) [here,](http://www.moserware.com/2008/06/ometa-who-what-when-where-why.html) an...
null
CC BY-SA 2.5
null
2008-08-10T07:25:13.787
2008-08-10T07:25:13.787
null
null
92
null
7,079
2
null
7,074
309
null
`System.String` is the .NET string class - in C# `string` is an alias for `System.String` - so in use they are the same. As for guidelines I wouldn't get too bogged down and just use whichever you feel like - there are more important things in life and the code is going to be the same anyway. If you find yourselves b...
null
CC BY-SA 3.0
null
2008-08-10T07:26:14.783
2018-02-06T12:39:09.710
2018-02-06T12:39:09.710
7,031,374
193
null
7,081
2
null
7,074
193
null
Lower case `string` is an alias for `System.String`. They are the same in `C#`. There's a debate over whether you should use the System types (`System.Int32`, `System.String`, etc.) types or the `C# aliases` (`int`, `string`, etc). I personally believe you should use the `C# aliases`, but that's just my personal prefe...
null
CC BY-SA 3.0
null
2008-08-10T07:27:55.060
2017-08-14T04:33:23.827
2017-08-14T04:33:23.827
6,798,816
373
null
7,083
2
null
4,242
15
null
One other way to do it is to use: ``` String.valueOf(myInt); ``` This method is overloaded for every primitive type and `Object`. This way you don't even have to think about the type you're using. Implementations of the method will call the appropriate method of the given type for you, e.g. `Integer.toString(myInt)`...
null
CC BY-SA 2.5
null
2008-08-10T07:32:41.587
2008-08-10T07:32:41.587
null
null
883
null
7,080
2
null
3,136
6
null
Following up on [svrist's answer,](https://stackoverflow.com/questions/3136/help-with-cronjobs#3145) depending on your shell, the 2>&1 should go > /dev/null or you will still see the output from stderr. The following will silence both stdout and stderr: ``` 59 23 * * * /usr/sbin/myscript > /dev/null 2>&1 ``` The f...
null
CC BY-SA 2.5
null
2008-08-10T07:27:38.167
2008-08-10T07:27:38.167
2017-05-23T12:09:35.997
-1
878
null
7,088
2
null
6,151
0
null
As per Coincoin's answer, this feature is also great for setting the default editor for ASPX. If you want to go to the Code Editor most often, then this is a default you'd want to change.
null
CC BY-SA 2.5
null
2008-08-10T08:02:59.530
2008-08-10T08:02:59.530
null
null
697
null
7,087
2
null
7,031
20
null
Regarding security, : - - This means hiding the buttons is good User Interface design (because you can't use them if you are not logged in). But it's not a security feature. The security feature is checking, on the server, that the visitor is logged in before each action that requires it. If you don't intend to sho...
null
CC BY-SA 2.5
null
2008-08-10T07:59:22.890
2008-08-10T07:59:22.890
null
null
341
null
7,077
2
null
7,074
6,967
null
[string](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/string) is an alias in C# for [System.String](https://learn.microsoft.com/en-us/dotnet/api/system.string). So technically, there is no difference. It's like [int vs. System.Int32](https://stackoverflow.com/questions/62503/c-int-or-int...
null
CC BY-SA 4.0
null
2008-08-10T07:22:02.030
2022-08-08T12:53:40.333
2022-08-08T12:53:40.333
102,937
872
null
7,089
1
7,098
null
257
72,790
How can I create rounded corners using CSS?
Creating rounded corners using CSS
CC BY-SA 3.0
0
2008-08-10T08:08:21.657
2020-06-26T07:53:00.127
2015-05-18T17:05:46.450
1,497,596
889
[ "cross-browser", "rounded-corners", "css" ]
7,085
2
null
1,669
61
null
I think [Modern Compiler Implementation in ML](https://rads.stackoverflow.com/amzn/click/com/0521607647) is the best introductory compiler writing text. There's a [Java version](https://rads.stackoverflow.com/amzn/click/com/052182060X) and a [C version](https://rads.stackoverflow.com/amzn/click/com/0521607655) too, eit...
null
CC BY-SA 4.0
null
2008-08-10T07:54:32.790
2019-12-04T14:42:49.830
2019-12-04T14:42:49.830
1,163,786
878
null
7,084
1
13,858
null
22
2,443
I've worked on a number of different embedded systems. They have all used `typedef`s (or `#defines`) for types such as `UINT32`. This is a good technique as it drives home the size of the type to the programmer and makes you more conscious of chances for overflow etc. But on some systems you know that the compiler a...
When should I use type abstraction in embedded systems
CC BY-SA 3.0
0
2008-08-10T07:50:54.250
2017-12-22T10:23:55.313
2017-12-22T10:23:55.313
3,804,420
888
[ "c", "embedded" ]
7,091
2
null
7,084
1
null
Consistency, convenience and readability. "UINT32" is much more readable and writeable than "unsigned long long", which is the equivalent for some systems. Also, the compiler and processor may be fixed for the life of a project, but the code from that project may find new life in another project. In this case, having ...
null
CC BY-SA 2.5
null
2008-08-10T08:11:40.730
2008-08-10T08:11:40.730
null
null
891
null
7,095
1
7,105
null
265
68,098
In other words, is this Singleton implementation thread safe: ``` public class Singleton { private static Singleton instance; private Singleton() { } static Singleton() { instance = new Singleton(); } public static Singleton Instance { get { return instance; } } } ```...
Is the C# static constructor thread safe?
CC BY-SA 2.5
0
2008-08-10T08:23:55.573
2022-05-20T17:24:06.827
null
null
373
[ "c#", "multithreading", "singleton" ]
7,090
2
null
502
44
null
ImageMagick delegates the PDF->bitmap conversion to GhostScript anyway, so here's a command you can use (it's based on the actual command listed by the `ps:alpha` delegate in ImageMagick, just adjusted to use JPEG as output): ``` gs -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT \ -dMaxBitmap=500000000 -dLast...
null
CC BY-SA 2.5
null
2008-08-10T08:08:33.543
2008-08-10T08:11:37.080
2008-08-10T08:11:37.080
13
13
null
7,097
2
null
6,847
0
null
I'll take a different definition of defensive programming, as the one that's advocated by [Effective Java](http://java.sun.com/docs/books/effective/) by Josh Bloch. In the book, he talks about how to handle mutable objects that callers pass to your code (e.g., in setters), and mutable objects that you pass to callers (...
null
CC BY-SA 2.5
null
2008-08-10T08:26:46.703
2008-08-10T08:26:46.703
null
null
13
null
7,092
2
null
6,847
0
null
It depends. If I am genuinely hacking something up for my own use then I will write the best code that I don't have to think about. Let the compiler be my friend for warnings etc. but I won't automatically create types for the hell of it. The more likely the code is to be used, even occasionally, I ramp up the level...
null
CC BY-SA 2.5
null
2008-08-10T08:13:50.303
2008-08-10T08:13:50.303
null
null
888
null
7,101
2
null
6,890
16
null
How much order do you need to impose on the threads? If you just need all of the work started in the loop to finish before the code continues, but you don't care about the order the work within the loop finishes, then calling Join is the answer. To add more detail to [Kevin Kenny's answer,](https://stackoverflow.com/qu...
null
CC BY-SA 2.5
null
2008-08-10T08:37:28.383
2008-08-10T08:37:28.383
2017-05-23T12:25:36.213
-1
878
null
7,098
2
null
7,089
105
null
Since CSS3 was introduced, the best way to add rounded corners using CSS is by using the `border-radius` property. You can [read the spec](http://www.w3.org/TR/css3-background/#the-border-radius) on the property, or get some [useful implementation information on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/bor...
null
CC BY-SA 3.0
null
2008-08-10T08:27:50.540
2014-02-04T19:50:54.193
2014-02-04T19:50:54.193
51
51
null
7,104
2
null
7,095
3
null
The [Common Language Infrastructure specification](http://www.ecma-international.org/publications/standards/Ecma-335.htm) guarantees that "a type initializer shall run exactly once for any given type, unless explicitly called by user code." (Section 9.5.3.1.) So unless you have some whacky IL on the loose calling Singl...
null
CC BY-SA 2.5
null
2008-08-10T08:45:57.977
2008-08-10T08:59:14.847
2017-05-23T11:47:09.250
-1
878
null
6,943
2
null
6,915
14
null
Unfortunately, Matt's answer features what's called which isn't supported by the C/C++ memory model. (It is supported by the Java 1.5 and later — and I think .NET — memory model.) This means that between the time when the `pObj == NULL` check takes place and when the lock (mutex) is acquired, `pObj` may have already...
null
CC BY-SA 2.5
null
2008-08-09T23:09:01.400
2008-08-20T16:41:35.143
2008-08-20T16:41:35.143
872
714
null
7,107
2
null
7,095
6
null
Static constructors are guaranteed to fire only once per App Domain so your approach should be OK. However, it is functionally no different from the more concise, inline version: ``` private static readonly Singleton instance = new Singleton(); ``` Thread safety is more of an issue when you are lazily initializing t...
null
CC BY-SA 2.5
null
2008-08-10T08:48:33.697
2008-08-10T08:48:33.697
null
null
608
null
7,112
2
null
7,089
13
null
I would recommend using background images. The other ways aren't nearly as good: No anti-aliasing and senseless markup. This is not the place to use JavaScript.
null
CC BY-SA 2.5
null
2008-08-10T08:51:29.167
2008-08-10T08:51:29.167
null
null
571
null
7,109
2
null
4,752
2
null
I suspect these are related to the SQL Server Agent trying to login to a database that no longer exists. To clear it up you need to: 1. Go to SQL Server Management Studio 2. Disable the job called `<database name>_job_deleteExpiredSessions` If that works, then you should be all clear to delete it.
null
CC BY-SA 3.0
null
2008-08-10T08:48:47.223
2018-04-10T19:37:29.113
2018-04-10T19:37:29.113
1,753,960
897
null
7,106
2
null
7,095
30
null
Using a static constructor actually threadsafe. The static constructor is guaranteed to be executed only once. [From the C# language specification](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/classes#static-constructors): > The static constructor for a class executes at...
null
CC BY-SA 4.0
null
2008-08-10T08:46:52.577
2020-01-28T00:18:49.803
2020-01-28T00:18:49.803
3,538,012
872
null
7,126
2
null
7,118
2
null
A post on the IE Blog, [Scripting Debugging in Internet Explorer](http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx), explains different options for script debugging in Internet Explorer. Here is the [Apple Developer FAQ](http://developer.apple.com/internet/safari/faq.html#anchor14) on debugging JavaScript in S...
null
CC BY-SA 3.0
null
2008-08-10T09:20:22.790
2012-07-17T05:23:49.767
2012-07-17T05:23:49.767
63,550
51
null
7,099
2
null
7,089
81
null
I looked at this early on in the creation of Stack Overflow and couldn't find method of creating rounded corners that didn't leave me feeling like I just walked through a sewer. [CSS3 does finally define](http://24ways.org/2006/rounded-corner-boxes-the-css3-way) the ``` border-radius: ``` Which is exactly how you...
null
CC BY-SA 2.5
null
2008-08-10T08:28:52.100
2008-08-10T08:28:52.100
null
null
1
null
7,117
2
null
7,084
8
null
The C99 standard has a number of standard sized-integer types. If you can use a compiler that supports C99 (gcc does), you'll find these in `<stdint.h>` and you can just use them in your projects. Also, it can be especially important in embedded projects to use types as a sort of "safety net" for things like unit con...
null
CC BY-SA 2.5
null
2008-08-10T09:03:24.057
2008-08-10T09:03:24.057
null
null
714
null
7,105
2
null
7,095
200
null
Static constructors are guaranteed to be run only once per application domain, before any instances of a class are created or any static members are accessed. [https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/static-constructors](https://learn.microsoft.com/en-us/dotnet/csharp/progr...
null
CC BY-SA 4.0
null
2008-08-10T08:46:48.413
2019-11-11T14:01:37.343
2019-11-11T14:01:37.343
7,556,646
891
null
7,118
1
7,129
null
18
7,058
Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and [Safari](http://en.wikipedia.org/wiki/Safari_%28web_browser%29). In Firefox, you can use [Firebug's](http://en.wikipedia.org/wiki/Firebug) [logging feature](http://getfirebug.com/logging.html) and [command Line functions](http...
Debugging JavaScript in Internet Explorer and Safari
CC BY-SA 3.0
0
2008-08-10T09:07:19.853
2020-06-26T15:40:26.407
2012-07-17T05:22:02.980
63,550
889
[ "javascript", "internet-explorer", "safari" ]
7,167
2
null
6,284
2
null
I am also having a number of problems with VS 2008. Who would guess that I don't ever need to select multiple controls on a web form... Anyway, a lot has been fixed in Service Pack 1, which is in Beta currently. Might be worth installing that. It has gone a little way to fixing absolute positioning. This isn't you...
null
CC BY-SA 2.5
null
2008-08-10T11:53:28.923
2008-08-10T11:53:28.923
null
null
274
null
7,128
2
null
7,118
1
null
Safari 3.0 and 3.1 include the [Drosera](http://trac.webkit.org/wiki/Drosera) JavaScript debugger, which you can enable on the Mac by following the instructions at that link. There's also the Safari [Web Inspector](http://trac.webkit.org/wiki/Web%20Inspector)..
null
CC BY-SA 2.5
null
2008-08-10T09:24:08.993
2008-08-10T09:24:08.993
null
null
714
null
7,162
2
null
6,847
0
null
I am very much of the opinion that correct programming will protect against these risks. Things like avoiding deprecated functions, which (in the Microsoft C++ libraries at least) are commonly deprecated because of security vulnerabilities, and validating everything that crosses an external boundary. Functions that ar...
null
CC BY-SA 2.5
null
2008-08-10T11:27:30.960
2008-08-10T11:27:30.960
null
null
891
null
7,173
1
null
null
8
2,812
I switched locally from subversion 1.4 to 1.5, our server still runs 1.4. Since then every merge takes ages to perform. What took only a couple of seconds is now in the area of 5-10 minutes (or more). There is no difference between the command line client and tortoise (so we talk about the windows versions). Has anybo...
Very slow merge with Subversion 1.5 (and 1.4 Server)
CC BY-SA 2.5
null
2008-08-10T12:11:24.443
2012-08-17T15:41:30.723
2009-09-25T14:04:38.430
917
917
[ "svn" ]
7,157
2
null
175
5
null
The player itself has a [Javascript API](http://code.google.com/apis/youtube/js_api_reference.html) that might be useful for syncing the video if you choose to make your own `annotation-thingamajig`.
null
CC BY-SA 3.0
null
2008-08-10T10:44:36.443
2015-12-29T06:26:35.433
2015-12-29T06:26:35.433
3,787,519
914
null
7,176
2
null
7,173
0
null
We've had problems when trying to add large numbers of files to repositories through the client which I assume created orphaned processes on the server when we killed the crashed client. We had to kill the server processes too and restart the subversion service (we run SVN as a windows service). Our SVN machine is dedi...
null
CC BY-SA 2.5
null
2008-08-10T12:17:17.487
2008-08-10T12:17:17.487
null
null
371
null
7,130
2
null
6,847
1
null
I'd recommend being defensive for data that enter a "component" or framework. Within a "component" or framework one should think that the data is "correct". Thinking like this. It is up to the caller to supply correct parameters otherwise ALL functions and methods have to check every incomming parameter. But if the ch...
null
CC BY-SA 2.5
null
2008-08-10T09:26:45.617
2008-08-10T09:26:45.617
null
null
842
null
7,151
2
null
5,628
1
null
The short answer is: No. In ASP.NET MVC Preview 3 there's no first-class way for including an anchor in an action link. Unlike Rails' url_for :anchor, UrlHelper.GenerateUrl (and ActionLink, RedirectToAction and so on which use it) don't have a magic property name that lets you encode an anchor. As you point out, you c...
null
CC BY-SA 2.5
null
2008-08-10T10:22:59.670
2009-05-19T03:55:19.133
2009-05-19T03:55:19.133
878
878
null
7,168
2
null
6,557
14
null
You cannot cast between generic types with different type parameters. Specialized generic types don't form part of the same inheritance tree and so are unrelated types. To do this pre-NET 3.5: ``` List<string> sl = new List<string>(); // Add strings to sl List<object> ol = new List<object>(); foreach(string s in sl...
null
CC BY-SA 2.5
null
2008-08-10T11:54:37.673
2008-08-14T04:34:34.207
2008-08-14T04:34:34.207
891
891
null
7,129
2
null
7,118
13
null
For Safari you need to enable the "Develop" menu via Preferences (in Safari 3.1; see [the entry in Apple's Safari development FAQ](http://developer.apple.com/internet/safari/faq.html#anchor14)) or via ``` $ defaults write com.apple.Safari IncludeDebugMenu 1 ``` at the terminal in Mac OS X. Then from the Develop menu...
null
CC BY-SA 2.5
null
2008-08-10T09:24:56.197
2008-08-10T09:24:56.197
null
null
878
null
7,184
2
null
6,932
1
null
Do be aware that certain parts of ffmpeg are under GPL. I believe the libpostproc module is and if I recall correctly this is used in transcoding. Make sure this license is compatible with what you're doing.
null
CC BY-SA 2.5
null
2008-08-10T12:49:28.313
2008-08-10T12:49:28.313
null
null
748
null
7,180
1
7,188
null
6
1,006
What is a good way to perform animation using .NET? I would prefer not to use Flash if possible, so am looking for suggestions of ways which will work to implement different types of animation on a new site I am producing. The new site is for a magician, so I want to provide animated buttons (Cards turning over, etc....
Animation in .NET
CC BY-SA 2.5
null
2008-08-10T12:39:20.830
2010-02-03T20:49:42.390
2010-02-03T20:07:58.013
63,550
274
[ ".net", "animation" ]
7,182
2
null
7,180
0
null
JavaScript is probably the way to go if you want to avoid Flash. Check this: [http://www.webreference.com/programming/javascript/java_anim/](http://www.webreference.com/programming/javascript/java_anim/) It won't work for embedded video, though, so you're stuck with Flash for that (or Silverlight, or [QuickTime](http:...
null
CC BY-SA 2.5
null
2008-08-10T12:47:25.570
2010-02-03T20:49:42.390
2010-02-03T20:49:42.390
63,550
722
null
7,188
2
null
7,180
4
null
[Silverlight](http://silverlight.net/Default.aspx) springs to mind as an obvious choice if you want to do animation using .NET on the web. It may not cover all platforms but will work in IE and FireFox and on the Mac.
null
CC BY-SA 2.5
null
2008-08-10T13:01:37.680
2008-08-10T13:01:37.680
null
null
224
null
7,174
1
7,303
null
4
1,129
Recently I had to develop a SharePoint workflow, and I found the experience quite honestly the most painful programming task I've ever had to tackle. One big problem I had was the problems I encountered when I had to step through it in the debugger. There's an article on how to debug a SharePoint workflow [here](http:...
How can I improve the edit-compile-test loop when developing a SharePoint workflow?
CC BY-SA 2.5
0
2008-08-10T12:12:09.213
2009-01-07T21:39:48.193
2008-08-19T19:57:36.853
35
886
[ "sharepoint", "workflow" ]
7,189
2
null
1,041
10
null
[Qt](http://qt.nokia.com/) has also a nice [Regular Expression](http://en.wikipedia.org/wiki/Regular_expression) implementation [QRegExp](http://qt-project.org/doc/qt-4.8/qregexp.html). It is also platform independent.
null
CC BY-SA 3.0
null
2008-08-10T13:07:10.103
2013-04-04T12:34:20.897
2013-04-04T12:34:20.897
388,614
919
null
7,186
2
null
6,932
2
null
When you want to transcode to Flv (which is probably the best for the web) then I use this line: ``` ffmpeg -hq -y -i $directory/$file -r 20 -s 300x200 -deinterlace -ar 22050 $directory/$file.flv 1>/dev/null 2>/dev/null ``` It works very well, under linux of course :-).
null
CC BY-SA 2.5
null
2008-08-10T12:58:59.370
2008-08-10T12:58:59.370
null
null
919
null
7,190
1
7,221
null
10
8,371
What tools would you recommend for setting up CI for build and deployment of multiple websites built on DotNetNuke using SVN for source control? We are currently looking at configuring Cruise Control to work with NAnt, NUnit, NCover and Trac as a test case. What other combinations would worth investigating? We have ...
Setting up Continuous Integration with SVN
CC BY-SA 2.5
0
2008-08-10T13:09:13.780
2012-08-17T15:41:40.817
2011-06-27T06:27:08.127
5,772,384
371
[ "svn", "continuous-integration" ]
7,192
2
null
6,899
89
null
Note that [Matt's code](https://stackoverflow.com/questions/6899/how-to-create-a-sql-server-function-to-join-multiple-rows-from-a-subquery-into#6961) will result in an extra comma at the end of the string; using COALESCE (or ISNULL for that matter) as shown in the link in Lance's post uses a similar method but doesn't ...
null
CC BY-SA 3.0
null
2008-08-10T13:15:20.023
2015-08-03T18:56:34.197
2017-05-23T10:31:29.493
-1
205
null
7,195
2
null
6,817
0
null
Take a look at [Hoard](http://www.hoard.org/) if you are doing a lot of memory allocation. Roll your own [Lock Free List](http://www.boyet.com/Articles/LockfreeFreeList.html). A good resource is here - it's in C# but the ideas are portable. Once you get used to how they work you start seeing other places where they ca...
null
CC BY-SA 2.5
null
2008-08-10T13:45:43.970
2008-08-10T13:45:43.970
null
null
342
null
7,198
2
null
7,190
1
null
I would have a look at Team City [http://www.jetbrains.com/teamcity/index.html](http://www.jetbrains.com/teamcity/index.html) I know some people who are looking in to this and they say good things about it. My companies build process is done in FinalBuilder so I'm going to be looking at their server soon. CC is quite...
null
CC BY-SA 2.5
null
2008-08-10T14:01:31.460
2008-08-10T15:05:23.857
2008-08-10T15:05:23.857
922
922
null
7,202
2
null
7,180
2
null
Have a look at the [jQuery](http://jquery.com/) cross browser JavaScript library for animation (it is what is used on Stack Overflow). The reference for it can be found at [http://visualjquery.com/1.1.2.html](http://visualjquery.com/1.1.2.html). Unfortunately without Flash, Silverlight or another plug-in cross system ...
null
CC BY-SA 2.5
null
2008-08-10T14:28:08.550
2010-02-03T20:48:10.163
2010-02-03T20:48:10.163
63,550
33
null
7,194
2
null
6,899
1
null
If you're running SQL Server 2005, you can write a [custom CLR aggregate function](https://learn.microsoft.com/en-us/sql/relational-databases/clr-integration-database-objects-user-defined-functions/clr-user-defined-aggregates) to handle this. C# version: ``` using System; using System.Data; using System.Data.SqlClien...
null
CC BY-SA 3.0
null
2008-08-10T13:36:33.663
2018-04-30T09:12:18.560
2018-04-30T09:12:18.560
70,345
618
null
7,205
2
null
6,557
1
null
That's actually so that you don't try to put any odd "object" in your "ol" list variant (as `List<object>` would seem to allow) - because your code would crash then (because the list really is `List<string>` and will only accept String type objects). That's why you can't cast your variable to a more general specificati...
null
CC BY-SA 2.5
null
2008-08-10T14:35:48.940
2008-08-10T14:35:48.940
null
null
885
null
7,209
1
119,880
null
9
2,110
I'm trying to alpha blend sprites and backgrounds with [devkitPro](http://www.devkitpro.org/) (including libnds, libarm, etc). Does anyone know how to do this?
Alpha blending sprites in Nintendo DS Homebrew
CC BY-SA 2.5
0
2008-08-10T14:49:10.723
2011-09-19T07:27:45.883
2008-10-22T10:26:12.143
1,599
209
[ "c++", "c", "nintendo-ds" ]
7,206
2
null
7,118
0
null
There is now a [Firebug Lite](http://getfirebug.com/lite.html) that works on other browsers such as Internet Explorer, Safari and Opera built. It does have a limited set of commands and is not as fully featured as the version in Firefox. If you are using [ASP.NET](http://en.wikipedia.org/wiki/ASP.NET) in [Visual Studi...
null
CC BY-SA 3.0
null
2008-08-10T14:39:56.780
2012-07-17T05:26:28.517
2012-07-17T05:26:28.517
63,550
33
null
7,210
2
null
6,475
1
null
On many unixen, you can get sort to sort by a particular column, or field. So by sorting the file by the ID, and then by the date, you no longer need to keep the associative array of when you last saw each ID at all. All the context is there in the order of the file. On my Mac, which has GNU sort, it's: ``` sort -k ...
null
CC BY-SA 2.5
null
2008-08-10T14:51:02.187
2008-08-10T14:51:02.187
null
null
923
null
7,216
2
null
7,211
1
null
If it's just a few tables you could probably script this in your preferred scripting langauge and have it all done by the time it'd take to read all the replies or track down a suitable tool. I would any way. :)
null
CC BY-SA 2.5
null
2008-08-10T15:23:55.693
2008-08-10T15:23:55.693
null
null
419
null
7,211
1
null
null
21
2,797
I currently have a relatively small (4 or 5 tables, 5000 rows) MySQL database that I would like to convert to an sqlite database. As I'd potentially have to do this more than once, I'd be grateful if anyone could recommend any useful tools, or at least any easily-replicated method. (I have complete admin access to th...
What's the best way of converting a mysql database to a sqlite one?
CC BY-SA 2.5
0
2008-08-10T15:03:20.383
2012-12-14T02:00:38.803
2009-03-01T00:08:52.520
57,752
916
[ "sql", "mysql", "database", "sqlite" ]
7,214
1
7,235
null
2
1,001
I'm currently tasked with replacing an `Apache` + `Resin` Java web server with a `Resin-only` configuration. Currently in our apache setup, we use .htaccess and a small user database to provide passwording at a directory level. Does anyone know the equivalent setup when using just `Resin` as the web server?
User authentication on Resin webserver
CC BY-SA 3.0
null
2008-08-10T15:10:41.820
2012-12-31T21:28:12.833
2012-12-31T21:28:12.833
1,938,054
916
[ "apache", "configuration", "webserver", "resin", "caucho" ]
7,212
1
8,886
null
5
1,348
What I'd like to do is something like the following: ``` FooClass.prototype.method = function():String { return "Something"; } var foo:FooClass = new FooClass(); foo.method(); ``` Which is to say, I'd like to extend a generated class with a single method, not via inheritance but via the prototype. The class is...
Is it possible to add behavior to a non-dynamic ActionScript 3 class without inheriting the class?
CC BY-SA 2.5
null
2008-08-10T15:05:33.140
2008-09-17T20:09:30.450
2008-08-16T13:08:59.240
905
266
[ "apache-flex", "actionscript-3", "extension-methods" ]
7,217
2
null
260
4
null
The main application that my division sells does something very similar to provide client customisations (which means that I can't post any source). We have a C# application that loads dynamic VB.NET scripts (although any .NET language could be easily supported - VB was chosen because the customisation team came from a...
null
CC BY-SA 2.5
null
2008-08-10T15:24:23.553
2010-01-09T22:58:08.100
2010-01-09T22:58:08.100
63,550
905
null
7,221
2
null
7,190
3
null
We use CruiseControl with NUnit, NCover, FxCop, SVN and some custom tools we wrote ourselves to produce the reports. In my opinion it has proven (over the last few years) to be an excellent combination. It's frustrating that MS restricts of its integration tools to VSTS. Its test framework is as good as NUnit, but y...
null
CC BY-SA 2.5
null
2008-08-10T15:34:37.620
2008-08-10T15:34:37.620
null
null
905
null
7,218
2
null
7,211
2
null
As long as a MySQL dump file doesn't exceed the [SQLite](http://www.sqlite.org/lang.html) query language, you should be able to migrate fairly easily: ``` tgl@moto~$ mysqldump old-database > old-database-dump.sql tgl@moto~$ sqlite3 -init old-database-dump.sql new-database ``` I haven't tried this myself. Looks l...
null
CC BY-SA 2.5
null
2008-08-10T15:25:27.500
2008-08-10T19:16:21.510
2008-08-10T19:16:21.510
809
809
null
7,224
1
7,225
null
7
16,492
Is it possible to change the width of a scroll bar on a form. This app is for a touch screen and it is a bit too narrow.
Change the width of a scrollbar
CC BY-SA 2.5
null
2008-08-10T15:48:24.083
2014-02-01T05:15:08.097
2014-02-01T05:15:08.097
256,431
null
[ "vb.net", "scrollbar" ]
7,225
2
null
7,224
3
null
The width of the scrollbars is controlled by Windows. You can adjust the scrollbar width in Display Properties and it will affect all windows on the terminal.
null
CC BY-SA 2.5
null
2008-08-10T15:48:41.070
2011-01-04T13:19:27.220
2011-01-04T13:19:27.220
95,573
770
null
7,222
2
null
7,118
6
null
[This is the Firebug Lite](http://getfirebug.com/lite.html) that @John was referring to that works on IE, Safari and Opera.
null
CC BY-SA 2.5
null
2008-08-10T15:37:25.993
2008-08-10T15:37:25.993
null
null
657
null
7,230
2
null
6,817
0
null
I will have to check-out Hoard, Google Perftools and jemalloc sometime. For now we are using scalable_malloc from Intel Threading Building Blocks and it performs well enough. For better or worse, we're using C++ on Windows, though much of our code will compile with gcc just fine. Unless there's a compelling reason to ...
null
CC BY-SA 2.5
null
2008-08-10T16:15:10.097
2008-08-10T16:15:10.097
null
null
852
null
7,231
1
7,499
null
10
5,300
Can anyone recommend software or a .NET library that will check for bounced emails and the reason for the bounce? I get bounced emails into a pop3 account that I can read then. I need it to keep my user database clean from invalid email addresses and want to automate this (mark user as invalid email).
Automatically check bounced emails via POP3?
CC BY-SA 3.0
0
2008-08-10T16:16:15.370
2021-08-22T00:07:05.423
2021-08-22T00:07:05.423
99,692
925
[ ".net", "email", "pop3", "email-bounces" ]
7,241
2
null
7,237
2
null
after you moved the DBs over to 2005 did you update the stats with full scan? rebuilt the indexes? first try that and then check performance again
null
CC BY-SA 2.5
null
2008-08-10T16:59:30.227
2008-08-10T16:59:30.227
null
null
740
null
7,237
1
178,509
null
11
5,927
Our software must be able to run on SQL Server 2000 and 2005. To simplify development, we're running our SQL Server 2005 databases in compatibility level 80. However, database performance seems slower on SQL 2005 than on SQL 2000 in some cases (we have not confirmed this using benchmarks yet). Would upgrading the co...
Does running a SQL Server 2005 database in compatibility level 80 have a negative impact on performance?
CC BY-SA 2.5
0
2008-08-10T16:46:12.640
2010-05-06T06:44:49.897
2008-08-18T16:15:50.593
116
799
[ "sql-server", "database" ]
7,240
2
null
5,667
0
null
I assume that you want this "pause" for debugging purposes, otherwise think about it, you'll always have some better tasks to do for your server than sleep ... A suggestion: Maybe you could get CURRENT, add it a few seconds ( let mytimestamp ) then in a while loop select CURRENT while CURRENT <= mytimestamp . I've no ...
null
CC BY-SA 2.5
null
2008-08-10T16:58:39.887
2008-08-10T16:58:39.887
null
null
927
null
7,235
2
null
7,214
1
null
See "[Authentication on Resin](http://www.caucho.com/resin-3.0/security/authentication.xtp)" The closest you'll come to .htaccess with apache is configuring for Basic auth using an XmlAuthenticator. You'll need to convert your htpasswd file into the XML format that resin uses. Follow the "Quick Start" section and you...
null
CC BY-SA 2.5
null
2008-08-10T16:41:23.897
2008-08-10T16:41:23.897
null
null
758
null
7,242
2
null
7,237
1
null
Also a FYI, if you run compatibility level 90 then some things are not supported anymore like old style outer joins `(*= and =*)`
null
CC BY-SA 2.5
null
2008-08-10T17:01:28.523
2008-08-10T17:01:28.523
null
null
740
null
7,244
1
1,409,873
null
96
23,092
What I want to do is something like this: I have enums with combined flagged values. ``` public static class EnumExtension { public static bool IsSet<T>( this T input, T matchTo ) where T:enum //the constraint I want that doesn't exist in C#3 { return (input & matchTo) != 0; } } ``` ...
Anyone know a good workaround for the lack of an enum generic constraint?
CC BY-SA 4.0
0
2008-08-10T17:14:10.260
2019-01-20T13:55:37.633
2019-01-20T13:55:37.633
567,854
905
[ "c#", ".net", "enums", "flags" ]
7,256
2
null
7,017
0
null
Yes. I am working on an Editor. It's a XAML-like language (or OpenLaszlo-like, if you prefer) for XNA. So the buttons can be resized by the editor. The buttons might also be resized by a style sheet. I guess you're right that it's likely that the buttons will all be the same size in a real design. But even in a windo...
null
CC BY-SA 2.5
null
2008-08-10T17:42:34.650
2008-08-10T17:42:34.650
null
null
814
null
7,258
2
null
7,245
22
null
@lassevk I found the referenced article, from DDJ: [The Maximal Rectangle Problem](http://www.ddj.com/184410529)
null
CC BY-SA 2.5
null
2008-08-10T17:44:35.237
2008-08-10T17:44:35.237
null
null
758
null
7,250
2
null
7,245
2
null
@lassevk ``` // 4. Outer double-for-loop to consider all possible positions // for topleft corner. for (int i=0; i < M; i++) { for (int j=0; j < N; j++) { // 2.1 With (i,j) as topleft, consider all possible bottom-right corners. for (int a=i; a < M; a++) { for (int b=j; ...
null
CC BY-SA 2.5
null
2008-08-10T17:30:04.190
2008-08-10T17:30:04.190
null
null
758
null
7,252
1
7,274
null
109
10,368
We have a junior programmer that simply doesn't write enough tests. I have to nag him every two hours, "have you written tests?" We've tried: - - - - My work requires top quality stable code, and usually everyone 'gets it' and there's no need to push tests through. We know we can make him write tests, but we all kno...
How to make junior programmers write tests?
CC BY-SA 2.5
0
2008-08-10T17:34:46.630
2015-07-01T14:40:36.170
2008-08-23T17:53:57.660
2,134
573
[ "unit-testing", "testing" ]
7,259
2
null
7,252
2
null
If the junior programmer, or anyone, doesn't see the value in testing, then it will be hard to get them to do it...period. I would have made the junior programmer sacrifice their weekend to fix the bug. His actions (or lack there of) are not affecting him directly. Also, make it apparent, that he will not see advanc...
null
CC BY-SA 2.5
null
2008-08-10T17:49:22.873
2008-08-10T17:49:22.873
null
null
881
null
7,260
1
9,095
null
63
100,487
How do I setup Public-Key Authentication for SSH?
How do I setup Public-Key Authentication?
CC BY-SA 2.5
0
2008-08-10T17:50:11.467
2017-03-28T21:33:55.460
2017-03-28T21:33:55.460
2,838,606
889
[ "linux", "ssh", "private-key", "public-key" ]
7,245
1
7,258
null
43
32,112
What's the most efficient algorithm to find the rectangle with the largest area which will fit in the empty space? Let's say the screen looks like this ('#' represents filled area): ``` .................... ..............###### ##.................. .................### .................### #####............... #####....
Puzzle: Find largest rectangle (maximal rectangle problem)
CC BY-SA 2.5
0
2008-08-10T17:16:55.137
2021-12-21T17:53:09.243
2008-08-11T06:26:39.427
758
758
[ "algorithm", "language-agnostic", "math", "geometry" ]
7,249
2
null
7,231
2
null
It's pretty easy to do with a TcpClient. Open the server: ``` TcpClient tcpClient = new TcpClient(); tcpClient.Connect(POP3Server, POP3Port); NetworkStream stream = tcpClient.GetStream(); ``` Read the welcome message: ``` int read = stream.Read(inBuffer, 0, inBuffer.Length); string response = Encoding.ASCII.GetStri...
null
CC BY-SA 2.5
null
2008-08-10T17:28:50.200
2008-08-10T17:28:50.200
null
null
2,521,991
null
7,257
2
null
1,995
5
null
You'll get different results for the different methods depending on whether you compile with optimisations on. You basically have a few options: ``` object o; //checking with is o is int //check type o.GetType() != typeof( int ) //cast and catch exception try{ int j = (int) o; } catch {} //use the tryparse int.Tr...
null
CC BY-SA 2.5
null
2008-08-10T17:43:14.273
2008-08-10T17:43:14.273
null
null
905
null
7,263
2
null
4
105
null
Your code worked fine in VB.NET because it implicitly does any casts, while C# has both implicit and explicit ones. In C# the conversion from decimal to double is explicit as you lose accuracy. For instance 1.1 can't be accurately expressed as a double, but can as a decimal (see "[Floating point numbers - more inaccur...
null
CC BY-SA 3.0
null
2008-08-10T17:54:27.777
2012-10-14T11:51:08.343
2012-10-14T11:51:08.343
967,315
905
null
7,270
2
null
7,173
1
null
SVN 1.5 introduced the concept of automatic merge tracking, although I thought it required a 1.5 server and client. See [Apache Subversion 1.5 release notes](http://subversion.apache.org/docs/release-notes/1.5.html#merge-tracking) for details.
null
CC BY-SA 3.0
null
2008-08-10T18:07:54.707
2012-08-17T15:41:30.723
2012-08-17T15:41:30.723
761,095
729
null
7,267
2
null
7,252
12
null
I've noticed that a lot of programmers see the value of testing on a rational level. If you've heard things like "yeah, I know I should test this but I really need to get this done quickly" then you know what I mean. However, on an emotional level they feel that they get something done only when they're writing the rea...
null
CC BY-SA 2.5
null
2008-08-10T18:00:35.830
2008-08-10T18:00:35.830
null
null
266
null
7,269
1
46,902
null
8
2,115
I'm part of a team that develops a pretty big Swing Java Applet. Most of our code are legacy and there are tons of singleton references. We've bunched all of them to a single "Application Context" singleton. What we now need is to create some way to separate the shared context (shared across all applets currently showi...
How can I identify in which Java Applet context running without passing an ID?
CC BY-SA 3.0
null
2008-08-10T18:06:04.820
2016-03-11T17:58:30.780
2016-03-11T17:58:30.780
407,418
931
[ "java", "swing", "applet" ]
7,265
2
null
7,252
4
null
Frankly, if you are having to put much effort into getting him to do something then you may have to come to terms with the thought that he may just not be a good fit for the team, and may need to go. Now, this doesn't necessarily mean firing him... it may mean finding someplace else in the company his skills are more...
null
CC BY-SA 2.5
null
2008-08-10T17:58:14.057
2008-08-10T17:58:14.057
null
null
194
null
7,272
1
null
null
3
1,074
Alright, so maybe I shouldn't have shrunk this question sooo much... I have seen the post on [the most efficient way to find the first 10000 primes](https://stackoverflow.com/questions/622/most-efficient-code-for-the-first-10000-prime-numbers). I'm looking for . The goal is to have a one stop shop for primality tests...
Of Ways to Count the Limitless Primes
CC BY-SA 2.5
0
2008-08-10T18:11:08.100
2011-04-05T18:34:47.393
2017-05-23T12:33:27.093
-1
145
[ "language-agnostic", "primes" ]