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
29,844
2
null
29,841
3
null
> We put the Thread.Sleep in after a couple of times when the database had gone away and we came back to 3Gb logs files full of database connection errors. I would think a better option would be to make it so that your logging system trapped duplicates, so that it could write something like, "The previous message was ...
null
CC BY-SA 2.5
null
2008-08-27T10:10:32.513
2008-08-27T10:10:32.513
null
null
2,131
null
29,847
1
29,862
null
4
17,483
I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including status and Id which increment as the steps of the process increase. Basically I want to retrieve the last step for each ite...
Get last item in a table - SQL
CC BY-SA 2.5
0
2008-08-27T10:13:16.220
2013-06-03T06:08:23.433
2008-08-31T07:51:11.787
305
1,075
[ "sql", "sql-server", "database", "tsql" ]
29,852
2
null
29,802
0
null
I maintain a system of web applications with various components that live in separate SVN repos. To be able to version track the system as a whole, I have another SVN repo which contains all other repos as external references. It also contains install / setup script(s) to deploy the whole thing. With that setup, the SV...
null
CC BY-SA 2.5
null
2008-08-27T10:18:52.820
2008-08-27T10:18:52.820
null
null
2,077
null
29,854
2
null
29,838
2
null
I just googled, but [this walkthrough](http://msdn.microsoft.com/en-us/library/ms181247(VS.80).aspx) seems like a good reference, and it mentions the tool VSSConverter which should help you make the migration as painless as possible. I would like to recommend one thing though: Backup. Backup everything before you do t...
null
CC BY-SA 2.5
null
2008-08-27T10:20:38.153
2009-03-16T15:47:23.913
2009-03-16T15:47:23.930
5,640
614
null
29,855
1
29,859
null
5
9,342
My understanding is that [wxWidgets](http://www.wxwidgets.org) is for a number of programming languages (C++, Python, Perl, and C#/.NET) but that does not include C. Is there a similar framework for the C programming language, or is this not something that C is used for?
Is there a wxWidgets framework for C?
CC BY-SA 2.5
0
2008-08-27T10:21:16.433
2015-03-27T09:18:10.150
2008-08-27T12:32:38.460
1,662
2,183
[ "c", "user-interface" ]
29,856
1
31,384
null
4
659
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit....
Install Python to match directory layout in OS X 10.5
CC BY-SA 3.0
null
2008-08-27T10:22:09.427
2017-04-10T18:29:51.837
2017-04-10T18:29:51.837
1,850,349
3,431,280
[ "python", "macos", "64-bit" ]
29,859
2
null
29,855
2
null
You can try [GTK+](http://www.gtk.org/). I believe wxWidgets implementation for linux is written in GTK+.
null
CC BY-SA 2.5
null
2008-08-27T10:24:54.430
2008-08-27T10:24:54.430
null
null
1,007
null
29,858
2
null
29,810
10
null
Thinking out of the box, would migrating to a Wiki be out of the question? Since you consider it feasible to force your users into Subversion (or something similar), a larger change seem acceptable. Another migration target could be to use some kind of structured XML document format ([DocBook](http://www.docbook.org/...
null
CC BY-SA 2.5
null
2008-08-27T10:23:10.907
2008-08-27T10:23:10.907
null
null
2,238
null
29,860
2
null
28,302
0
null
I tried Wireshark and Microsoft Network Monitor, but neither detected my (and the program I am trying to communicate with) transfer. If I had a day to sit and configure it I probably could get it working but I just wanted the bytes sent and, more specifically, bytes received. In the end I found [HHD Software's Accurat...
null
CC BY-SA 2.5
null
2008-08-27T10:28:24.797
2008-08-27T10:28:24.797
null
null
342
null
29,843
2
null
29,841
0
null
Have you tried using [Monitor.Pulse](http://msdn.microsoft.com/en-us/library/system.threading.monitor.pulse.aspx) (ensure your thread is using thread management before running this) to get the thread to do something? If that works, then you're going to have to look a bit more into your threading logic.
null
CC BY-SA 2.5
null
2008-08-27T10:09:13.063
2008-08-27T10:09:13.063
null
null
2,951
null
29,865
2
null
29,242
49
null
I often use this little snippet I've written long time ago. It's short and easy to add anywhere when debugging etc... ``` #include <ctype.h> #include <stdio.h> void hexdump(void *ptr, int buflen) { unsigned char *buf = (unsigned char*)ptr; int i, j; for (i=0; i<buflen; i+=16) { printf("%06x: ", i); for ...
null
CC BY-SA 2.5
null
2008-08-27T10:35:45.167
2008-08-27T10:35:45.167
null
null
842
null
29,845
1
29,866
null
14
20,480
I have an application on which I am implementing localization. I now need to dynamically reference a name in the resouce file. assume I have a resource file called Login.resx, an a number of strings: foo="hello", bar="cruel" and baz="world" normally, I will refer as: String result =Login.foo; and result=="hello"; ...
Dynamic reference to resource files in C#
CC BY-SA 2.5
0
2008-08-27T10:12:08.657
2013-09-02T13:28:54.263
null
null
1,090
[ "c#", "localization" ]
29,861
2
null
29,847
0
null
As already suggested you probably want to reorder your query to sort it in the other direction so you actually fetch the first row. Then you'd probably want to use something like ``` SELECT TOP 1 ... ``` if you're using MSSQL 2k or earlier, or the SQL compliant variant ``` SELECT * FROM ( SELECT ROW_NUMBER()...
null
CC BY-SA 2.5
null
2008-08-27T10:28:33.907
2008-08-27T10:28:33.907
2017-05-23T12:33:26.220
-1
2,010
null
29,822
1
29,904
null
2
654
One of our weblogic 8.1s has suddenly started logging giant amounts of logs and filling the disk. The logs giving us hassle resides in ``` mydrive:\bea\weblogic81\common\nodemanager\NodeManagerLogs\generatedManagedServer1\managedserveroutput.log ``` and the entries in the logfile is just the some kind of entries r...
Giant NodeManagerLogs from hibernate in weblogic
CC BY-SA 4.0
null
2008-08-27T09:50:27.460
2019-09-28T12:50:29.613
2019-09-28T12:50:29.613
391,691
86
[ "hibernate", "logging", "weblogic" ]
29,853
2
null
29,847
0
null
It's a bit hard to decypher your data the way WMD has formatted it, but you can pull of the sort of trick you need with common table expressions on SQL 2005: ``` with LastBatches as ( select Batch, max(Id) from HistoryTable group by Batch ) select * from HistoryTable h join LastBatches b on b.Batch = h...
null
CC BY-SA 2.5
null
2008-08-27T10:19:08.203
2008-08-27T10:19:08.203
null
null
615
null
29,867
2
null
29,810
60
null
I've worked with Word documents in SVN. With [TortoiseSVN](http://tortoisesvn.tigris.org/), you can easily diff Word documents (between working copy and repository, or between two repository revisions). It's really slick and definitely recommended. The other thing to do if you're using Word documents in SVN is to add ...
null
CC BY-SA 2.5
null
2008-08-27T10:37:06.333
2008-08-27T10:37:06.333
null
null
893
null
29,870
1
29,903
null
0
174
I run a game and the running is done by hand, I have a few scripts that help me but essentially it's me doing the work. I am at the moment working on web app that will allow the users to input directly some of their game actions and thus save me a lot of work. The problem is that I'm one man working on a moderately si...
How to bring in a web app
CC BY-SA 3.0
null
2008-08-27T10:43:53.620
2015-03-06T13:59:36.170
2015-03-06T13:59:36.170
2,641,576
1,384,652
[ "web-applications", "beta", "launching" ]
29,872
2
null
29,775
-1
null
> Thinstall is great for single apps, but not an entire stack.... I didn't try it yet, but with the new version of thinstall you are able to let different thinstalled application communicate. But I guess you're right a vm-ware image would be easier
null
CC BY-SA 2.5
null
2008-08-27T10:46:13.287
2008-08-27T10:46:13.287
null
null
2,450
null
29,862
2
null
29,847
7
null
It's kind of hard to make sense of your table design - I think SO ate your delimiters. The basic way of handling this is to GROUP BY your fixed fields, and select a MAX (or MIN) for some unqiue value (a datetime usually works well). In your case, I that the GROUP BY would be BatchRef and ItemCount, and Id will be you...
null
CC BY-SA 2.5
null
2008-08-27T10:29:03.920
2008-08-27T10:29:03.920
null
null
2,199
null
29,849
2
null
29,802
2
null
I have a tendency to stick with basic integers at first (1,2,3), moving onto rational numbers (2.1, 3.13) when things get bigger... Tried using fruit at one point, that works well for a small office. Oh, the 'banana' release? "yeah... that's getting pretty old now..." Unfortunately, confusion started to set in when...
null
CC BY-SA 3.0
null
2008-08-27T10:17:46.413
2017-04-03T23:42:07.670
2017-04-03T23:42:07.670
2,349,082
592
null
29,866
2
null
29,845
20
null
You'll need to instance a [ResourceManager](http://msdn.microsoft.com/en-us/library/aa984408%28VS.71%29.aspx) for the `Login.resx`: ``` var resman = new System.Resources.ResourceManager( "RootNamespace.Login", System.Reflection.Assembly.GetExecutingAssembly() ) var text = resman.GetString("resname"); ``` It ...
null
CC BY-SA 2.5
null
2008-08-27T10:35:46.290
2008-08-27T10:35:46.290
null
null
1,968
null
29,875
2
null
29,869
0
null
Try this, it should work: ``` /<\/?([^p](\s.+?)?|..+?)>/ ``` Explanation: it matches either a single letter except “p”, followed by an optional whitespace and more characters, or multiple letters (at least two). /EDIT: I've added the ability to handle attributes in `p` tags.
null
CC BY-SA 2.5
null
2008-08-27T10:47:17.697
2008-08-27T10:57:11.153
2008-08-27T10:57:11.153
1,968
1,968
null
29,869
1
29,917
null
24
42,254
I need to match and remove all tags using a regular expression in Perl. I have the following: ``` <\\??(?!p).+?> ``` But this still matches with the closing `</p>` tag. Any hint on how to match with the closing tag as well? Note, this is being performed on xhtml.
Regex to match all HTML tags except <p> and </p>
CC BY-SA 2.5
0
2008-08-27T10:41:44.793
2021-03-09T21:07:02.877
2009-11-22T09:16:21.810
20,938
274
[ "html", "regex", "perl" ]
29,871
2
null
29,869
1
null
Assuming that this will work in PERL as it does in languages that claim to use PERL-compatible syntax: `/<\/?[^p][^>]*>/` EDIT: But that won't match a `<pre>` or `<param>` tag, unfortunately. This, perhaps? ``` /<\/?(?!p>|p )[^>]+>/ ``` That should cover `<p>` tags that have attributes, too.
null
CC BY-SA 2.5
null
2008-08-27T10:45:36.190
2008-08-27T10:51:38.123
2008-08-27T10:51:38.123
1,344
1,344
null
29,888
2
null
29,883
0
null
Have you tried hard-coding the values just to see if background-colors are showing on the print-preview at all? I think it is a setting in the Browser.
null
CC BY-SA 2.5
null
2008-08-27T10:54:01.410
2008-08-27T10:54:01.410
null
null
2,257
null
29,889
2
null
29,883
2
null
Is it not recommended to do this with stylesheets? You can change the media type in the LINK statement in your HTML, so when the page is printed, it will revert to the different style?
null
CC BY-SA 2.5
null
2008-08-27T10:54:26.947
2008-08-27T10:54:26.947
null
null
832
null
29,883
1
29,888
null
1
269
What I am trying to do is change the background colour of a table cell <td> and then when a user goes to print the page, the changes are now showing. I am currently using an unobtrusive script to run the following command on a range of cells: ``` element.style.backgroundColor = "#f00" ``` This works on screen in IE...
Printing DOM Changes
CC BY-SA 2.5
0
2008-08-27T10:51:38.873
2018-10-19T09:37:08.780
2018-10-19T09:37:08.780
7,109,869
383
[ "internet-explorer", "firefox", "dom", "browser", "printing" ]
29,886
1
null
null
10
22,552
I'm writing a simple photo album app using ASP.NET Ajax. The app uses async Ajax calls to pre-load the next photo in the album, without changing the URL in the browser. The problem is that when the user clicks the button in the browser, the app doesn't go back to the previous photo, instead, it navigates to the home ...
How to keep the browser history in sync when using Ajax?
CC BY-SA 2.5
0
2008-08-27T10:53:22.973
2017-05-13T18:08:31.617
2010-09-18T09:57:24.813
130,638
373
[ "javascript", "asp.net", "ajax", "hashchange" ]
29,887
2
null
29,869
2
null
Since HTML is not a regular language I would not expect a regular expression to do a very good job at matching it. They might be up to this task (though I'm not convinced), but I would consider looking elsewhere; I'm sure perl must have some off-the-shelf libraries for manipulating HTML. Anyway, I would think that wha...
null
CC BY-SA 2.5
null
2008-08-27T10:53:29.757
2008-08-27T10:53:29.757
null
null
2,131
null
29,891
2
null
29,678
0
null
@Sergio and @Rowan Yes, we're talking about loading and transforming data into the database (like a SSIS tool would do). That's solved using our integration platform.
null
CC BY-SA 2.5
null
2008-08-27T10:54:43.093
2008-08-27T11:43:25.583
2008-08-27T11:43:25.583
298
298
null
29,892
2
null
29,869
2
null
> Since HTML is not a regular language HTML isn't but HTML tags are and they can be adequatly described by regular expressions.
null
CC BY-SA 2.5
null
2008-08-27T10:54:58.943
2008-08-27T10:54:58.943
null
null
1,968
null
29,897
2
null
29,886
3
null
Many websites make use of a hidden iframe to do this, simply refresh the iframe with the new URL, which adds it to the browsing history. Then all you have to do is handle how your application reacts to those 'back button' events - you'll either need to detect the state/location of the iframe, or refresh the page using...
null
CC BY-SA 2.5
null
2008-08-27T10:57:57.470
2008-08-27T10:57:57.470
null
null
2,951
null
29,882
1
null
null
4
4,548
At my job we make & sell websites. Usually we install our .NET C# based site on a customer's server and maintain and support it remotely. However, every once in a while, for bigger development works and just to make things simpler (and faster!), we will copy the site to a local server. This is great, but has one pain -...
What would be a good, windows and iis (http) based distributed version control system
CC BY-SA 2.5
null
2008-08-27T10:51:34.270
2008-09-17T08:04:27.197
2020-06-20T09:12:55.060
-1
2,892
[ "http", "version-control", "distributed" ]
29,896
2
null
29,886
4
null
MSDN has an article about [Managing Browser History in ASP.NET AJAX](http://msdn.microsoft.com/en-us/library/cc488553.aspx)
null
CC BY-SA 2.5
null
2008-08-27T10:57:25.537
2010-04-21T06:03:57.720
2010-04-21T06:03:57.720
2,257
2,257
null
29,899
2
null
29,882
0
null
Maybe not exactly what you request but checkout [DeltaCopy](http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp) which is a windows version of [rsync](http://en.wikipedia.org/wiki/Rsync). You can also read about another rsync solution [here](http://hype-free.blogspot.com/2007/02/using-rsync-on-windows.html)
null
CC BY-SA 2.5
null
2008-08-27T10:59:55.390
2008-08-27T10:59:55.390
null
null
842
null
29,902
2
null
29,870
1
null
I'll try to answer with the limited amount of details you've given. 1: Wether it's open or closed is really only an issue if you have great buzz, and a large group of users hammering down your door, trying toget in on the action. If this is the case, I think you might get more loyalty and commitment from users in a ...
null
CC BY-SA 2.5
null
2008-08-27T11:04:31.120
2008-08-27T11:04:31.120
null
null
1,090
null
29,900
2
null
29,882
2
null
I'd look at either [Mercurial](http://www.selenic.com/mercurial/wiki/) or [Bazaar](http://bazaar-vcs.org/). I'm told Git also works on windows, but I suspect the windows port is still a second class port at best. You'll probably need to be able to run python scripts on your webserver to host either of them.
null
CC BY-SA 2.5
null
2008-08-27T11:00:56.213
2008-08-27T11:00:56.213
null
null
1,466
null
29,901
2
null
29,870
1
null
I don't understand what you mean by "bring in the app" and "one turn drop it". By "bring in the app" do you mean deploy? As for "One turn drop", I totally don't understand it. As for open betas, that depends on your audience, really. Counterstrike, for example, apparently run a few closed betas before doing open betas...
null
CC BY-SA 2.5
null
2008-08-27T11:01:15.667
2008-08-27T11:01:15.667
null
null
372
null
29,890
1
29,916
null
11
17,464
1. You have multiple network adapters. 2. Bind a UDP socket to an local port, without specifying an address. 3. Receive packets on one of the adapters. How do you get the local ip address of the adapter which received the packet? The question is, "What is the ip address from the receiver adapter?" not the address ...
How to get your own (local) IP-Address from an udp-socket (C/C++)
CC BY-SA 2.5
0
2008-08-27T10:54:29.427
2022-06-03T12:47:13.023
2008-09-03T16:12:49.187
-1
3,186
[ "c++", "sockets", "udp" ]
29,909
2
null
26,098
3
null
There is no official way of doing what you want, because the dll interface is a C api. The compiler itself uses mangled names as a workaround, so you should use name mangling when you don't want to change too much in your code.
null
CC BY-SA 2.5
null
2008-08-27T11:11:20.340
2008-08-27T11:11:20.340
null
null
3,186
null
29,904
2
null
29,822
2
null
Since those log entries aren't problems, it sounds like the global log level has been turned up to DEBUG. Alternatively, perhaps a new Logging mechanism has been implemented or a new log Appender that writes to stdout, and thus is being re-logged by Weblogic. I would look at the configuration of your logger. (Or provid...
null
CC BY-SA 2.5
null
2008-08-27T11:05:59.917
2008-08-28T10:27:47.987
2008-08-28T10:27:47.987
1,820
1,820
null
29,905
2
null
1,496
1
null
I use the CarbonEmacs version on the Macports program. It installs all the dependencies with just one line: ``` sudo port install emacs ``` For anyone interested in Macports ([www.macports.org](http://www.macports.org))
null
CC BY-SA 4.0
null
2008-08-27T11:06:14.097
2021-10-25T11:47:42.603
2021-10-25T11:47:42.603
17,169,050
2,937
null
29,907
2
null
29,383
11
null
This should be fine: ``` const char* bool_cast(const bool b) { return b ? "true" : "false"; } ``` But, if you want to do it more C++-ish: ``` #include <iostream> #include <string> #include <sstream> using namespace std; string bool_cast(const bool b) { ostringstream ss; ss << boolalpha << b; return...
null
CC BY-SA 3.0
null
2008-08-27T11:08:22.873
2016-03-31T17:15:53.487
2016-03-31T17:15:53.487
1,697
1,697
null
29,906
2
null
29,814
5
null
If I understand your question correctly you would need to have a clientaccesspolicy.xml file in the domain web root of the server that you wish to call (ie www.example.com/clientaccesspolicy.xml) that defines that it is ok for services from other domains to call services on that domain. Read the [How to Make a Service...
null
CC BY-SA 2.5
null
2008-08-27T11:07:19.943
2008-08-27T11:07:19.943
null
null
2,114
null
29,910
2
null
14,422
7
null
I stumbled across a good tutorial on PyObjC/Cocoa: [http://lethain.com/entry/2008/aug/22/an-epic-introduction-to-pyobjc-and-cocoa/](http://lethain.com/entry/2008/aug/22/an-epic-introduction-to-pyobjc-and-cocoa/)
null
CC BY-SA 2.5
null
2008-08-27T11:12:51.600
2008-10-10T10:13:01.660
2008-10-10T10:13:01.660
745
745
null
29,908
2
null
29,680
3
null
IIRC, the browser pops the auth dialog when the following comes back in the request stream: - - I would guess that you'd need to suppress one or both of those. The easy way to do that is to have a login method that'll take a Base64 username and password (you are using HTTPS, right?) and return 200 with a valid/inval...
null
CC BY-SA 2.5
null
2008-08-27T11:10:36.737
2008-08-27T11:10:36.737
null
null
2,199
null
29,903
2
null
29,870
2
null
This is my general approach to testing/launching. How you test/launch depends mostly on: 1. What your application is. 2. Who your users are. If you application is a technical application and is geared to the technically-minded, the word "beta" won't really scare them - but provide an opportunity to test the produc...
null
CC BY-SA 2.5
null
2008-08-27T11:04:47.203
2008-08-27T11:04:47.203
null
null
2,951
null
29,911
2
null
29,869
-1
null
You should probably also remove any attributes on the <p> tag, since someone bad could do something like: ``` <p onclick="document.location.href='http://www.evil.com'">Clickable text</p> ``` The easiest way to do this, is to use the regex people suggest here to search for &ltp> tags with attributes, and replace them...
null
CC BY-SA 2.5
null
2008-08-27T11:13:39.647
2008-08-27T11:13:39.647
null
null
1,606
null
29,914
2
null
29,370
2
null
Are you required to have it run as x86? I had similar issues with web apps under Visual Studio's dev web server (which is x86), but switching over to IIS (x64) worked for me. Since I was deploying to IIS x64, I called it a day at that point. I tried tracing with Filemon and Regmon, but didn't get any denied or missing...
null
CC BY-SA 2.5
null
2008-08-27T11:21:12.093
2008-08-27T11:21:12.093
null
null
2,199
null
29,918
2
null
29,886
0
null
The 3.5 SP1 update has support for browser history and back button in ASP.NET ajax now.
null
CC BY-SA 2.5
null
2008-08-27T11:28:03.013
2008-08-27T11:28:03.013
null
null
null
null
29,922
2
null
4,582
1
null
Anthony Cramp's answer looked good to me. As he mentions the DCT transforms the data into the frequency domain. The DCT is heavily used in video compression as the human visual system is must less sensitive to high frequency changes, therefore zeroing out the higher frequency values results in a smaller file, with litt...
null
CC BY-SA 2.5
null
2008-08-27T11:33:54.560
2008-08-27T11:33:54.560
null
null
142
null
29,916
2
null
29,890
4
null
You could enumerate all the network adapters, get their IP addresses and compare the part covered by the subnet mask with the sender's address. Like: ``` IPAddress FindLocalIPAddressOfIncomingPacket( senderAddr ) { foreach( adapter in EnumAllNetworkAdapters() ) { adapterSubnet = adapter.subnetmask & a...
null
CC BY-SA 2.5
null
2008-08-27T11:24:50.680
2008-08-27T11:32:01.820
2008-08-27T11:32:01.820
1,810
1,810
null
29,919
2
null
29,890
3
null
G'day, I assume that you've done your bind using INADDR_ANY to specify the address. If this is the case, then the semantics of INADDR_ANY is such that a UDP socket is created on the port specified on all of your interfaces. The socket is going to get all packets sent to all interfaces on the port specified. When sen...
null
CC BY-SA 2.5
null
2008-08-27T11:28:46.740
2008-08-27T15:10:43.510
2008-08-27T15:10:43.510
2,974
2,974
null
29,912
2
null
29,890
-3
null
Actual code: `int nbytes = recvfrom(sock, buf, MAXBUFSIZE, MSG_WAITALL, (struct sockaddr *)&bindaddr, &addrlen);````fprintf(stdout, "Read %d bytes on local address %s\n", nbytes, inet_ntoa(bindaddr.sin_addr.s_addr));` hope this helps.
null
CC BY-SA 2.5
null
2008-08-27T11:18:34.473
2008-08-27T12:19:36.557
2008-08-27T12:19:36.557
2,811
2,811
null
29,920
2
null
29,841
5
null
Dig in and find out? Stick a debugger on that bastard! I can see at least the following possibilities: 1. the logging system hangs; 2. the thread exited just fine but the service is still running because some other part has a logic error. And maybe, but almost certainly not, the following: - But in any case, a...
null
CC BY-SA 2.5
null
2008-08-27T11:29:58.797
2008-08-27T11:29:58.797
null
null
2,928
null
29,915
2
null
28,529
4
null
Now I have a problem as to which answer to accept. Further thought on the problem brings me to the conclusion that I was incorrectly throwing exceptions. Duplicate user names, email addresses etc are expected issues during a sign up process and are therefore not exceptions, but simply errors. In which case I probably ...
null
CC BY-SA 2.5
null
2008-08-27T11:24:16.923
2008-08-27T11:24:16.923
2017-05-23T12:30:20.733
-1
1,403
null
29,929
2
null
29,810
1
null
If you use [WinMerge](http://winmerge.org/) it has added support for merging Word and Excel binary files.
null
CC BY-SA 2.5
null
2008-08-27T11:44:32.053
2008-08-27T11:44:32.053
null
null
905
null
29,943
1
29,987
null
87
246,302
Can someone please tell me how to submit an HTML form when the return key is pressed and if there are no buttons in the form? . I am using a custom div instead of that.
How to submit a form when the return key is pressed?
CC BY-SA 3.0
0
2008-08-27T11:56:50.060
2019-06-12T11:18:29.480
2014-05-07T16:00:06.593
260,080
184
[ "javascript", "html" ]
29,939
2
null
29,731
1
null
Make sure you bind the DefaultView to the Controls Datasource, after you set the Sort property, and not the table: ``` myCombo.DataSource = this.typedDataSet.Tables["Table1"].DefaultView; myCombo.DisplayMember = "ColumnB"; myCombo.ValueMember = "ColumnA"; ```
null
CC BY-SA 2.5
null
2008-08-27T11:53:11.487
2008-08-27T11:53:11.487
null
null
1,762
null
29,927
1
30,077
null
0
3,127
My automated script for starting and stopping VMWare Server virtual machines has stopped working. vmware-cmd has started raising the error: > The ordinal 3288 could not be located in the dynamic link library LIBEAY32.dll. I am not aware of any specific change or update when this started happening. I have found a bu...
vmware-cmd causes "perl.exe - Ordinal Not Found" error
CC BY-SA 3.0
null
2008-08-27T11:42:05.430
2017-09-04T00:27:22.940
2017-09-04T00:27:22.940
7,256,341
1,755
[ "vmware" ]
29,945
2
null
29,943
0
null
Why don't you just apply the div submit styles to a submit button? I'm sure there's a javascript for this but that would be easier.
null
CC BY-SA 2.5
null
2008-08-27T11:58:08.993
2008-08-27T11:58:08.993
null
null
2,025
null
29,917
2
null
29,869
14
null
I came up with this: ``` <(?!\/?p(?=>|\s.*>))\/?.*?> x/ < # Match open angle bracket (?! # Negative lookahead (Not matching and not consuming) \/? # 0 or 1 / p # p (?= # Positive lookahead (Matching and not consuming) > # > - No attributes | # or...
null
CC BY-SA 2.5
null
2008-08-27T11:26:12.957
2008-08-27T11:26:12.957
null
null
274
null
29,951
2
null
29,943
9
null
Here is how I do it with jQuery ``` j(".textBoxClass").keypress(function(e) { // if the key pressed is the enter key if (e.which == 13) { // do work } }); ``` Other javascript wouldnt be too different. the catch is checking for keypress argument of "13", which is the enter key
null
CC BY-SA 2.5
null
2008-08-27T12:07:49.423
2008-08-27T12:07:49.423
null
null
2,993
null
29,923
2
null
26,845
6
null
At the place where I work, we decided to move from SVN to Bazaar (after evaluating git and mercurial). Bazaar was easy to start off, with simple commands (not like the 140 commands that git has) The advantages that we see is the ability to create local branches and work on it without disturbing the main version. Also ...
null
CC BY-SA 2.5
null
2008-08-27T11:37:20.043
2008-08-27T11:37:20.043
null
null
1,448
null
29,952
2
null
24,891
0
null
In C, you actually have two different choices. One, you can let the system manage the memory for you. Alternatively, you can do that by yourself. Generally, you would want to stick to the former as long as possible. However, auto-managed memory in C is extremely limited and you will need to manually manage the memory i...
null
CC BY-SA 2.5
null
2008-08-27T12:08:54.443
2008-08-27T12:08:54.443
null
null
227,049
null
29,953
2
null
29,927
1
null
I would have said that something must have updated either the LIBEAY32.dll or another dll that depends on it. You may find some helpful information using the [depends tool](http://www.dependencywalker.com/). If you use this to open up the perl.exe then it should highlight the dependency path that produces the problem. ...
null
CC BY-SA 2.5
null
2008-08-27T12:09:16.970
2008-08-27T12:09:16.970
null
null
259
null
29,957
2
null
2,482
1
null
If you want to have a go at doing a highly parallel version of a simple task, or see real solutions, you could do worse than look at the [wide finder](http://www.tbray.org/ongoing/When/200x/2007/09/20/Wide-Finder) project. Basically it's about how to do parallel regex matching of log files efficiently, but trying to a...
null
CC BY-SA 2.5
null
2008-08-27T12:12:34.357
2008-08-27T12:12:34.357
null
null
3,189
null
29,967
2
null
15,398
0
null
I believe you suffer from having a different instance of the VCL in each of your dlls and exes. Classes from the dll are not the same as the ones from your exe, even if they are called the same. Also global variables (Application, Screen) are not shared between them. Neither is the memory since they both have their own...
null
CC BY-SA 2.5
null
2008-08-27T12:18:22.457
2008-08-27T12:18:22.457
null
null
1,242
null
29,968
2
null
29,841
0
null
From the code you've posted, it's not clear that after an exception is thrown the system is definitely able to restart - e.g. if the exception comes from doStuff(), then the control flow will pass back (after the 10 minute wait) to openConnection(), without ever passing through closeConnection(). But as others have sa...
null
CC BY-SA 2.5
null
2008-08-27T12:18:36.123
2008-08-27T12:18:36.123
null
null
987
null
29,934
2
null
29,709
0
null
Note: this answer describes how to get the of the text-cursor/caret. To find the pixel-co-ordinates, you'll need to extend this further. The first thing to remember is that the cursor can be in three states - - - The IE model uses the Object [document.selection](http://msdn.microsoft.com/en-us/library/ms535869(VS....
null
CC BY-SA 2.5
null
2008-08-27T11:50:06.080
2008-08-27T12:59:44.853
2008-08-27T12:59:44.900
1,820
1,820
null
29,962
2
null
7,190
5
null
Take a look at [Hudson](http://hudson-ci.org/). It's highly customizable, and, IMHO, easier than CruiseControl.
null
CC BY-SA 3.0
null
2008-08-27T12:15:44.227
2012-08-17T15:41:40.817
2012-08-17T15:41:40.817
761,095
2,267
null
29,969
2
null
29,810
6
null
[Sharepoint](http://office.microsoft.com/en-us/sharepointtechnology/default.aspx) also does a good (ok decent) job of versioning MS-specific documents.
null
CC BY-SA 2.5
null
2008-08-27T12:19:31.703
2008-08-27T12:19:31.703
null
null
2,009
null
29,970
2
null
2,482
5
null
[http://www.yoda.arachsys.com/csharp/threads/](http://www.yoda.arachsys.com/csharp/threads/)
null
CC BY-SA 2.5
null
2008-08-27T12:20:34.213
2008-08-27T12:20:34.213
null
null
null
null
29,965
2
null
29,869
4
null
Not sure why you are wanting to do this - regex for HTML sanitisation isn't always the best method (you need to remember to sanitise attributes and such, remove javascript: hrefs and the likes)... but, a regex to match HTML tags that aren't `<p></p>`: `(<[^pP].*?>|</[^pP]>)` Verbose: ``` ( < # < op...
null
CC BY-SA 2.5
null
2008-08-27T12:17:14.050
2008-08-27T12:17:14.050
null
null
745
null
29,973
2
null
29,971
0
null
I would definitely break down the jobs. Chances are you're likely to make changes in the builds, and it'll be easier to track down issues if you have smaller tasks instead of searching through one monolithic build. You should be able to create one big job from the smaller pieces, anyways.
null
CC BY-SA 2.5
null
2008-08-27T12:24:20.600
2008-08-27T12:24:20.600
null
null
1,497
null
29,971
1
29,978
null
5
461
Setting up an integration server, I’m in doubt about the best approach regarding using multiple tasks to complete the build. Is the best way to set all in just one big-job or make small dependent ones?
What is the best way to setup an integration testing server?
CC BY-SA 2.5
0
2008-08-27T12:20:48.237
2012-07-11T15:38:34.360
2008-08-27T12:30:52.007
905
2,267
[ "continuous-integration", "integration-testing" ]
29,977
2
null
29,810
38
null
What on Earth are you all Word-is-binary-so-no-diff people talking about? TortoiseSVN, for example, integrates right out of the box with Word and enables you to use Word's built-in diff and merge functionality. It works just fine. I have worked on projects that store documents in version control. It has worked out pre...
null
CC BY-SA 2.5
null
2008-08-27T12:27:06.617
2008-08-27T12:27:06.617
null
null
2,928
null
29,972
2
null
29,971
1
null
I use TeamCity with an nant build script. TeamCity makes it easy to setup the CI server part, and nant build script makes it easy to do a number of tasks as far as report generation is concerned. Here is an article I wrote about using CI with CruiseControl.NET, it has a nant build script in the comments that can be re...
null
CC BY-SA 2.5
null
2008-08-27T12:22:15.957
2008-08-27T12:22:15.957
null
null
2,993
null
29,961
2
null
29,943
6
null
Use the following script. ``` <SCRIPT TYPE="text/javascript"> <!-- function submitenter(myfield,e) { var keycode; if (window.event) keycode = window.event.keyCode; else if (e) keycode = e.which; else return true; if (keycode == 13) { myfield.form.sub...
null
CC BY-SA 2.5
null
2008-08-27T12:14:47.817
2008-08-27T12:14:47.817
null
null
1,288
null
29,979
2
null
29,841
0
null
Try Thread.Sleep(10 * 60 * 1000)
null
CC BY-SA 2.5
null
2008-08-27T12:28:00.623
2008-08-27T12:28:00.623
null
null
26
null
29,978
2
null
29,971
3
null
You definitely want to break up the tasks. Here is a nice example of CruiseControl.NET configuration that has different targets (tasks) for each step. It also uses a common.build file which can be shared among projects with little customization. [http://code.google.com/p/dot-net-reference-app/source/browse/#svn/trun...
null
CC BY-SA 2.5
null
2008-08-27T12:27:58.113
2008-08-27T12:27:58.113
null
null
2,676
null
29,966
2
null
29,943
91
null
To submit the form when the enter key is pressed create a javascript function along these lines. ``` function checkSubmit(e) { if(e && e.keyCode == 13) { document.forms[0].submit(); } } ``` Then add the event to whatever scope you need eg on the div tag: `<div onKeyPress="return checkSubmit(event)"/>` ...
null
CC BY-SA 3.0
null
2008-08-27T12:18:18.290
2016-08-14T09:08:42.873
2016-08-14T09:08:42.873
5,620,297
2,253
null
29,983
2
null
29,461
8
null
I'd go for: 1. Closures 2. Duck typing 3. Builders (XML builder and slurper) 4. GStrings 5. Grails
null
CC BY-SA 2.5
null
2008-08-27T12:30:45.687
2008-08-27T12:30:45.687
null
null
1,281
null
29,982
2
null
29,643
2
null
Or how about logging to a queue? That way you can switch out pollers whenever you like to log to different things. It makes things like rolling over and archiving log files very easy. It's also nice because you can add pollers that log to different things, for example: - - -
null
CC BY-SA 2.5
null
2008-08-27T12:29:54.300
2008-08-27T12:29:54.300
null
null
1,190
null
29,976
1
30,536
null
4
2,057
We have a couple of ASP.Net dataview column templates that are dynamically added to the dataview depending on columns selected by users. These templated cells need to handle custom databindings: ``` public class CustomColumnTemplate: ITemplate { public void InstantiateIn( Control container ) { //...
Best practice for dynamically added Web.UI.ITemplate classes
CC BY-SA 2.5
null
2008-08-27T12:26:28.520
2013-01-03T05:49:45.337
null
null
905
[ ".net", "asp.net" ]
29,988
1
30,001
null
10
6,327
I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email account.) I've been told you could do some stuff with telneting to port 25, but I'm very fuzz...
How to send email from a program _without_ using a preexisting account?
CC BY-SA 2.5
0
2008-08-27T12:40:40.373
2011-01-06T20:37:41.883
null
null
3,191
[ ".net", "email", "smtp" ]
29,980
1
30,678
null
5
756
So I'm working on some legacy code that's heavy on the manual database operations. I'm trying to maintain some semblance of quality here, so I'm going TDD as much as possible. The code I'm working on needs to populate, let's say a `List<Foo>` from a DataReader that returns all the fields required for a functioning Foo...
How should I test a method that populates a list from a DataReader?
CC BY-SA 2.5
null
2008-08-27T12:29:09.200
2008-09-22T18:34:34.370
2008-08-31T07:42:11.730
305
266
[ "c#", "unit-testing", "tdd", "mocking" ]
29,992
2
null
29,886
0
null
For all solutions about the back button, none of them are "automatic". With every single one you are going to have to do some work to persist the state of the page. So no, there isn't a way to "trick" the browser, but there are some great libraries out there that help you with the back button.
null
CC BY-SA 2.5
null
2008-08-27T12:45:11.893
2008-08-27T12:45:11.893
null
null
77
null
29,989
2
null
27,857
59
null
[Doxygen](http://www.doxygen.nl/) is really excellent for this, although you will need to install [GraphViz](http://www.graphviz.org/) to get the the graphs to draw. Once you've got everything installed, it's really rather simple to draw the graphs. Make sure you set [EXTRACT_ALL](http://www.doxygen.nl/manual/config.h...
null
CC BY-SA 4.0
null
2008-08-27T12:40:43.777
2018-12-12T12:19:22.110
2018-12-12T12:19:22.110
1,657,886
2,990
null
29,991
2
null
29,971
0
null
G'day, As you're talking about integration testing my big (obvious) tip would be to make the test server built and configured as close as possible to the deployment environment as possible. ``` </thebloodyobvious> (-: ``` cheers, Rob
null
CC BY-SA 2.5
null
2008-08-27T12:43:03.443
2008-08-27T12:43:03.443
null
null
2,974
null
29,990
2
null
29,555
0
null
Have a look at [FLTK](http://fltk.org/index.php) which supports X11 and Windows.
null
CC BY-SA 2.5
null
2008-08-27T12:41:01.747
2008-08-27T12:41:01.747
null
null
842
null
29,993
1
null
null
0
516
Does anybody know (or know of a resource that contains) a list of frame start codes for common video formats (MPEG-1/2/4, .wmv, .mov etc.). For example, an MPEG-1 video frame will (I think) always start with "00 00 01 00". In essence I'd like to know these so that I could write a program that can automatically find ...
Video Codec startcodes
CC BY-SA 3.0
null
2008-08-27T12:46:12.140
2015-05-31T06:00:15.077
2015-05-31T06:00:15.077
3,160,747
142
[ "video", "codec" ]
29,995
1
30,051
null
7
4,089
I want to practice my skills away from a keyboard (i.e. pen and paper) and I'm after simple practice questions like Fizz Buzz, Print the first N primes. What are your favourite simple programming questions?
Simple programming practice (Fizz Buzz, Print Primes)
CC BY-SA 2.5
0
2008-08-27T12:46:52.607
2018-07-13T12:13:08.593
2008-08-27T12:50:54.080
1,912
1,736
[ "language-agnostic" ]
29,999
2
null
29,995
1
null
Towers of Hannoi is great for practice on recursion. I'd also do a search on sample programming interview questions.
null
CC BY-SA 2.5
null
2008-08-27T12:49:35.860
2008-08-27T13:18:01.643
2008-08-27T13:18:01.643
3,018
3,018
null
29,997
2
null
29,988
1
null
If the program has to email you directly, it has to get that information somehow, so a determined attacker could gain that information as well. Have you considered hosting a simple http form or web service somewhere, so that you could post the information you need there from the application (no authentication required...
null
CC BY-SA 2.5
null
2008-08-27T12:47:56.567
2008-08-27T12:47:56.567
null
null
96
null
30,002
2
null
29,988
7
null
I would create a webservice to connect to. This webservice should send the email based on the data your program provide. All sensitive access-data is kept on the webservice side, so it's safer.
null
CC BY-SA 2.5
null
2008-08-27T12:50:48.463
2008-08-27T12:50:48.463
null
null
968
null
29,998
2
null
29,995
6
null
Insert + or - sign anywhere between the digits 123456789 in such a way that the expression evaluates to 100. The condition is that the order of the digits must not be changed. e.g.: 1 + 2 + 3 - 4 + 5 + 6 + 78 + 9 = 100 Write a program in your favorite language which outputs all possible solutions of the above probl...
null
CC BY-SA 2.5
null
2008-08-27T12:49:14.427
2008-08-27T13:10:58.447
2008-08-27T13:10:58.447
184
184
null
30,001
2
null
29,988
8
null
As long as your account is on gmail.com, set up as the outgoing SMTP-server in your program. You do not need to provide a password to send email to gmail-accounts when using that server.
null
CC BY-SA 2.5
null
2008-08-27T12:50:09.120
2008-08-27T12:50:09.120
null
null
2,257
null
30,005
1
32,878
null
99
187,063
I have to load a PDF within a page. Ideally I would like to have a loading animated gif which is replaced once the PDF has loaded.
How do I fire an event when a iframe has finished loading in jQuery?
CC BY-SA 3.0
0
2008-08-27T12:52:29.927
2021-07-20T09:20:30.853
2011-12-12T04:07:51.090
31,671
3,168
[ "javascript", "jquery" ]
30,006
2
null
29,988
0
null
I think the best plan would be to submit the error information to some service (in the simple case, a web form) running under your control, which could then send an email (or log it in some other appropriate way). If sending the email is assumed to be of benefit to the end user, another option would be to have the use...
null
CC BY-SA 2.5
null
2008-08-27T12:53:10.657
2008-08-27T12:53:10.657
null
null
797
null