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
38,381
2
null
38,362
2
null
I've had the same problem, and built a tool on top of Subversion that adds permission, ownership and secontext tracking, keeps the .svn directories out of the actually versioned trees, and adds a concept of layers so you can for example track all your config related to development, which you then only check out on mach...
null
CC BY-SA 2.5
null
2008-09-01T20:25:04.870
2008-09-01T20:25:04.870
null
null
2,900
null
38,329
2
null
38,323
6
null
Hyper-V works quite well and even supports Linux VM's. The main advantage is that if you are already running Windows server 2008 it comes along for free whereas you have to pay for VMWare separately. I think that VM ware provides better system management tools, but that isn't really a big benefit in this particular cas...
null
CC BY-SA 2.5
null
2008-09-01T19:36:10.977
2008-09-01T19:36:10.977
null
null
2,925
null
38,385
2
null
38,370
0
null
Do session variables work if you hit [http://www.myIsv.com/myWebSite/](http://www.myIsv.com/myWebSite/) directly? It would seem to me that the server config would dictate whether or not sessions will work. However, if you're starting a session on www.mysmallwebsite.com somehow (doesn't look like you're using PHP, but...
null
CC BY-SA 2.5
null
2008-09-01T20:27:10.340
2008-09-01T20:27:10.340
null
null
72
null
38,382
2
null
38,370
0
null
What do you mean? Are you saying that when you go from www.mysmallwebsite.com to www.myIsv.com/myWebSite/ then the PHP session is lost? PHP recognizes the session with an ID (alpha-numeric hash generated on the server). The ID is passed from request to request using a cookie called PHPSESSID or something like that (yo...
null
CC BY-SA 2.5
null
2008-09-01T20:26:20.903
2008-09-01T20:26:20.903
null
null
3,280
null
38,386
2
null
34,687
33
null
The prompt you're getting doesn't look like Subversion asking you for a password, it looks like ssh asking for a password. So my guess is that you have checked out an svn+ssh:// checkout, not an svn:// or http:// or https:// checkout. IIRC all the options you're trying only work for the svn/http/https checkouts. Can...
null
CC BY-SA 2.5
null
2008-09-01T20:29:02.970
2008-09-01T20:29:02.970
null
null
2,900
null
38,390
2
null
38,370
0
null
Stick a session_start() at the beginning of your script and see if you can access the variables again.
null
CC BY-SA 2.5
null
2008-09-01T20:34:41.977
2008-09-01T20:34:41.977
null
null
2,016
null
38,394
2
null
38,370
0
null
It's not working because on the client sessions are per-domain. All the cookies are being saved for mysmallwebsite.com, so myIsv.com cannot access them.
null
CC BY-SA 2.5
null
2008-09-01T20:36:21.783
2008-09-01T20:36:21.783
null
null
26
null
38,389
2
null
588
10
null
I can't recommend Dmitry Streblechenko's [Redemption Data Objects](http://www.dimastr.com/redemption/rdo_introduction.htm) library highly enough. It's a COM component that provides a sane API to Extended MAPI and is a joy to use. The Exchange API goalposts move from one release to the next: “Use the M: drive! No, use W...
null
CC BY-SA 3.0
null
2008-09-01T20:33:44.037
2016-03-27T01:02:05.267
2016-03-27T01:02:05.267
332,059
1,278
null
38,395
2
null
38,370
0
null
@pix0r www.myIsv.com/myWebSite/ -> session variable work www.mysmallwebsite.com -> session variable doesn't work @Alexandru Unfortunately this is not on the same webserver
null
CC BY-SA 2.5
null
2008-09-01T20:36:44.390
2008-09-01T20:36:44.390
null
null
1,578
null
38,392
2
null
38,336
2
null
Well, this is a hard question. There are generally 3 fonts that are in some form or other always supported. These fonts are Adobe Times, Adobe Helvetica, and Adobe Courier. The problem is that while every system and foundry have a clone of these, they have different names. They are also not entirely the same, but have...
null
CC BY-SA 2.5
null
2008-09-01T20:35:04.830
2008-09-01T20:35:04.830
null
null
4,100
null
38,370
1
38,924
null
6
3,574
I've to admin a small website for my alumni group which is hosted by my ISV. The url is something like www.myIsv.com/myWebSite/ which is quite ugly and very forgetable. The main admin of the webserver has registered a domain name www.mysmallwebsite.com and put a index.html with this content: ``` <html> <head> <title>w...
PHP : session variable aren't usable when site is redirected
CC BY-SA 3.0
null
2008-09-01T20:17:28.443
2015-06-05T17:16:14.680
2015-06-05T17:16:14.680
4,248,328
1,578
[ "php", "session", "session-variables" ]
38,399
2
null
23,930
1
null
# C: One liner, procedural ``` int f(int n) { for (int i = n - 1; i > 0; n *= i, i--); return n ? n : 1; } ``` I used int's for brevity; use other types to support larger numbers.
null
CC BY-SA 2.5
null
2008-09-01T20:39:57.767
2008-09-02T01:10:45.633
2008-09-02T01:10:45.633
3,561
3,561
null
38,403
2
null
38,308
1
null
Normally you would do this with a 3x3 Matrix, but the Matrix class only lets you specify 6 values instead of 9. You might be able to do this in Direct X.
null
CC BY-SA 2.5
null
2008-09-01T20:42:51.457
2008-09-01T20:42:51.457
null
null
4,066
null
38,397
2
null
38,370
0
null
What browser/ ad-on do you have? it may be your browser or some other software (may be even the web server) is blocking the sessions from [http://www.myIsv.com/myWebSite/](http://www.myIsv.com/myWebSite/) working from with-in the frame, as its located on a different site, thinking its an XSS attack. If the session wor...
null
CC BY-SA 2.5
null
2008-09-01T20:38:19.843
2008-09-01T20:46:25.193
2008-09-01T20:46:25.193
2,098
2,098
null
38,393
2
null
38,362
0
null
Here's a Mozilla developer that's tried to do this: [Version controlling my home dir](http://www.silfreed.net/blog/2008/07/Version-controlling-my-home-dir), there's a couple of suggestions in the comments.
null
CC BY-SA 2.5
null
2008-09-01T20:35:13.457
2008-09-01T20:35:13.457
null
null
2,541
null
38,402
2
null
38,235
2
null
The load time and the memory utilization are still the two weakest points in IronRuby. Once a particular piece of code has been loaded and is running in a sort of steady-state mode -- that is, little to no new source is being evaluated -- then the performance should be quite good. To answer your specific question, co...
null
CC BY-SA 2.5
null
2008-09-01T20:41:44.250
2008-09-01T20:41:44.250
null
null
533
null
38,396
2
null
38,295
4
null
There are a number of solutions. 1. For GDI+, check out this article at MSDN (HOW TO: Use GDI+ and Image Color Management to Adjust Image Colors). 2. For WPF (.NET 3.0), see the System.Windows.Media namespace. There are a number of different classes, such as the BitmapEncoder, that have the concept of a ColorContext, ...
null
CC BY-SA 4.0
null
2008-09-01T20:37:04.840
2022-09-28T14:54:02.327
2022-09-28T14:54:02.327
136,285
null
null
38,383
2
null
4,508
8
null
Have a separate helper EXE that takes command-line params (or pipe to its StandardInput) that does what is required and call that from your main app. This keeps the MAPI stuff outside of your main app's process space. OK, you're still mixing MAPI and .NET but in a very short-lived process. The assumption is that MAPI a...
null
CC BY-SA 2.5
null
2008-09-01T20:26:46.720
2008-09-01T20:26:46.720
null
null
1,278
null
38,406
2
null
38,039
13
null
Let's combine the culture-safe answer and the extension method answer: ``` public static class DateTimeExtensions { public static DateTime StartOfWeek(this DateTime dt, DayOfWeek startOfWeek) { System.Globalization.CultureInfo ci = System.Threading.Thread.CurrentThread.CurrentCulture; DayOfWeek...
null
CC BY-SA 2.5
null
2008-09-01T20:43:35.557
2008-09-01T20:43:35.557
null
null
3,043
null
38,407
2
null
37,564
1
null
If your pages are "updatable," they must be compiled before use. That means, yes, on first request the assemblies are loaded, compiled, and made ready for accessing. Whenever these files are changed (even some virus software can trigger this by changing the modified date of the files!), the appdomain gets recycled. ...
null
CC BY-SA 2.5
null
2008-09-01T20:44:33.963
2008-09-01T20:44:33.963
null
null
null
null
38,408
1
38,529
null
5
3,526
I'm using Flash to play an .flv movieclip on my site, but I want to have the .swf send trigger an event in my javascript when it start loading, starts playing and ends playing. What is the best way to do that in Flash CS3 using Actionscript 3.0 ?
How can I make flash cs3, actionscript send events to javascript?
CC BY-SA 2.5
0
2008-09-01T20:44:37.723
2009-02-25T15:47:10.160
null
null
4,112
[ "javascript", "flash", "actionscript" ]
38,384
2
null
38,235
2
null
According to this article [http://www.iunknown.com/2008/05/ironruby-and-rails.html](http://www.iunknown.com/2008/05/ironruby-and-rails.html). In may performance was nowhere near where they expected it to be. I heard in [http://altnetpodcast.com/episodes/9-state-of-ironruby](http://altnetpodcast.com/episodes/9-state-of-...
null
CC BY-SA 2.5
null
2008-09-01T20:27:03.680
2008-09-01T20:27:03.680
null
null
3,320
null
38,409
1
40,849
null
9
10,348
I would like to convert the following string into an array/nested array: ``` str = "[[this, is],[a, nested],[array]]" newarray = # this is what I need help with! newarray.inspect # => [['this','is'],['a','nested'],['array']] ```
How do I convert a Ruby string with brackets to an array?
CC BY-SA 2.5
0
2008-09-01T20:44:47.007
2008-09-18T02:55:35.153
2008-09-01T20:50:25.963
615
4,082
[ "ruby", "arrays" ]
38,415
2
null
38,378
1
null
[Here's a great thread](http://silverlight.net/forums/t/1730.aspx) about serializing and deserializing objects in Silverlight 1.1. As for a "best way," I'd say it would definitely be caching the xaml for the control and calling createFromXaml on it.
null
CC BY-SA 2.5
null
2008-09-01T20:53:54.160
2008-09-01T20:53:54.160
null
null
null
null
38,416
2
null
37,665
1
null
A more modern version of this is to use: ``` #pragma once ``` It is quite unusual to see this in a .c file, normally it is in the header files only.
null
CC BY-SA 2.5
null
2008-09-01T20:54:05.097
2008-09-01T20:54:05.097
null
null
3,146
null
38,417
2
null
38,370
0
null
> So when you place the html link to the ugly domain name, assuming that it is the same PHP server (with the same sessions initialized), you can put it like this ...`www.myIsv.com/myWebSite/?PHPSESSID=<?=session_id()?>` From a security point of view, I really really really hope that doesn't work
null
CC BY-SA 2.5
null
2008-09-01T20:54:32.990
2008-09-01T20:54:32.990
2020-06-20T09:12:55.060
-1
234
null
38,423
2
null
23,930
10
null
# BASIC: old school ``` 10 HOME 20 INPUT N 30 LET ANS = 1 40 FOR I = 1 TO N 50 ANS = ANS * I 60 NEXT I 70 PRINT ANS ```
null
CC BY-SA 2.5
null
2008-09-01T20:58:20.453
2008-09-01T20:58:20.453
null
null
3,561
null
38,413
2
null
38,037
11
null
Althoug the documentation is poor on this topic, I managed to get some working code by looking at the source. Although it is missing the xml header which normally contains important information. Here is a small example program that does what you are looking for using rapidxml: ``` #include <iostream> #include <sstream...
null
CC BY-SA 2.5
null
2008-09-01T20:52:45.223
2008-09-01T20:52:45.223
null
null
4,059
null
38,426
2
null
38,336
3
null
Most OS'es have support for Microsoft's [Core Fonts For the Web](http://en.wikipedia.org/wiki/Core_fonts_for_the_Web). They all come bundled with OSX, and I'm reasonably sure they'll work (or have near-identical variants) on most any linux distro. [The Microsoft Typography page is also pretty cool](http://www.microsof...
null
CC BY-SA 2.5
null
2008-09-01T20:59:12.447
2008-09-01T20:59:12.447
null
null
234
null
38,275
2
null
38,190
14
null
Cool, thank you Mark, I had forgotten that CreateFile opens things too. I was looking at the volume management API and not seeing how to open things. Here is a little class that wraps things up. It might also be possible/correct to just pass the SafeFileHandle into a FileStream. ``` using System; using System.Run...
null
CC BY-SA 2.5
null
2008-09-01T18:44:44.640
2008-09-01T21:44:50.793
2008-09-01T21:44:50.793
1,834
1,834
null
38,427
1
null
null
4
314
I'm currently working on a quite large library (5M lines of code, in C++ under VS2005, 1 solution and close to 100 projects). Even though we distribute compilation, and use incremental linking, recompilation and relinking after small source modifications takes between a few minutes (usually at least 3) and close to one...
Tips for working in a large library?
CC BY-SA 2.5
null
2008-09-01T21:00:01.760
2012-05-17T08:15:05.373
2012-05-17T08:15:05.373
21,234
2,638
[ "project-management" ]
38,419
2
null
308
9
null
Take a look at the oracle package DBMS_METADATA. In particular, the following methods are particularly useful: - `DBMS_METADATA.GET_DDL`- `DBMS_METADATA.SET_TRANSFORM_PARAM`- `DBMS_METADATA.GET_GRANTED_DDL` Once you are familiar with how they work (pretty self explanatory) you can write a simple script to dump the...
null
CC BY-SA 3.0
null
2008-09-01T20:57:01.673
2016-12-20T05:32:42.267
2016-12-20T05:32:42.267
1,997,093
4,082
null
38,433
2
null
38,181
75
null
Rule of thumb: If the function you are testing needs a complicated object as a parameter, and it would be a pain to simply instantiate this object (if, for example it tries to establish a TCP connection), use a mock.
null
CC BY-SA 3.0
null
2008-09-01T21:04:38.550
2014-03-06T02:57:12.467
2014-03-06T02:57:12.467
234
234
null
38,434
2
null
37,029
-1
null
The 'Best Practice' of avoiding cursors in SQL Server dates back to SQL Server 2000 and earlier versions. The rewrite of the engine in SQL 2005 addressed most of the issues related to the problems of cursors, particularly with the introduction of the fast forward option. Cursors are not neccessarily worse than set-ba...
null
CC BY-SA 2.5
null
2008-09-01T21:05:26.830
2008-09-01T21:05:26.830
null
null
3,893
null
38,436
2
null
38,352
1
null
I'm aware of SQLite, but that doesn't really help - I'm talking about figuring out the best schema (regardless of the database) for storing this data.
null
CC BY-SA 2.5
null
2008-09-01T21:09:01.423
2008-09-01T21:09:01.423
null
null
521
null
38,425
2
null
34,571
36
null
Having tried Cem Catikkas' [solution using reflection](https://stackoverflow.com/questions/34571/whats-the-best-way-of-unit-testing-private-methods#34658) for Java, I'd have to say his was a more elegant solution than I have described here. However, if you're looking for an alternative to using reflection, and have acc...
null
CC BY-SA 3.0
null
2008-09-01T20:58:47.270
2017-12-14T12:22:32.363
2017-12-14T12:22:32.363
545,127
4,120
null
38,410
2
null
35,007
56
null
How you expose a collection depends entirely on how users are intended to interact with it. If users will be adding and removing items from an object's collection, then a simple get-only collection property is best (option #1 from the original question): ``` private readonly Collection<T> myCollection_ = new ...; pu...
null
CC BY-SA 2.5
null
2008-09-01T20:46:35.923
2011-01-11T10:04:32.030
2017-05-23T12:17:52.443
-1
2,495
null
38,437
1
38,453
null
47
83,972
What is the best way to track changes in a database table? Imagine you got an application in which users (in the context of the application not DB users ) are able to change data which are store in some database table. What's the best way to track a history of all changes, so that you can show which user at what time ...
How to track data changes in a database table
CC BY-SA 3.0
0
2008-09-01T21:10:14.340
2017-05-25T14:15:45.360
2013-05-03T10:48:43.150
859,891
3,711
[ "database" ]
38,444
2
null
38,421
5
null
Use sessions to ensure that any Ajax posts are done in an authenticated context. Think of your Ajax code as just another client to your server, it becomes easier to tackle authentication issues that way.
null
CC BY-SA 2.5
null
2008-09-01T21:15:59.037
2008-09-01T21:15:59.037
null
null
1,467
null
38,431
1
null
null
2
487
Using MVC out of the box I found the generated URLs can be misleading and I wanted to know if this can be fixed or if my approach/understanding is wrong. Suppose I have a CreateEgg page, which has a form on it, and once the form is filled in and submitted the user is taken to a ListEggs page with the new egg in it. S...
ASP.NET MVC - How do action names affect the url?
CC BY-SA 2.5
0
2008-09-01T21:01:44.797
2019-03-19T10:24:41.880
2019-03-19T10:24:41.880
9,020,340
230
[ "c#", "asp.net-mvc" ]
38,440
2
null
38,428
0
null
If you have several options that follow this layout, why not create a user control? The user control will contain the CheckBox, a NumericUpDown, a ComboBox and a label for the "after loading". You can override OnFontChanged to adjust the location of the controls based on the rendering of the text with the given font....
null
CC BY-SA 2.5
null
2008-09-01T21:13:01.993
2008-09-01T21:13:01.993
null
null
3,123
null
38,435
1
38,718
null
3
2,067
Given an Oracle table created using the following: ``` CREATE TABLE Log(WhenAdded TIMESTAMP(6) WITH TIME ZONE); ``` Using the Python ODBC module from its [Win32 extensions](http://www.python.org/download/windows/) (from the win32all package), I tried the following: ``` import dbi, odbc connection = odbc.odbc("Driv...
Retrieving an Oracle timestamp using Python's Win32 ODBC module
CC BY-SA 2.5
null
2008-09-01T21:06:07.517
2011-04-01T04:18:59.070
2011-04-01T04:18:59.070
135,152
2,193
[ "python", "oracle", "ora-00932" ]
38,442
2
null
38,435
1
null
My solution to this, that I hope can be bettered, is to use Oracle to explicitly convert the TIMESTAMP into a string: ``` cursor.execute("SELECT TO_CHAR(WhenAdded, 'YYYY-MM-DD HH:MI:SSAM') FROM Log") ``` This works, but isn't portable. I'd like to use the same Python script against a SQL Server database, so an Oracl...
null
CC BY-SA 2.5
null
2008-09-01T21:14:43.110
2008-09-01T21:14:43.110
null
null
2,193
null
38,452
2
null
38,431
4
null
The problem is your action does two things, violating the Single Responsibility Principle. If your Create action redirects to the List action when it's done creating the item, then this problem disappears.
null
CC BY-SA 2.5
null
2008-09-01T21:19:48.030
2008-09-01T21:19:48.030
null
null
1,554
null
38,451
2
null
38,437
1
null
A trace log in a separate table (with an ID column, possibly with timestamps)? Are you going to want to undo the changes as well - perhaps pre-create the undo statement (a DELETE for every INSERT, an (un-) UPDATE for every normal UPDATE) and save that in the trace?
null
CC BY-SA 2.5
null
2008-09-01T21:19:28.530
2008-09-01T21:19:28.530
null
null
2,902
null
38,447
1
66,560,184
null
21
12,999
Do any asynchronous connectors exist for Mysql that can be used within a C or C++ application? I'm looking for something that can be plugged into a [reactor pattern](http://en.wikipedia.org/wiki/Reactor_pattern) written in [Boost.Asio](http://www.boost.org/doc/libs/release/libs/asio/index.html). [Edit:] Running a sync...
Asynchronous Mysql connector
CC BY-SA 3.0
0
2008-09-01T21:17:07.473
2021-03-10T07:31:04.210
2015-10-06T09:26:11.330
584,518
4,059
[ "c++", "mysql", "c", "asynchronous", "boost-asio" ]
38,449
2
null
38,437
9
null
You've got a few issues here that don't relate well to each other. At the basic database level you can track changes by having a separate table that gets an entry added to it via triggers on INSERT/UPDATE/DELETE statements. Thats the general way of tracking changes to a database table. The other thing you want is to ...
null
CC BY-SA 2.5
null
2008-09-01T21:17:31.187
2008-09-01T21:17:31.187
null
null
163
null
38,445
2
null
38,302
2
null
What is your static memory manager actually doing? Unless it is doing something unsafe (P/Invoke, unsafe code), the behaviour you are seeing is a bug in your program, and not due to the behaviour of the CLR. Secondly, what do you mean by 'pointer', with respect to links between structures? Do you literally mean an uns...
null
CC BY-SA 2.5
null
2008-09-01T21:16:14.810
2008-09-01T21:16:14.810
null
null
3,712
null
38,446
2
null
38,421
28
null
Any request that the AJAX calls in your pages can make can also be made by someone outside of the application. If done right, you will not be able to tell if they were made as part of an AJAX call from your webapp or by hand/other means. There are two scenarios I can think of which you might be talking about when you...
null
CC BY-SA 2.5
null
2008-09-01T21:16:52.590
2008-09-01T21:16:52.590
null
null
2,168
null
38,421
1
38,446
null
21
13,965
I'm using jquery ajax to post updates back to my server. I'm concerned about making sure I have put in place appropriate measures so that only my AJAX calls can post data. My stack is PHP on Apache against a MySQL backend. Advice greatly appreciated!
Security advice for jquery ajax data post?
CC BY-SA 2.5
0
2008-09-01T20:57:12.093
2010-10-21T07:21:52.813
null
null
2,362
[ "jquery", "ajax", "security", "post" ]
38,454
2
null
37,029
20
null
While a fast forward cursor does have some optimizations in Sql Server 2005, it is true that they are anywhere close to a set based query in terms of performance. There are very few situations where cursor logic cannot be replaced by a set-based query. Cursors will always be inherently slower, due in part to the fac...
null
CC BY-SA 2.5
null
2008-09-01T21:20:24.893
2008-09-01T21:20:24.893
2018-11-13T23:03:38.217
-1
1,219
null
38,462
2
null
38,427
0
null
@Domenic: indeed, it would be a good thing... However, a whole team's been at it for some time now, and until they succeed we are stuck with a single .dll and something quite monolithic :-(
null
CC BY-SA 2.5
null
2008-09-01T21:27:35.327
2008-09-01T21:27:35.327
null
null
2,638
null
38,453
2
null
38,437
12
null
In general, if your application is structured into layers, have the data access tier call a stored procedure on your database server to write a log of the database changes. In languages that support such a thing [aspect-oriented programming](http://en.wikipedia.org/wiki/Aspect-oriented_programming) can be a good techn...
null
CC BY-SA 2.5
null
2008-09-01T21:19:50.400
2008-09-01T21:19:50.400
null
null
3,546
null
38,455
2
null
38,427
1
null
I don't know much about development at that level, but... it seems like it would be a good idea to separate into multiple solutions. You could have a final "pre-ship" step that consolidates them all into a single .dll if you/your customers really insist. Compare, e.g., to the .NET Framework where we have lots of diffe...
null
CC BY-SA 2.5
null
2008-09-01T21:22:10.723
2008-09-01T21:22:10.723
null
null
3,191
null
38,463
1
null
null
6
2,013
Are people still writing [SOAP services](http://zeroc.com/blogs/michi/) or is it a technology that has passed its [architectural shelf life](http://www.addsimplicity.com/)? Are people returning to binary formats?
Is SOAP now a legacy technology?
CC BY-SA 2.5
0
2008-09-01T21:28:11.503
2011-07-07T17:28:41.137
null
null
3,305
[ "soap", "rpc" ]
38,471
2
null
38,352
3
null
Why would complete normalization "be a mess"? This is exactly the kind of thing that normalization makes less messy.
null
CC BY-SA 2.5
null
2008-09-01T21:36:57.473
2008-09-01T21:42:27.710
2008-09-01T21:42:27.710
2,168
2,168
null
38,467
2
null
37,471
0
null
OK this is an attempt to finish the proof of correctness. By analogy to the Reverse-delete algorithm, we know that enough edges will be removed. What remains is to show that there will not be to many edges removed. Removing to many edges can be described as removing all the edges between the side of a binary partitio...
null
CC BY-SA 2.5
null
2008-09-01T21:33:42.067
2008-09-01T21:33:42.067
null
null
1,343
null
38,470
2
null
16,897
8
null
In the distant past (before I started working for CodeGear) I gave up on the odd Delphi-ized IDL language that the IDE presented, and wrote my own IDL and compiled it using MS midl. This largely worked; the only catch, IIRC, was making sure dispids (id attribute) were correct on automation interfaces (dispinterfaces) f...
null
CC BY-SA 2.5
null
2008-09-01T21:36:52.857
2008-09-01T21:36:52.857
null
null
3,712
null
38,458
2
null
38,437
6
null
One method I've seen quite often is to have audit tables. Then you can show just what's changed, what's changed and what it changed from, or whatever you heart desires :) Then you could write up a trigger to do the actual logging. Not too painful if done properly... No matter how you do it, though, it kind of depend...
null
CC BY-SA 2.5
null
2008-09-01T21:24:12.450
2008-09-01T21:24:12.450
null
null
3,743
null
38,475
2
null
26,843
1
null
I have about 50 web sites running perl/apache/mysql and about 10 running C#/ASP.Net/SQL Server (Lite) and other (large) applications running on SQL Server (Heavy). I never have problems with SQL Server - it just works. I often have problems with MySQL. My advice would be to go for the SQL Server based option even if y...
null
CC BY-SA 2.5
null
2008-09-01T21:43:09.127
2008-09-01T21:43:09.127
null
null
3,010
null
38,480
2
null
36,567
2
null
While studying for my degree, my dissertation project was the creation of a Java based modular synthesizer, and the University at which I studied saw fit to make my report publicly available: [A Software Based Modular Synthesiser in Java](http://www.dcs.shef.ac.uk/intranet/teaching/projects/archive/ug2004/pdf/u1nh.pdf...
null
CC BY-SA 2.5
null
2008-09-01T21:45:56.437
2008-09-01T21:45:56.437
null
null
3,187
null
38,481
2
null
438
5
null
Note that you don't want to persist their session, just their identity. You'll create a fresh session for them when they return to your site. Generally you just assign a GUID to the user, write that to their cookie, then use it to look them up when they come back. Don't use their login name or user ID for the token ...
null
CC BY-SA 2.5
null
2008-09-01T21:46:46.840
2008-09-01T21:46:46.840
null
null
4,061
null
38,477
2
null
38,409
0
null
Looks like a basic parsing task. Generally the approach you are going to want to take is to create a recursive function with the following general algorithm ``` base case (input doesn't begin with '[') return the input recursive case: split the input on ',' (you will need to find commas only at this level) for...
null
CC BY-SA 2.5
null
2008-09-01T21:44:01.620
2008-09-01T21:44:01.620
null
null
2,925
null
38,484
2
null
23,930
6
null
# Java 1.6: recursive, memoized (for subsequent calls) ``` private static Map<BigInteger, BigInteger> _results = new HashMap() public static BigInteger factorial(BigInteger n){ if (0 >= n.compareTo(BigInteger.ONE)) return BigInteger.ONE.max(n); if (_results.containsKey(n)) return _results.get(...
null
CC BY-SA 2.5
null
2008-09-01T21:48:51.203
2008-09-01T21:48:51.203
2020-06-20T09:12:55.060
-1
3,446
null
38,474
2
null
36,127
5
null
> "Are there any VC++ settings I should know about" Make sure you turn off Frame pointer ommision. Larry osterman's blog has [the historical details](http://blogs.msdn.com/larryosterman/archive/2007/03/12/fpo.aspx) about fpo and the issues it causes with debugging. > Symbols are loaded successfully. It shows the cal...
null
CC BY-SA 2.5
null
2008-09-01T21:41:59.600
2008-09-02T04:10:10.943
2008-09-02T04:10:10.943
3,892
3,892
null
38,483
2
null
38,409
0
null
Make a recursive function that takes the string and an integer offset, and "reads" out an array. That is, have it return an array or string (that it has read) and an integer offset pointing after the array. For example: ``` s = "[[this, is],[a, nested],[array]]" yourFunc(s, 1) # returns ['this', 'is'] and 11. yourF...
null
CC BY-SA 2.5
null
2008-09-01T21:47:52.407
2008-09-01T21:47:52.407
null
null
3,868
null
38,502
1
38,517
null
76
95,305
Say you want a simple maze on an N by M grid, with one path through, and a good number of dead ends, but that looks "right" (i.e. like someone made it by hand without too many little tiny dead ends and all that). Is there a known way to do this?
What's a good algorithm to generate a maze?
CC BY-SA 2.5
0
2008-09-01T21:57:45.490
2021-05-12T03:00:19.090
null
null
4,123
[ "algorithm", "maze" ]
38,497
2
null
38,357
23
null
You should look at the `<Framework/FrameworkErrors.h>` header for whatever framework the method you're using that's returning an error comes from. For example, an `NSError` in the Cocoa domain that you get from a method in the Foundation framework will have its `code` property described in the `<Foundation/FoundationE...
null
CC BY-SA 2.5
null
2008-09-01T21:54:46.823
2008-09-01T21:54:46.823
null
null
714
null
38,465
2
null
38,463
7
null
The alternative to SOAP is not binary formats. I think you're seeing a surge in the desire to leave the complexities of WS-* behind in favor of REST and JSON, because they're much simpler to use and don't require frameworks to be used successfully. The problems that WS-* ostensibly tries to solve aren't problems for m...
null
CC BY-SA 2.5
null
2008-09-01T21:30:45.570
2008-09-01T21:30:45.570
null
null
1,554
null
38,487
2
null
38,463
5
null
I still write WS-*–based services. Somewhat surprisingly, I've had less trouble with them when trying to inter-operate with less capable developers. This is because if I send them a WSDL file, they know how to crank it through their tool and get an API they can call, while being blissfully unaware what is happening und...
null
CC BY-SA 2.5
null
2008-09-01T21:49:11.453
2008-09-01T21:49:11.453
null
null
3,474
null
38,508
1
38,516
null
78
80,179
I have a function where I need to do something to a string. I need the function to return a boolean indicating whether or not the operation succeeded, and I also need to return the modified string. In C#, I would use an out parameter for the string, but there is no equivalent in Python. I'm still very new to Pytho...
What's the best way to return multiple values from a function?
CC BY-SA 4.0
0
2008-09-01T22:01:02.143
2021-03-01T19:34:58.180
2021-03-01T19:34:58.180
355,230
3,880
[ "python", "variables", "return" ]
38,507
2
null
38,502
6
null
Strangely enough, by slightly changing the 'canonical' rules and starting from a random configuration, [Conway's Game of Life](http://en.wikipedia.org/wiki/Conway's_Game_of_Life) seems to generate pretty nice mazes! (I don't remember the exact rule, but it's a very simple modification that tends to 'densify' the popul...
null
CC BY-SA 3.0
null
2008-09-01T22:00:57.620
2016-07-27T20:41:00.457
2016-07-27T20:41:00.457
1,726,032
2,638
null
38,513
2
null
38,508
7
null
Returning a tuple is the usual way to do this in Python.
null
CC BY-SA 2.5
null
2008-09-01T22:03:17.223
2008-09-01T22:03:17.223
null
null
2,600
null
38,494
2
null
8,042
9
null
I think the judicious use of extension methods put interfaces on a more equatable position with (abstract) base classes. One advantage base classes have over interfaces is that you can easily add new virtual members in a later version, whereas adding members to an interface will break implementers built against the ...
null
CC BY-SA 3.0
null
2008-09-01T21:52:48.700
2016-04-25T08:51:32.100
2016-04-25T08:51:32.100
372,179
2,495
null
38,514
2
null
38,508
17
null
Return a tuple. ``` def f(x): # do stuff return (True, modified_string) success, modified_string = f(something) ```
null
CC BY-SA 2.5
null
2008-09-01T22:03:41.433
2008-09-01T22:03:41.433
null
null
3,694
null
38,501
1
40,291
null
11
2,717
I'm trying to come up with a design for a thread pool with a lot of design requirements for my job. This is a real problem for working software, and it's a difficult task. I have a working implementation but I'd like to throw this out to SO and see what interesting ideas people can come up with, so that I can compare ...
Thread pool for executing arbitrary tasks with different priorities
CC BY-SA 2.5
0
2008-09-01T21:57:16.347
2017-11-07T16:31:06.303
2008-09-01T22:23:37.080
3,146
3,146
[ "c++", "windows", "multithreading" ]
38,510
1
38,532
null
3
4,127
I'm just getting dirty in WinForms, and I've discovered, through a lovely tutorial, the magic of dragging a database table onto the design view of my main form. So, all is lovely, I've got my DataGridView with all of the columns represented beautifully. BUT... When I run my application against this brand new, empty ....
C# WinForms - DataGridView/SQL Compact - Negative integer in primary key column
CC BY-SA 2.5
null
2008-09-01T22:01:25.993
2012-12-20T15:18:41.210
2008-09-15T07:44:18.150
4,872
1,344
[ "c#", "sql-server", "winforms", "data-binding", "sql-server-ce" ]
38,515
2
null
38,408
4
null
A common way to do this is with the class, which you can use to call JavaScript methods. First define your JavaScript methods, for example: ``` <script language="JavaScript"> function startsPlaying() { // do something when the FLV starts playing } </script> ``` Then modify your ActionScript to ...
null
CC BY-SA 2.5
null
2008-09-01T22:03:45.117
2008-09-01T22:03:45.117
null
null
2,783
null
38,516
2
null
38,508
136
null
``` def f(in_str): out_str = in_str.upper() return True, out_str # Creates tuple automatically succeeded, b = f("a") # Automatic tuple unpacking ```
null
CC BY-SA 3.0
null
2008-09-01T22:04:02.510
2014-01-12T06:21:30.130
2014-01-12T06:21:30.130
2,491
3,560
null
38,517
2
null
38,502
48
null
From [http://www.astrolog.org/labyrnth/algrithm.htm](http://www.astrolog.org/labyrnth/algrithm.htm) > Recursive backtracker: This is somewhat related to the recursive backtracker solving method described below, and requires stack up to the size of the Maze. When carving, be as greedy as possible, and always carve into...
null
CC BY-SA 4.0
null
2008-09-01T22:04:39.747
2018-12-28T07:39:38.520
2018-12-28T07:39:38.520
4,751,173
3,694
null
38,512
2
null
38,026
3
null
There used to be some relatively cheap developers network which we used to belong to before the Novell questions all whithered and died away (famous last words, now I bet we will get one tomorrow), there is never any substitute for having the software / hardware, the only alternative is to write a test program and get ...
null
CC BY-SA 2.5
null
2008-09-01T22:03:11.233
2008-09-01T22:03:11.233
null
null
4,125
null
38,521
2
null
36,077
1
null
In native code you can get a shot at walking the callstack by installing a [Vectored Exception handler](http://msdn.microsoft.com/en-us/library/ms681420.aspx). VC++ implements C++ exceptions on top of SEH exceptions and a vectored exception handler is given first shot before any frame based handlers. However be reall...
null
CC BY-SA 2.5
null
2008-09-01T22:07:04.123
2008-09-01T22:07:04.123
null
null
3,892
null
38,522
2
null
38,463
3
null
I think so. RESTful solutions are more and more sensible for the vast majority of use cases; the complexities of SOAP and other RPC technologies just aren't worth the effort anymore.
null
CC BY-SA 2.5
null
2008-09-01T22:07:33.907
2008-09-01T22:07:33.907
null
null
1,467
null
38,504
2
null
38,501
1
null
> It needs to run on Windows XP, Server 2003, Vista and Server 2008 (latest service packs). What feature of the system's built-in thread pools make them unsuitable for your task? If you want to target XP and 2003 you can't use the new shiny Vista/2008 pools, but you can still use QueueUserWorkItem and friends.
null
CC BY-SA 2.5
null
2008-09-01T21:58:55.750
2008-09-01T21:58:55.750
null
null
2,131
null
38,524
2
null
38,508
30
null
Why not throw an exception if the operation wasn't successful? Personally, I tend to be of the opinion that if you need to return more than one value from a function, you should reconsider if you're doing things the right way or use an object. But more directly to the point, if you throw an exception, you're forcing ...
null
CC BY-SA 2.5
null
2008-09-01T22:09:00.377
2008-09-01T22:14:14.950
2008-09-01T22:14:14.950
2,147
2,147
null
38,526
2
null
38,447
0
null
I think the only solution will be to create an asynchronous service that wraps a [standard connector](http://dev.mysql.com/downloads/connector/odbc/5.1.html). You'll need to understand the ODBC APIs though.
null
CC BY-SA 3.0
null
2008-09-01T22:09:51.607
2012-07-03T13:12:21.620
2012-07-03T13:12:21.620
142,162
1,898
null
38,527
2
null
37,823
0
null
One good reason not to use a relational database would be when you have a massive data set and want to do massively parallel and distributed processing on the data. The Google web index would be a perfect example of such a case. Hadoop also has an implementation of the [Google File System](http://labs.google.com/pa...
null
CC BY-SA 2.5
null
2008-09-01T22:10:30.077
2008-09-01T22:10:30.077
null
null
3,305
null
38,532
2
null
38,510
3
null
Since it is an Identity column and you haven't saved it to the database yet it is -1. I am assuming here that this is before you save the table back to the database, correct? You need to perform the insert before that value will be set correctly.
null
CC BY-SA 2.5
null
2008-09-01T22:14:53.187
2008-09-01T22:14:53.187
null
null
2,894
null
38,533
2
null
37,823
1
null
BTree files are often much faster than relational databases. SQLite contains within it a BTree library which is in the public domain (as in genuinely 'public domain', not using the term loosely). Frankly though, if I wanted a multi-user system I would need a lot of persuading not to use a decent server relational dat...
null
CC BY-SA 2.5
null
2008-09-01T22:18:20.713
2008-09-01T22:18:20.713
null
null
4,125
null
38,529
2
null
38,408
5
null
You need to use the "allowScriptAccess" flash variable in the HTML. You probably want to use "sameDomain" as the type. Note that if you go cross-domain, you also need to host a special file on the server called 'crossdomain.xml' which enables such scripting (the flash player will check for this. More info at [http://kb...
null
CC BY-SA 2.5
null
2008-09-01T22:11:32.540
2008-09-01T22:11:32.540
null
null
4,123
null
38,534
2
null
38,501
0
null
@DrPizza - this is a very good question, and one that strikes right to the heart of the problem. There are a few reasons why QueueUserWorkItem and the Windows NT thread pool was ruled out (although the Vista one does look interesting, maybe in a few years). Firstly, we wanted to have greater control over when it start...
null
CC BY-SA 2.5
null
2008-09-01T22:18:26.500
2008-09-01T22:18:26.500
null
null
3,146
null
38,543
2
null
37,529
6
null
The principal framework for audio development in Mac OS X is Core Audio; it's the basis for all audio I/O. There are layers on top of it like Audio Toolbox, Audio Queue Services, QuickTime, and QTKit that you can use if you want a simplified API for common tasks. To just pull a stream of samples, you'd probably want ...
null
CC BY-SA 2.5
null
2008-09-01T22:24:32.880
2008-09-01T22:24:32.880
null
null
714
null
38,548
1
null
null
11
2,216
What is the best approach to implement distributed caching with .NET? Edit: I was looking for a general caching schema for internal and external applications
Distributed caching with .NET 2.0+?
CC BY-SA 2.5
0
2008-09-01T22:34:15.340
2009-09-08T06:56:07.843
2009-07-14T13:09:04.637
17,772
2,701
[ "asp.net", "caching", "distributed-caching" ]
38,518
2
null
27,240
46
null
It doesn't make sense for `Enumeration` to implement `Iterable`. `Iterable` is a factory method for `Iterator`. `Enumeration` is analogous to `Iterator`, and only maintains state for a single enumeration. So, be careful trying to wrap an `Enumeration` as an `Iterable`. If someone passes me an `Iterable`, I will assume...
null
CC BY-SA 3.0
null
2008-09-01T22:05:34.253
2013-02-20T17:22:16.557
2013-02-20T17:22:16.557
3,474
3,474
null
38,549
1
38,578
null
5,160
2,568,917
Also, how do `LEFT OUTER JOIN`, `RIGHT OUTER JOIN`, and `FULL OUTER JOIN` fit in?
What is the difference between "INNER JOIN" and "OUTER JOIN"?
CC BY-SA 4.0
0
2008-09-01T22:36:06.940
2022-10-03T18:52:10.887
2022-08-28T04:26:48.977
7,941,251
3,836
[ "sql", "join", "inner-join", "outer-join" ]
38,552
2
null
38,549
129
null
A inner join only shows rows if there is a matching record on the other (right) side of the join. A (left) outer join shows rows for each record on the left hand side, even if there are no matching rows on the other (right) side of the join. If there is no matching row, the columns for the other (right) side would sho...
null
CC BY-SA 3.0
null
2008-09-01T22:38:43.643
2015-01-05T01:14:26.567
2015-01-05T01:14:26.567
3,146
3,146
null
38,428
1
38,440
null
3
300
THis is a followup to my previous question "[Font-dependent control positioning.](https://stackoverflow.com/questions/37306/font-dependent-control-positioning)" It's an attempt to solve the problem behind that question, perhaps in ways different than the one I was asking about. I want a checkbox that says "Adjust pr...
Positioning controls in the middle of a CheckBox
CC BY-SA 2.5
null
2008-09-01T21:00:05.940
2008-09-25T11:20:11.517
2017-05-23T12:19:30.550
-1
3,191
[ "winforms", "layout", "fonts" ]
38,550
2
null
38,501
0
null
> @DrPizza - this is a very good question, and one that strikes right to the heart of the problem. There are a few reasons why QueueUserWorkItem and the Windows NT thread pool was ruled out (although the Vista one does look interesting, maybe in a few years). Yeah, it looks like it got quite beefed up in Vista, quite ...
null
CC BY-SA 2.5
null
2008-09-01T22:37:18.763
2008-09-01T22:37:18.763
null
null
2,131
null
38,553
2
null
38,510
5
null
@Brian -1 is a good choice for the default value since no "real" rows are likely to have identities less than zero. If it defaulted to 0 or 1 then there'd be a chance that it'd clash with an existing row, causing a primary key violation. For applications that stay offline and create multiple rows before saving, a comm...
null
CC BY-SA 2.5
null
2008-09-01T22:38:45.173
2008-09-01T22:38:45.173
null
null
615
null
38,546
2
null
37,299
11
null
You can just insert a call to `Debugger()` — that will stop your app in the debugger (if it's being run under the debugger), or halt it with an exception if it's not. Also, `assert()` — portability is why it exists! It's part of Standard C, and you'll find it wherever you find a C compiler. What you really want to d...
null
CC BY-SA 2.5
null
2008-09-01T22:28:13.997
2008-09-01T22:36:17.113
2008-09-01T22:36:17.113
714
714
null