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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
31,225 | 2 | null | 29,562 | 1 | null | distutils really isn't all that difficult once you get the hang of it. It's really just a matter of putting in some meta-information (program name, author, version, etc) and then selecting what files you want to include. For example, here's a sample distutils setup.py module from a decently complex python library:
[... | null | CC BY-SA 2.5 | null | 2008-08-27T20:42:16.223 | 2008-08-27T20:42:16.223 | null | null | 2,147 | null |
31,224 | 2 | null | 31,215 | 0 | null | Only thing I can think of to handle what you're wanting to do is to have to params, one that describes the param type (an enum with LogonName, BadgeNumer, etc) and the second is the param value.
| null | CC BY-SA 2.5 | null | 2008-08-27T20:42:00.873 | 2008-08-27T20:42:00.873 | null | null | 1,627 | null |
31,229 | 2 | null | 31,215 | 18 | null | You could perhaps use factory methods instead?
```
public static Person fromId(int id) {
Person p = new Person();
p.Load(id);
return p;
}
public static Person fromLogonName(string logonName) {
Person p = new Person();
p.Load(logonName);
return p;
}
public static Person fromBadgeNumber(string ba... | null | CC BY-SA 2.5 | null | 2008-08-27T20:43:10.887 | 2008-08-27T20:43:10.887 | null | null | 3,295 | null |
31,226 | 1 | 35,517 | null | 5 | 1,949 | I am writing a basic word processing application and am trying to settle on a native "internal" format, the one that my code parses in order to render to the screen. I'd like this to be XML so that I can, in the future, just write XSLT to convert it to ODF or XHTML or whatever.
When searching for existing standards to... | Lightweight rich-text XML format? | CC BY-SA 3.0 | null | 2008-08-27T20:42:22.230 | 2014-12-13T02:28:55.583 | 2014-12-13T02:28:55.583 | 1,810,429 | 3,044 | [
"xml",
"standards"
] |
31,230 | 2 | null | 31,215 | 1 | null | You cannot have two different constructors/methods with the same signature, otherwise, how can the compiler determine which method to run.
As [Zack said](https://stackoverflow.com/questions/31215/constructors-with-the-same-argument-type#31220), I would consider creating an "options" class where you could actually pass... | null | CC BY-SA 2.5 | null | 2008-08-27T20:43:33.770 | 2008-08-27T20:43:33.770 | 2017-05-23T12:19:30.550 | -1 | 832 | null |
31,231 | 2 | null | 31,096 | 0 | null | I'd suggest to also monitor how often pagefaults happen. A pagefault happens when you try to access some data that have been moved from physical memory to swap file and system has to read page from disk before you can access this data.
| null | CC BY-SA 2.5 | null | 2008-08-27T20:43:45.550 | 2008-08-27T20:43:45.550 | null | null | 1,534 | null |
31,234 | 2 | null | 31,226 | -1 | null | XML is an format, not .
What's wrong with [XHTML](http://www.w3.org/TR/xhtml1/)? It's simple and it's ubiquitous (at least HTML is). Your implementation would be easy to debug, and your users will be eternally greatful.
| null | CC BY-SA 2.5 | null | 2008-08-27T20:44:57.230 | 2008-08-27T20:44:57.230 | null | null | 338 | null |
31,233 | 2 | null | 31,215 | 0 | null | You could switch to a factory style pattern.
```
public class Person {
private Person() {}
public static PersonFromID(int personId)
{
Person p = new Person().
person.Load(personID);
return p;
this.Load(personId);
}
public static PersonFromID(string name)
{
Person p = new Person().
... | null | CC BY-SA 2.5 | null | 2008-08-27T20:44:42.740 | 2008-08-27T20:44:42.740 | null | null | 1,200 | null |
31,232 | 2 | null | 31,215 | 1 | null | You could use a static factory method:
```
public static Person fromLogon(String logon) { return new Person(logon, null); }
public static Person fromBadge(String badge) { return new Person(null, badge); }
```
| null | CC BY-SA 2.5 | null | 2008-08-27T20:44:30.947 | 2008-08-27T20:44:30.947 | null | null | 1,471 | null |
31,235 | 2 | null | 23,287 | -3 | null | This is probably not always faster but more optimistic about that you find a big prime divisor:
1. N is your number
2. If it is prime then return(N)
3. Calculate primes up until Sqrt(N)
4. Go through the primes in descending order (largest first) If N is divisible by Prime then Return(Prime)
Edit: In step 3 you ca... | null | CC BY-SA 2.5 | null | 2008-08-27T20:45:14.827 | 2008-08-27T20:45:14.827 | null | null | 3,063 | null |
31,236 | 2 | null | 31,192 | 0 | null | Sounds like you have a pretty good handle on things. I've seen a lot of people try to do a straight-line transliteration, includes and all, and it just doesn't work. You need to have a good understanding of how ASP.Net wants to work, because it's different from Classic ASP, and it sounds like maybe you have that.
... | null | CC BY-SA 2.5 | null | 2008-08-27T20:45:30.757 | 2008-08-27T20:45:30.757 | null | null | 3,043 | null |
31,240 | 2 | null | 31,215 | -2 | null | How about ...
```
public Person(int personId)
{
this.Load(personId);
}
public Person(string logonName)
{
this.Load(logonName);
}
public Person(Object badgeNumber)
{
//load logic here...
}
```
| null | CC BY-SA 2.5 | null | 2008-08-27T20:46:34.870 | 2008-08-27T20:46:34.870 | null | null | 2,437 | null |
31,239 | 2 | null | 31,215 | 1 | null | As has been suggested, custom types is the way to go in this case.
| null | CC BY-SA 2.5 | null | 2008-08-27T20:46:07.167 | 2008-08-27T20:46:07.167 | null | null | 2,284 | null |
31,238 | 1 | null | null | 13 | 4,810 | What I have is a collection of classes that all implement the same interface but can be pretty wildly different under the hood. I want to have a config file control which of the classes go into the collection upon starting the program, taking something that looks like :
```
<class1 prop1="foo" prop2="bar"/>
```
and ... | C#: instantiating classes from XML | CC BY-SA 3.0 | 0 | 2008-08-27T20:45:53.297 | 2017-08-19T14:57:49.973 | 2017-08-19T14:57:49.973 | null | 634 | [
"c#",
"xml"
] |
31,244 | 2 | null | 31,238 | 0 | null | Reflection is what you want. Reflection + TypeConverter. Don't have much more time to explain, but just google those, and you should be well on your way. Or you could just use the xml serializer, but then you have to adhere to a format, but works great.
| null | CC BY-SA 2.5 | null | 2008-08-27T20:47:19.363 | 2008-08-27T20:47:19.363 | null | null | 77 | null |
31,248 | 2 | null | 31,221 | -2 | null | What about using
```
Response.Redirect(String.Format("http://{0}/Login.aspx?ReturnPath={1}", Request.ServerVariables["SERVER_NAME"], Request.Url.ToString()));
```
| null | CC BY-SA 2.5 | null | 2008-08-27T20:48:11.933 | 2008-08-27T20:48:11.933 | null | null | 1,302 | null |
31,242 | 1 | null | null | 3 | 4,605 | I am new to the `.Net` Compact Framework and have been unable to find an answer via Google. Gasp! Yes, it's true, but that is part of why StackOverflow is here, right?
I have a form that is longer than the screen, so a vertical scroll-bar appears as expected. However, this appears to force a horizontal scroll-bar to a... | .Net Compact Framework scrollbars - horizontal always show when vertical shows | CC BY-SA 3.0 | null | 2008-08-27T20:47:09.143 | 2017-08-19T14:26:37.480 | 2017-08-19T14:26:37.480 | 7,275,984 | 620,435 | [
".net",
"forms",
"compact-framework"
] |
31,245 | 2 | null | 31,192 | 1 | null | A 1500-line ASP page? With lots of calls out to include files? Don't tell me -- the functions don't have any naming convention that tells you which include file has their implementation... That brings back memories (shudder)...
It sounds to me like you have a pretty solid approach -- I'm not sure if there is any mag... | null | CC BY-SA 2.5 | null | 2008-08-27T20:47:26.850 | 2008-08-27T20:47:26.850 | null | null | 2,194 | null |
31,249 | 1 | 31,260 | null | 9 | 5,383 | Using WPF, I have a TreeView control that I want to set its ItemTemplate dynamically through procedural code. How do I do this? I assume I need to find the resource somewhere.
```
myTreeViewControl.ItemTemplate = ??
```
| How do I set ItemTemplate dynamically in WPF? | CC BY-SA 2.5 | 0 | 2008-08-27T20:48:17.893 | 2011-07-26T16:03:42.170 | 2011-07-26T16:03:42.170 | 305,637 | 3,047 | [
"wpf",
"itemtemplate"
] |
31,246 | 2 | null | 31,238 | 9 | null | It may be easier to serialise the classes to/from xml, you can then simply pass the XmlReader (which is reading your config file) to the deserializer and it will do the rest for you..
[This is a pretty good article on serialization](http://www.diranieh.com/NETSerialization/XMLSerialization.htm)
## Edit
One thing I w... | null | CC BY-SA 2.5 | null | 2008-08-27T20:47:43.293 | 2008-08-27T20:57:38.260 | 2020-06-20T09:12:55.060 | -1 | 832 | null |
31,250 | 1 | 31,275 | null | 12 | 17,573 | What is the content type for MHT files?
| Content Type for MHT files | CC BY-SA 2.5 | 0 | 2008-08-27T20:48:23.417 | 2013-11-23T23:36:25.410 | 2010-07-16T05:04:32.797 | 18,437 | 2,141 | [
"content-type",
"mhtml"
] |
31,237 | 1 | 31,288 | null | 8 | 2,942 | A question that has pondered me for the last while. I am primarily a .net developer who dabbles in Objective-C for iPhone and Mac.
How do you go about sending "datasets" between methods in objective-c. For example in C# you can populate a custom class with data and pass it around in a List of type custom class. EG if ... | Passing around sets of data | CC BY-SA 3.0 | 0 | 2008-08-27T20:45:36.620 | 2017-07-17T09:24:53.583 | 2017-07-17T09:24:53.583 | 13,860 | 1,075 | [
"objective-c",
"cocoa",
"macos",
"sqlite"
] |
31,257 | 2 | null | 31,250 | 4 | null | message/rfc822
RFC 822 - STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES
Here is a hyperlink: [message/rfc822](http://www.faqs.org/rfcs/rfc822.html)
| null | CC BY-SA 2.5 | null | 2008-08-27T20:50:12.740 | 2008-08-27T20:50:12.740 | null | null | 2,194 | null |
31,110 | 2 | null | 31,088 | 5 | null | Use more generics
```
abstract class Vehicle<T> where T : Axle
{
public string Name;
public List<T> Axles;
}
class Motorcycle : Vehicle<MotorcycleAxle>
{
}
class Car : Vehicle<CarAxle>
{
}
abstract class Axle
{
public int Length;
public void Turn(int numTurns) { ... }
}
class MotorcycleAxle : Axle
{
publ... | null | CC BY-SA 2.5 | null | 2008-08-27T20:10:28.373 | 2008-08-27T20:10:28.373 | null | null | 1,242 | null |
31,255 | 2 | null | 31,226 | 0 | null | Well, right... But since I need to be able to convert to XML anyway, why hold both my document tree and the DOM tree in memory, when there's nothing preventing me from working right off the DOM tree?
Particularly since one unique feature of my program is that everything is always saved as you type, and I don't want to... | null | CC BY-SA 2.5 | null | 2008-08-27T20:48:52.247 | 2008-08-27T20:48:52.247 | null | null | 3,044 | null |
31,258 | 2 | null | 31,238 | 6 | null | Reflection or XML-serialization is what you're looking for.
Using reflection you could look up the type using something like this
```
public IYourInterface GetClass(string className)
{
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
{
foreach (Type type in asm.GetTypes()... | null | CC BY-SA 2.5 | null | 2008-08-27T20:50:51.647 | 2008-08-28T09:11:07.437 | 2008-08-28T09:11:07.437 | 2,114 | 2,114 | null |
31,252 | 2 | null | 31,238 | 3 | null | Plenty of metaprogramming facilities.
Specifically, you can get a reference to the assembly that holds these classes, then easily get the `Type` of a class from its name. See [Assembly.GetType Method (String)](http://msdn.microsoft.com/en-us/library/y0cd10tb.aspx).
From there, you can instantiate the class using `Act... | null | CC BY-SA 2.5 | null | 2008-08-27T20:48:32.900 | 2008-08-27T20:48:32.900 | null | null | 338 | null |
31,268 | 2 | null | 30,877 | 4 | null | Parallelisation aside, you don't want to be calculating sqrt(Until) on every iteration. You also can assume multiples of 2, 3 and 5 and only calculate for N%6 in {1,5} or N%30 in {1,7,11,13,17,19,23,29}.
You should be able to parallelize the factoring algorithm quite easily, since the Nth stage only depends on the sqr... | null | CC BY-SA 2.5 | null | 2008-08-27T20:52:54.093 | 2008-08-27T20:52:54.093 | null | null | 1,527 | null |
31,212 | 2 | null | 31,129 | -2 | null | hmm, if you've serialized an object with the `StudentId` property then I think that it will be:
```
var studentId;
function(json) {
if (json.length > 0)
studentId = json[0].StudentId;
}
```
But if you're just returning the `StudentId` itself maybe it's:
```
var studentId;
function(json) {
if (json.l... | null | CC BY-SA 2.5 | null | 2008-08-27T20:38:23.410 | 2008-08-27T21:00:03.200 | 2008-08-27T21:00:03.200 | 1,414 | 1,414 | null |
31,262 | 2 | null | 31,090 | 7 | null | I used the draggable search in Spy++ (installed with VS) to look at the split open button on the file-open dialog of VS.
This revealed that it's an ordinary windows button with a style which includes BS_DEFSPLITBUTTON. That's a magic keyword which gets you to some interesting places, including
[http://www.codeplex.... | null | CC BY-SA 2.5 | null | 2008-08-27T20:51:31.803 | 2008-08-27T21:15:46.940 | 2008-08-27T21:15:46.940 | 987 | 987 | null |
31,271 | 2 | null | 31,226 | 1 | null | If its only for word processing, then perhaps [DocBook](http://en.wikipedia.org/wiki/DocBook) might be a little lighter than ODF?
However, the wiki entry states:
> DocBook is a semantic markup language for technical documentation. It was originally intended for writing technical documents related to computer hardware... | null | CC BY-SA 2.5 | null | 2008-08-27T20:53:51.657 | 2008-08-27T20:53:51.657 | null | null | 3,295 | null |
31,272 | 2 | null | 30,998 | 0 | null | For organization, use namespaces as already stated.
For global data I like to use the [singleton](http://en.wikipedia.org/wiki/Singleton_pattern) pattern because it helps with the problem of the unknown initialization order of static objects. In other words, if you use the object as a singleton it is guaranteed to ... | null | CC BY-SA 2.5 | null | 2008-08-27T20:53:53.917 | 2008-08-27T20:53:53.917 | null | null | 2,897 | null |
31,280 | 2 | null | 2,509 | 6 | null | I have experimented a little with the BDD approach and my premature conclusion is that BDD is well suited to use case implementation, but not on the underlying details. TDD still rock on that level.
BDD is also used as a communication tool. The goal is to write executable specifications which can be understood by the ... | null | CC BY-SA 2.5 | null | 2008-08-27T20:59:59.253 | 2008-08-27T20:59:59.253 | null | null | 3,282 | null |
31,282 | 2 | null | 16,860 | 0 | null | Don't forget refactoring support. ReSharper on .NET provides automatic refactoring and quick fixes for missing code. That means if you write a call to something that does not exist, ReSharper will ask if you want to create the missing piece.
| null | CC BY-SA 2.5 | null | 2008-08-27T21:00:32.047 | 2008-08-27T21:00:32.047 | null | null | 3,282 | null |
31,261 | 2 | null | 31,238 | 9 | null | [Reflection](http://msdn.microsoft.com/en-us/library/ms173183.aspx) allows you to do that. You also may want to look at [XML Serialization](http://msdn.microsoft.com/en-us/library/ms950721.aspx).
```
Type type = blah.GetType();
PropertyInfo prop = type.GetProperty("prop1");
prop.SetValue(blah, "foo", null);
```
| null | CC BY-SA 2.5 | null | 2008-08-27T20:51:13.270 | 2008-08-27T20:51:13.270 | null | null | 1,242 | null |
31,275 | 2 | null | 31,250 | -4 | null | application/octet-stream
You can stream the contents of a .eml file to a browser with this content type and .mht as the extension, and the email will be rendered similar to the way it is rendered in an email client.
| null | CC BY-SA 2.5 | null | 2008-08-27T20:55:12.353 | 2008-08-27T20:55:12.353 | null | null | 1,219 | null |
31,287 | 1 | 31,624 | null | 0 | 463 | Is anyone using Virtual PC to maintain multiple large .NET 1.1 and 2.0 websites? Are there any lessons learned? I used Virtual PC recently with a small WinForms app and it worked great, but then everything works great with WinForms. ASP.NET development hogs way more resources, requires IIS to be running, requires a ... | Using Virtual PC for Web Development with Oracle | CC BY-SA 3.0 | null | 2008-08-27T21:02:03.337 | 2013-12-02T12:50:59.853 | 2013-12-02T12:50:59.853 | 2,432,317 | 785 | [
"performance",
"virtual-pc"
] |
31,260 | 2 | null | 31,249 | 12 | null | If the template is defined in your <Window.Resources> section directly:
```
myTreeViewControl.ItemTemplate = this.Resources["SomeTemplate"] as DataTemplate;
```
If it's somewhere deep within your window, like in a <Grid.Resources> section or something, I think this'll work:
```
myTreeViewControl.ItemTemplate = this... | null | CC BY-SA 2.5 | null | 2008-08-27T20:51:01.443 | 2008-08-27T20:51:01.443 | null | null | 615 | null |
31,285 | 1 | 68,525 | null | 2 | 939 | I am using VMWare tools for Ubuntu Hardy, but for some reason `vmware-install.pl` finds fault with my LINUX headers. The error message says that the "address space size" doesn't match.
To try and remediate, I have resorted to `vmware-any-any-update117`, and am now getting the following error instead:
```
In file incl... | VMWare Tools for Ubuntu Hardy | CC BY-SA 3.0 | null | 2008-08-27T21:01:11.950 | 2013-04-21T10:36:19.187 | 2013-04-21T10:36:19.187 | 45,603 | 45,603 | [
"ubuntu",
"vmware",
"virtualization",
"vmware-tools"
] |
31,295 | 1 | null | null | 7 | 2,219 | I'm trying to create web applications that use JavaScript. I'd like to be able to use animation in these applications. I've tried to use basic JavaScript, but I've decided that the best thing to do is to use a library (such as [YUI](http://en.wikipedia.org/wiki/Yahoo!_UI_Library) or jQuery).
I'm running into a probl... | JavaScript animation with Safari | CC BY-SA 2.5 | 0 | 2008-08-27T21:07:38.940 | 2013-10-18T10:18:19.273 | 2013-10-18T10:18:19.273 | 2,307,541 | 1,615 | [
"javascript",
"jquery",
"animation",
"web-applications",
"safari"
] |
31,288 | 2 | null | 31,237 | 25 | null | You're on the right track.
Cocoa's collection classes — which all have mutable an immutable variants — are:
- - - -
The immutable variants help a lot with efficiency. The standard pattern for accessors of classes that have mutable variants is to copy rather than retain. This is codified in the `@property` mechani... | null | CC BY-SA 2.5 | null | 2008-08-27T21:03:04.880 | 2008-08-27T21:03:04.880 | null | null | 714 | null |
31,297 | 1 | 31,730 | null | 1 | 1,481 | I developed a program in a mobile device (Pocket PC 2003) to access a web service, the web service is installed on a Windows XP SP2 PC with IIS, the PC has the IP 192.168.5.2.
The device obtains from the wireless network the IP 192.168.5.118 and the program works OK, it calls the method from the web service and execu... | Cannot access a webservice from mobile device | CC BY-SA 2.5 | null | 2008-08-27T21:08:24.383 | 2018-05-18T09:12:03.557 | null | null | 1,130,097 | [
"mobile"
] |
31,273 | 2 | null | 31,088 | 0 | null | 2 options spring to mind. 1 is using generics:
```
abstract class Vehicle<TAxle> where TAxle : Axle {
public List<TAxle> Axles;
}
```
The second uses shadowing - and this assumes you have properties:
```
abstract class Vehicle {
public IList<Axle> Axles { get; set; }
}
class Motorcyle : Vehicle {
public n... | null | CC BY-SA 2.5 | null | 2008-08-27T20:54:11.593 | 2008-08-27T20:54:11.593 | null | null | 2,199 | null |
31,300 | 2 | null | 31,051 | 1 | null | Ok, I've solved my own problem.
To get that "authdata" string, you need to configure your client to how you need to authenticate.
Then navigate to c:[users directory][username]\Local Settings\Application Data\plastic.
Pick up the client.conf and extract the string from the SecurityConfig element in the XML.
| null | CC BY-SA 2.5 | null | 2008-08-27T21:09:27.173 | 2008-08-27T21:09:27.173 | null | null | 2,170 | null |
31,301 | 2 | null | 31,296 | 0 | null | I don't know what is "terribly slow" for you, but I have a decent performance with SQL 2005 Management Studio. In either case, [RedGate](http://www.red-gate.com/) products are very cool. Unfortunately they are not free.
| null | CC BY-SA 3.0 | null | 2008-08-27T21:10:22.210 | 2014-12-13T08:05:23.373 | 2014-12-13T08:05:23.373 | 1,810,429 | 2,684 | null |
31,304 | 2 | null | 31,287 | 0 | null | As long as you have the resources (separate hard disk for the virtual machine, sufficient RAM), I don't see why you would have any problems.
| null | CC BY-SA 2.5 | null | 2008-08-27T21:11:57.277 | 2008-08-28T19:04:02.380 | 2008-08-28T19:04:02.380 | 2,194 | 2,194 | null |
31,309 | 2 | null | 31,303 | 2 | null | I guess you have considered the reads of Scott Ambler?
[http://www.agiledata.org/essays/databaseRefactoring.html](http://www.agiledata.org/essays/databaseRefactoring.html)
| null | CC BY-SA 2.5 | null | 2008-08-27T21:15:14.257 | 2008-08-27T21:15:14.257 | null | null | 3,308 | null |
31,299 | 2 | null | 31,215 | 2 | null | You have four options that I can think of, three of which have already been named by others:
1. Go the factory route, as suggested by several others here. One disadvantage to this is that you can't have consistent naming via overloading (or else you'd have the same problem), so it's superficially less clean. Another,... | null | CC BY-SA 2.5 | null | 2008-08-27T21:08:31.323 | 2008-08-27T21:08:31.323 | null | null | 872 | null |
31,313 | 2 | null | 2,046 | 1 | null | I usually create a repository, use that to save my entity and retrieve a fresh one. Then I assert that the retrieved is equal to the saved.
| null | CC BY-SA 4.0 | null | 2008-08-27T21:17:21.787 | 2020-07-09T13:58:58.380 | 2020-07-09T13:58:58.380 | 10,325,630 | 3,282 | null |
31,315 | 2 | null | 31,296 | 0 | null | What kind of scrpt generation are you talking about now?, generating create scripts from the objects in the database is way faster in SSMS compared to EM.
But if you are running an select or something that gives you lots of rows in the grid, it is crazy slow.. like scripts generating inserts statements of all rows in a... | null | CC BY-SA 2.5 | null | 2008-08-27T21:18:33.843 | 2008-08-27T21:18:33.843 | null | null | 3,308 | null |
31,303 | 1 | 31,481 | null | 11 | 1,311 | Having to upgrade a database schema makes installing a new release of software a lot trickier. What are the best practices for doing this?
I'm looking for a checklist or timeline of action items, such as
- - - -
etc, showing how to minimize risk and downtime. Issues such as
- - - -
are especially of interest.
| Checklist for Database Schema Upgrades | CC BY-SA 3.0 | 0 | 2008-08-27T21:11:20.913 | 2017-08-04T14:17:31.250 | 2017-08-04T14:17:31.250 | 1,836,618 | 116 | [
"database",
"installation",
"version-control"
] |
31,278 | 2 | null | 31,226 | 1 | null | I like DocBook, but it doesn't really fit. It strives to be presentation-independent, the intention being that you would use XSLT to render it to a presentation format.
In a word processor, the user is editing presentation along with the content. For example, the user doesn't want to mark a "keyword", necessarily, the... | null | CC BY-SA 2.5 | null | 2008-08-27T20:57:30.790 | 2008-08-27T20:57:30.790 | null | null | 3,044 | null |
31,318 | 2 | null | 31,295 | 0 | null | JQuery has animation, but I don't know what it is like on a Mac (I don't have a mac). If things are going slow, then you are probably making the animations too complicated. Remember, JavaScript is a slow language, and DOM is not designed for animation, so try to limit yourself with respect to the number of animations a... | null | CC BY-SA 2.5 | null | 2008-08-27T23:28:56.400 | 2008-08-27T23:28:56.400 | null | null | 1,585 | null |
31,296 | 1 | 31,391 | null | 2 | 1,017 | It seems like the generation of SQL scripts from the SQL Server Management Studio is terribly slow. I think that the old Enterprise Manager could run laps around the newer script generation tool. I've seen a few posts here and there with other folks complaining about the speed, but I haven't seen much offered in the wa... | Fast SQL Server 2005 script generation | CC BY-SA 2.5 | null | 2008-08-27T21:08:15.537 | 2014-12-13T08:07:02.217 | null | null | 162 | [
"sql-server",
"scripting"
] |
31,317 | 2 | null | 31,192 | 0 | null | > Don't tell me -- the functions don't
have any naming convention that tells
you which include file has their
implementation... That brings back
memories (shudder)...
How did you guess? ;)
> I hope you have weighed the upgrade
you are doing against just rewriting
from scratch -- as long as you are not
i... | null | CC BY-SA 2.5 | null | 2008-08-27T21:19:06.963 | 2008-08-27T21:19:06.963 | null | null | 1,302 | null |
31,330 | 2 | null | 30,962 | 0 | null | If you call volume to the service gets up too high, you should definitely consider getting your own set of postal data. In most cases, that will provide all of the information that you need, and there are plenty of db tools for indexing location data (i.e. PostGIS for PostgreSQL).
| null | CC BY-SA 2.5 | null | 2008-08-27T23:38:21.697 | 2008-08-27T23:38:21.697 | null | null | 2,567 | null |
31,319 | 2 | null | 31,295 | 0 | null | Well, for starters you could use CSS Transformations if the application is Safari-specific. Otherwise JQuery got some built in animations and a big community behind it (and thus, a large plugin repository).
| null | CC BY-SA 2.5 | null | 2008-08-27T23:30:24.620 | 2008-08-27T23:30:24.620 | null | null | 1,993 | null |
31,331 | 2 | null | 29,856 | 0 | null | Essentially, yes. I was not sure you could do it like that (current version does not do it like that). When using the python install script, however, there is no option (that I can find) to specify where to put directories and files (eg --prefix). I was hoping to match the current layout of python related files so as t... | null | CC BY-SA 2.5 | null | 2008-08-27T23:38:27.767 | 2008-08-27T23:38:27.767 | null | null | 3,431,280 | null |
31,334 | 2 | null | 31,326 | -1 | null | Hopefully this will be useful until someone actually comes along with an explicit answer - [this issue was discussed two years ago on a message board](http://forums.mozillazine.org/viewtopic.php?t=366028&).
HTH
| null | CC BY-SA 2.5 | null | 2008-08-27T23:41:07.353 | 2008-08-27T23:41:07.353 | null | null | 1,790 | null |
31,293 | 2 | null | 9,033 | 20 | null | I'm late to this party, so my first choices are already taken. But I didn't see anyone mention this gem yet:
[Parallel Extensions to the .NET Framework](http://msdn.microsoft.com/en-us/concurrency/default.aspx)
It has things like replace with Parallel.For or foreach with Parallel.ForEach
---
Parallel Sample :
I... | null | CC BY-SA 3.0 | null | 2008-08-27T21:05:41.940 | 2011-06-12T14:46:30.037 | 2011-06-12T14:46:30.037 | 369,161 | 3,043 | null |
31,336 | 2 | null | 30,928 | -1 | null | Can't you just use the same control I'm Stack Overflow uses (that we're all typing into)---WMD, and just store the Markdown in the VARCHAR. Then use the .NET Markdown to HTML converter, as you mentioned, to display the HTML as needed. Jeff talks about this in more detail in a StackOverflow podcast (don't know the episo... | null | CC BY-SA 2.5 | null | 2008-08-27T23:43:45.537 | 2008-08-27T23:43:45.537 | null | null | 2,543 | null |
31,338 | 2 | null | 29,174 | 33 | null | Both of you were on the right track. What I realized is that SimpleModal appends the dialog to the body, which is outside ASP.Net's `<form>`, which breaks the functionality, since it can't find the elements.
To fix it, I just modified the SimpleModal source to append eveything to `'form'` instead of `'body'`. When I... | null | CC BY-SA 2.5 | null | 2008-08-27T23:44:06.100 | 2009-09-23T03:56:26.970 | 2009-09-23T03:56:26.970 | 2,363 | 2,363 | null |
31,340 | 1 | 31,398 | null | 91 | 45,148 | I've been trying to wrap my head around how threads work in Python, and it's hard to find good information on how they operate. I may just be missing a link or something, but it seems like the official documentation isn't very thorough on the subject, and I haven't been able to find a good write-up.
From what I can te... | How do threads work in Python, and what are common Python-threading specific pitfalls? | CC BY-SA 2.5 | 0 | 2008-08-27T23:44:47.843 | 2018-03-30T11:47:11.123 | 2010-09-11T20:31:26.950 | 63,550 | 242,853 | [
"python",
"multithreading"
] |
31,326 | 1 | null | null | 27 | 45,351 | I have a few internal .net web application here that require users to "log out" of them. I know this may seem moot on an Intranet application, but nonetheless it is there.
We are using Windows authentication for our Intranet apps, so we tie in to our Active Directory with Basic Authentication and the credentials get s... | Is there a browser equivalent to IE's ClearAuthenticationCache? | CC BY-SA 2.5 | 0 | 2008-08-27T23:34:19.010 | 2012-02-25T15:55:04.017 | 2008-09-26T19:56:43.130 | 2,134 | 71 | [
"asp.net",
"authentication",
"cross-browser"
] |
31,341 | 2 | null | 31,326 | 0 | null | Well, I've been browsing around Bugzilla for a bit now and seemingly the best way you can go for clearing the authentication would be to send non-existant credentials.
Read more here: [https://bugzilla.mozilla.org/show_bug.cgi?id=287957](https://bugzilla.mozilla.org/show_bug.cgi?id=287957)
| null | CC BY-SA 2.5 | null | 2008-08-27T23:44:54.553 | 2008-08-27T23:44:54.553 | null | null | 1,993 | null |
31,343 | 1 | 31,347 | null | 2 | 612 | I have a bunch of frameworks installed on my machine.
I know that with the , I can use the version to target and earlier.
Can I do something similar with the framework - target and with the framework?
| Do you need the .NET 1.0 framework to target the .NET 1.0 framework? | CC BY-SA 3.0 | null | 2008-08-27T23:46:21.633 | 2015-09-16T16:25:57.507 | 2015-09-09T09:53:13.650 | 1,537,726 | 572 | [
".net"
] |
31,346 | 1 | 31,454 | null | 4 | 1,208 | The MediaElement doesn't support rounded corners (radiusx, radiusy). Should I use a VideoBrush on a Rectangle with rounded corners?
| What's the best way to display a video with rounded corners in Silverlight? | CC BY-SA 2.5 | 0 | 2008-08-27T23:48:36.837 | 2015-12-03T19:44:35.517 | null | null | 5 | [
"silverlight"
] |
31,347 | 2 | null | 31,343 | 2 | null | Visual Studio 2008 was the first to support targeting older versions of .NET. Unfortunately, it supports only .NET 2 and up.
In other words, you'll need .NET framework SDK 1 or 1.1 to do this.
| null | CC BY-SA 2.5 | null | 2008-08-27T23:48:44.607 | 2008-08-27T23:48:44.607 | null | null | 536 | null |
31,344 | 2 | null | 31,343 | 1 | null | ()
You need to compile with the 1.0 compilers. These are only available with the 1.0 release of the runtime/SDK.
The 2.0/3.5 compilers won't emit 1.0-compatible assemblies.
Visual Studio 2008 can generate 2.0 assemblies, but 1.0 was left off.
| null | CC BY-SA 2.5 | null | 2008-08-27T23:47:06.373 | 2008-08-27T23:47:06.373 | null | null | 338 | null |
31,320 | 1 | null | null | 33 | 12,402 | What is the best way to profile a controller action in Ruby on Rails. Currently I am using the brute-force method of throwing in `puts Time.now` calls between what I think will be a bottleneck. But that feels really, really dirty. There has got to be a better way.
| Profile a rails controller action | CC BY-SA 3.0 | 0 | 2008-08-27T23:31:21.573 | 2019-07-22T16:21:25.957 | 2015-03-04T13:46:15.817 | 1,945,948 | 757 | [
"ruby-on-rails",
"ruby"
] |
31,349 | 2 | null | 26,433 | 0 | null | Yet another way to do it:
```
$ ls template_*.txt | sed -e 's/^template\(.*\)$/cp template\1 foo\1/' | ksh -sx
```
I've always been impressed with the ImageMagick [convert](http://www.imagemagick.org/script/convert.php) program that does what you expect with image formats:
```
$ convert rose.jpg rose.png
```
It h... | null | CC BY-SA 2.5 | null | 2008-08-27T23:49:17.833 | 2008-08-27T23:49:17.833 | null | null | 1,438 | null |
31,332 | 2 | null | 25,046 | 36 | null | This is a [Lisp FAQ](http://code.google.com/p/lispfaq/) (slightly adapted):
> This depends on your implementation; you will need to consult your
vendor's documentation.- With ECL and GCL, the standard compilation process will
produce a native executable.- With LispWorks, see the section of the
documentation.-... | null | CC BY-SA 2.5 | null | 2008-08-27T23:40:49.163 | 2008-08-27T23:40:49.163 | null | null | 2,967 | null |
31,358 | 2 | null | 31,340 | 21 | null | Below is a basic threading sample. It will spawn 20 threads; each thread will output its thread number. Run it and observe the order in which they print.
```
import threading
class Foo (threading.Thread):
def __init__(self,x):
self.__x = x
threading.Thread.__init__(self)
def run (self):
... | null | CC BY-SA 2.5 | null | 2008-08-27T23:52:59.743 | 2010-09-11T20:35:37.477 | 2010-09-11T20:35:37.477 | 63,550 | 1,638 | null |
31,312 | 1 | 287,822 | null | 1 | 455 | I am working on a rails project. Using the tag observe_field, I am taking text typed into a text area, processing it in a control, and displaying the result in a div (very similar to the preview in stack overflow). Everything works fine until I type certain special chars.
1. ? => causes the variable not to be found i... | Problems passing special chars with observe_field | CC BY-SA 2.5 | 0 | 2008-08-27T21:17:17.717 | 2008-11-13T18:43:57.747 | 2008-09-01T08:03:09.410 | 1,632 | 1,632 | [
"ruby-on-rails",
"ajax"
] |
31,367 | 2 | null | 31,343 | 2 | null | We use Visual Studio 2008 to maintain a .NET 1.1 WebForms app using [MSBee](http://www.codeplex.com/MSBee). It required a bit of initial *.csproj/msbuild file hackery, but works very well. Of course, you're limited to .NET 1.1 features (it uses the old 1.1 compilers), so no Generics or LINQ. But if you're wanting just ... | null | CC BY-SA 2.5 | null | 2008-08-27T23:55:52.390 | 2008-08-27T23:55:52.390 | null | null | 1,278 | null |
31,364 | 2 | null | 9,650 | 2 | null | The most widely used IDE for Common Lisp, particularly in the free software subset of the community, is in fact [SLIME](http://common-lisp.net/project/slime/), which runs on Emacs. You can use whatever CL compiler you prefer and invoke Lisp source files the way you describe, but if you do that, you won't be taking adva... | null | CC BY-SA 2.5 | null | 2008-08-27T23:54:23.033 | 2008-08-27T23:54:23.033 | null | null | 2,967 | null |
31,368 | 2 | null | 30,775 | 4 | null | You need to modify the AUTHENTICATION_SERVICES entry in SQLNET.ORA to this:
```
SQLNET.AUTHENTICATION_SERVICES= (NTS)
```
As well, you will need to setup the accounts in Oracle to match the Windows accounts. Have a look at [http://www.dba-oracle.com/bk_sqlnet_authentication_services.htm](http://www.dba-oracle.com/bk... | null | CC BY-SA 2.5 | null | 2008-08-27T23:56:20.093 | 2008-08-27T23:56:20.093 | null | null | 2,754 | null |
31,372 | 2 | null | 31,340 | 36 | null | Python's a fairly easy language to thread in, but there are caveats. The biggest thing you need to know about is the Global Interpreter Lock. This allows only one thread to access the interpreter. This means two things: 1) you rarely ever find yourself using a lock statement in python and 2) if you want to take ad... | null | CC BY-SA 3.0 | null | 2008-08-28T00:00:18.167 | 2013-06-27T20:25:13.057 | 2013-06-27T20:25:13.057 | 2,147 | 2,147 | null |
31,359 | 2 | null | 31,320 | 9 | null | Use the Benchmark standard library and the various tests available in Rails (unit, functional, integration). Here's an example:
```
def test_do_something
elapsed_time = Benchmark.realtime do
100.downto(1) do |index|
# do something here
end
end
assert elapsed_time < SOME_LIMIT
end
```
So here we j... | null | CC BY-SA 2.5 | null | 2008-08-27T23:53:02.130 | 2008-08-28T00:08:07.227 | 2008-08-28T00:08:07.227 | 422 | 422 | null |
31,380 | 1 | 32,509 | null | 5 | 15,948 | I currently use the following function to do a simple HTTP GET.
```
public static String download(String url) throws java.io.IOException {
java.io.InputStream s = null;
java.io.InputStreamReader r = null;
//java.io.BufferedReader b = null;
StringBuilder content = new StringBuilder();
try {
... | Is there a reason to use BufferedReader over InputStreamReader when reading all characters? | CC BY-SA 2.5 | 0 | 2008-08-28T00:07:06.980 | 2015-11-23T00:09:21.883 | 2008-09-17T07:49:15.860 | 2,961 | 338 | [
"java",
"performance",
"http",
"io",
"buffer"
] |
31,384 | 2 | null | 29,856 | 1 | null | Personally, I wouldn't worry about it until you see a problem. Messing with the default python install on a *Nix system can cause more trouble than it's worth. I can say from personal experience that you never truly understand what python has done for the nix world until you have a problem with it.
You can also add ... | null | CC BY-SA 2.5 | null | 2008-08-28T00:09:56.910 | 2008-08-28T00:09:56.910 | null | null | 2,147 | null |
31,385 | 2 | null | 31,326 | 2 | null | Why not use FormsAuth, but against ActiveDirectory instead as per the info in [this thread](https://stackoverflow.com/questions/30861/authenticationg-domain-users-with-systemdirectoryservices). It's just as (in)secure as Basic Auth, but logging out is simply a matter of blanking a cookie (or rather, calling [FormsAuthe... | null | CC BY-SA 2.5 | null | 2008-08-28T00:10:25.833 | 2008-08-28T00:10:25.833 | 2017-05-23T11:46:37.420 | -1 | 1,278 | null |
31,392 | 2 | null | 31,380 | 1 | null | You are correct, if you use BufferedReader for reading HTTP content and headers you will want InputStreamReader so you can read byte for byte.
BufferedReader in this scenario sometimes does weird things...escpecially when it comes to reading HTTP POST headers, sometimes you will be unable to read the POST data, if yo... | null | CC BY-SA 2.5 | null | 2008-08-28T00:16:40.937 | 2008-08-28T00:16:40.937 | null | null | 1,638 | null |
31,395 | 2 | null | 31,380 | 0 | null | My gut tells me that since you're already performing buffering by using the byte array, it's redundant to use the BufferedReader.
| null | CC BY-SA 2.5 | null | 2008-08-28T00:18:03.023 | 2008-08-28T00:18:03.023 | null | null | 2,443 | null |
31,400 | 2 | null | 29,244 | 0 | null | > Must be a Vista problem. I have XP SP 2 and it looks normal.
So it is.
I tried it on XP and it's fine, and on vista with the theme set to windows classic it's also fine. Must just be a bug in the firefox-vista-aero theme.
| null | CC BY-SA 2.5 | null | 2008-08-28T00:20:24.547 | 2008-08-28T00:20:24.547 | null | null | 234 | null |
31,394 | 1 | 31,401 | null | 11 | 14,301 | I see many similar questions, however I want to find the Username of the currently logged in user using Java.
Its probably something like:
```
System.getProperty(current.user);
```
But, I'm not quite sure.
| Java: Programatic Way to Determine Current Windows User | CC BY-SA 2.5 | 0 | 2008-08-28T00:17:21.730 | 2022-02-18T22:23:15.420 | null | null | 2,598 | [
"java",
"windows"
] |
31,401 | 2 | null | 31,394 | 32 | null | You're actually really close. This is what you're looking for:
```
System.getProperty("user.name")
```
| null | CC BY-SA 2.5 | null | 2008-08-28T00:20:44.013 | 2008-08-28T00:28:03.170 | 2008-08-28T00:28:03.170 | 422 | 422 | null |
31,405 | 2 | null | 580 | 2 | null | [RedGate SqlCompare](http://www.red-gate.com/products/SQL_Compare/index.htm) is a way to go in my opinion. We do DB deployment on a regular basis and since I started using that tool I have never looked back.
Very intuitive interface and saves a lot of time in the end.
The Pro version will take care of scripting for t... | null | CC BY-SA 2.5 | null | 2008-08-28T00:22:08.193 | 2008-08-28T00:22:08.193 | null | null | 3,241 | null |
31,408 | 1 | 31,452 | null | 11 | 3,075 | I have been using Castle MonoRail for the last two years, but in a new job I am going to be the one to bring in ASP.NET MVC with me.
I understand the basics of views, actions and the like. I just need a good sample for someone with MVC experience.
Any good links besides Scott's Northwind traders sample?
| Where can I find a good ASP.NET MVC sample? | CC BY-SA 3.0 | 0 | 2008-08-28T00:23:38.937 | 2015-04-17T10:58:54.837 | 2015-04-17T10:58:54.837 | 155,077 | 2,993 | [
"c#",
"asp.net",
"asp.net-mvc"
] |
31,398 | 2 | null | 31,340 | 53 | null | Yes, because of the Global Interpreter Lock (GIL) there can only run one thread at a time. Here are some links with some insights about this:
- [http://www.artima.com/weblogs/viewpost.jsp?thread=214235](http://www.artima.com/weblogs/viewpost.jsp?thread=214235)- [http://smoothspan.wordpress.com/2007/09/14/guido-is-righ... | null | CC BY-SA 3.0 | null | 2008-08-28T00:19:50.320 | 2013-06-26T17:39:16.473 | 2013-06-26T17:39:16.473 | 551,899 | 720 | null |
31,415 | 1 | 31,432 | null | 0 | 11,893 | Using regular expressions, what is the simplest way to fetch a websites HTML and find the value inside this tag (or any attribute's value for that matter):
```
<html>
<head>
[snip]
<meta name="generator" value="thevalue i'm looking for" />
[snip]
```
| Quick way to find a value in HTML (Java) | CC BY-SA 3.0 | 0 | 2008-08-28T00:28:36.553 | 2018-12-20T12:57:17.430 | 2017-10-24T11:11:29.247 | 6,074,376 | 2,644 | [
"java",
"html",
"regex"
] |
31,410 | 1 | 31,427 | null | 4 | 1,391 | I'm working in VS 2008 and have three projects in one solution. I'm debugging by attaching to a .net process invoked by a third party app (SalesLogix, a CRM app).
Once it has attached to the process and I attempt to set a breakpoint in one of the projects, it doesn't set a breakpoint in that file. It actually swit... | Visual Studio 2008 debugging issue | CC BY-SA 2.5 | null | 2008-08-28T00:25:47.870 | 2008-11-02T02:16:57.670 | 2008-11-02T02:16:57.670 | null | 3,331 | [
"c#",
"visual-studio-2008",
"debugging"
] |
31,416 | 2 | null | 31,408 | 4 | null | Check out Billy McCafferty's [S#arp Architecture](http://code.google.com/p/sharp-architecture/) project for a great ASP.NET MVC starter project filled with best practices.
If you want something a little simpler, I threw together a rudimentary version of the S#arp Architecture project, called [Blunt Architecturehere](h... | null | CC BY-SA 2.5 | null | 2008-08-28T00:28:39.377 | 2008-08-28T00:28:39.377 | null | null | 1,574 | null |
31,420 | 2 | null | 31,412 | 1 | null | @Daniel >
I'm not sure that the distinction artificial. After a dynamic load the plugin code shares an execution context with the GPLed code. After a fork/exec it does not.
In anycase I would guess that `import`ing causes the new code to run in the same execution context as the GPLed bit, and you should treat it li... | null | CC BY-SA 2.5 | null | 2008-08-28T00:32:59.693 | 2008-08-28T00:32:59.693 | null | null | 2,509 | null |
31,412 | 1 | 31,421 | null | 9 | 2,439 | I am developing a GPL-licensed application in Python and need to know if the GPL allows my program to use proprietary plug-ins. This is [what the FSF has to say](http://www.gnu.org/licenses/gpl-faq.html) on the issue:
> It depends on how the program invokes its plug-ins. If the program uses fork and exec to invoke plug... | Proprietary plug-ins for GPL programs: what about interpreted languages? | CC BY-SA 2.5 | 0 | 2008-08-28T00:26:35.390 | 2018-06-19T16:14:02.490 | 2020-06-20T09:12:55.060 | -1 | 3,002 | [
"python",
"plugins",
"open-source",
"licensing",
"interpreted-language"
] |
31,423 | 2 | null | 31,412 | 0 | null | How much info are you sharing between the Plugins and the main program? If you are doing anything more than just executing them and waiting for the results (sharing no data between the program and the plugin in the process) then you could most likely get away with them being proprietary, otherwise they would probably n... | null | CC BY-SA 2.5 | null | 2008-08-28T00:33:40.737 | 2008-08-28T00:33:40.737 | null | null | 2,654 | null |
31,391 | 2 | null | 31,296 | 3 | null | See the [Database Publishing Wizard](http://www.codeplex.com/sqlhost/Wiki/View.aspx?title=Database%20Publishing%20Wizard) that is part of the . It generates a single SQL file for both schema and data.
| null | CC BY-SA 3.0 | null | 2008-08-28T00:16:14.383 | 2014-12-13T08:07:02.217 | 2014-12-13T08:07:02.217 | 1,810,429 | 1,278 | null |
31,421 | 2 | null | 31,412 | 7 | null | > he distinction between fork/exec and dynamic linking, besides being kind of artificial,
I don't think its artificial at all. Basically they are just making the division based upon the level of integration. If the program has "plugins" which are essentially fire and forget with no API level integration, then the re... | null | CC BY-SA 2.5 | null | 2008-08-28T00:33:04.157 | 2008-08-28T00:33:04.157 | null | null | 1,432 | null |
31,424 | 1 | 87,823 | null | 4 | 6,219 | When creating a criteria in NHibernate I can use
Restriction.In() or
Restriction.InG()
What is the difference between them?
| NHIbernate: Difference between Restriction.In and Restriction.InG | CC BY-SA 2.5 | null | 2008-08-28T00:33:45.840 | 2008-09-17T21:24:53.310 | null | null | 493 | [
"c#",
"nhibernate",
"orm"
] |
31,418 | 2 | null | 31,324 | 25 | null | You can use a [Derived Column Transformation](http://msdn.microsoft.com/en-us/library/ms141069.aspx) in which you'll create a new output column and set its value to 2. You can then use that column when outputting to SQL.
| null | CC BY-SA 2.5 | null | 2008-08-28T00:30:25.550 | 2008-08-28T00:30:25.550 | null | null | 2,841 | null |