question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
61,256 | 61,329 | IIS uses proxy for webservice request. How to stop this? | I have a problem with a little.Net web application which uses the Amazon webservice. With the integrated Visual Studio web server everything works fine. But after deploying it to the IIS on the same computer i get the following error message: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer best... | Proxy use can be configured in the web.config. The system.net/defaultProxy element will let you specify whether a proxy is used by default or provide a bypass list. For more info see: http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx | IIS uses proxy for webservice request. How to stop this? I have a problem with a little.Net web application which uses the Amazon webservice. With the integrated Visual Studio web server everything works fine. But after deploying it to the IIS on the same computer i get the following error message: Ein Verbindungsversu... | TITLE:
IIS uses proxy for webservice request. How to stop this?
QUESTION:
I have a problem with a little.Net web application which uses the Amazon webservice. With the integrated Visual Studio web server everything works fine. But after deploying it to the IIS on the same computer i get the following error message: Ei... | [
"asp.net",
"web-services",
"iis",
"proxy"
] | 4 | 18 | 25,491 | 3 | 0 | 2008-09-14T10:42:52.880000 | 2008-09-14T13:20:22.500000 |
61,262 | 61,264 | How do you resolve .Net namespace conflicts with the 'using' keyword? | Here's the problem, you include multiple assemblies and add 'using namespaceX' at the top of your code file. Now you want to create a class or use a symbol which is defined in multiple namespaces, e.g. System.Windows.Controls.Image & System.Drawing.Image Now unless you use the fully qualified name, there will be a crib... | Use alias using System.Windows.Controls; using Drawing = System.Drawing;...
Image img =... //System.Windows.Controls.Image Drawing.Image img2 =... //System.Drawing.Image C# using directive | How do you resolve .Net namespace conflicts with the 'using' keyword? Here's the problem, you include multiple assemblies and add 'using namespaceX' at the top of your code file. Now you want to create a class or use a symbol which is defined in multiple namespaces, e.g. System.Windows.Controls.Image & System.Drawing.I... | TITLE:
How do you resolve .Net namespace conflicts with the 'using' keyword?
QUESTION:
Here's the problem, you include multiple assemblies and add 'using namespaceX' at the top of your code file. Now you want to create a class or use a symbol which is defined in multiple namespaces, e.g. System.Windows.Controls.Image ... | [
".net",
"namespaces",
"using"
] | 22 | 35 | 13,224 | 2 | 0 | 2008-09-14T10:52:33.807000 | 2008-09-14T10:55:05.313000 |
61,272 | 61,277 | Breakpoints in core .NET runtime? | I have a third party library that internally constructs and uses the SqlConnection class. I can inherit from the class, but it has a ton of overloads, and so far I have been unable to find the right one. What I'd like is to tack on a parameter to the connection string being used. Is there a way for me to put a breakpoi... | And if you can't use source level debugging with the.Net framework source code Microsoft supplied, you could try a different debugger. Like mdbg or even windbg. edit This explains getting the released parts of.Net framework and how to set breakpoints in great detail. The NetMassDownloader will give you everything (pdb ... | Breakpoints in core .NET runtime? I have a third party library that internally constructs and uses the SqlConnection class. I can inherit from the class, but it has a ton of overloads, and so far I have been unable to find the right one. What I'd like is to tack on a parameter to the connection string being used. Is th... | TITLE:
Breakpoints in core .NET runtime?
QUESTION:
I have a third party library that internally constructs and uses the SqlConnection class. I can inherit from the class, but it has a ton of overloads, and so far I have been unable to find the right one. What I'd like is to tack on a parameter to the connection string... | [
".net",
"runtime",
"breakpoints",
"sqlconnection"
] | 3 | 2 | 2,269 | 6 | 0 | 2008-09-14T11:08:16.780000 | 2008-09-14T11:23:24.420000 |
61,278 | 61,279 | Quick and dirty way to profile your code | What method do you use when you want to get performance data about specific code paths? | This method has several limitations, but I still find it very useful. I'll list the limitations (I know of) up front and let whoever wants to use it do so at their own risk. The original version I posted over-reported time spent in recursive calls (as pointed out in the comments to the answer). It's not thread safe, it... | Quick and dirty way to profile your code What method do you use when you want to get performance data about specific code paths? | TITLE:
Quick and dirty way to profile your code
QUESTION:
What method do you use when you want to get performance data about specific code paths?
ANSWER:
This method has several limitations, but I still find it very useful. I'll list the limitations (I know of) up front and let whoever wants to use it do so at their ... | [
"c++",
"performance",
"profiling",
"code-snippets"
] | 14 | 11 | 11,767 | 8 | 0 | 2008-09-14T11:24:31.313000 | 2008-09-14T11:24:57.160000 |
61,307 | 61,450 | How do I locate a Word application window? | I have a VB.net test application that clicks a link that opens the Microsoft Word application window and displays the document. How do I locate the Word application window so that I can grab some text from it? | You can use the Word COM object to open the work document and then you manipulate it. Make sure to add a reference for Microsoft Word first. Imports System.Runtime.InteropServices Imports Microsoft.Office.Interop.Word
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As Sys... | How do I locate a Word application window? I have a VB.net test application that clicks a link that opens the Microsoft Word application window and displays the document. How do I locate the Word application window so that I can grab some text from it? | TITLE:
How do I locate a Word application window?
QUESTION:
I have a VB.net test application that clicks a link that opens the Microsoft Word application window and displays the document. How do I locate the Word application window so that I can grab some text from it?
ANSWER:
You can use the Word COM object to open ... | [
"windows",
"vb.net",
"interop",
"ms-word",
"ms-office"
] | 2 | 1 | 2,423 | 3 | 0 | 2008-09-14T12:48:45.900000 | 2008-09-14T16:36:29.520000 |
61,317 | 69,453 | Learn Silverlight or WPF first? | It seems that Silverlight/WPF are the long term future for user interface development with.NET. This is great because as I can see the advantage of reusing XAML skills on both the client and web development sides. But looking at WPF/XAML/Silverlight they seem very large technologies and so where is the best place to ge... | Should you learn ASP.NET or Winforms first? ASP or MFC? HTML or VB? C# or VB? Set aside the idea that there is a logical progression through what has become a highly complex interwoven set of technologies, and take a step back and ask yourself a series of questions: What are your goals; how do you want to balance profi... | Learn Silverlight or WPF first? It seems that Silverlight/WPF are the long term future for user interface development with.NET. This is great because as I can see the advantage of reusing XAML skills on both the client and web development sides. But looking at WPF/XAML/Silverlight they seem very large technologies and ... | TITLE:
Learn Silverlight or WPF first?
QUESTION:
It seems that Silverlight/WPF are the long term future for user interface development with.NET. This is great because as I can see the advantage of reusing XAML skills on both the client and web development sides. But looking at WPF/XAML/Silverlight they seem very large... | [
"wpf",
"silverlight"
] | 23 | 28 | 3,815 | 9 | 0 | 2008-09-14T13:09:44.273000 | 2008-09-16T04:47:48.253000 |
61,320 | 61,618 | What are the pros and cons of the SVN plugins for Eclipse, Subclipse and Subversive? | SVN in Eclipse is spread into two camps. The SVN people have developed a plugin called Subclipse. The Eclipse people have a plugin called Subversive. Broadly speaking they both do the same things. What are the advantages and disadvantages of each? | Both are very similar but Subversive is the "eclipse svn provider". I primarily use Subversive because of a few convenient features: Grouping of history When I'm browsing the history of a branch instead of just seeing a bunch of rows for every commit it can group commits by today, week, etc. Mapping of trunk, branches,... | What are the pros and cons of the SVN plugins for Eclipse, Subclipse and Subversive? SVN in Eclipse is spread into two camps. The SVN people have developed a plugin called Subclipse. The Eclipse people have a plugin called Subversive. Broadly speaking they both do the same things. What are the advantages and disadvanta... | TITLE:
What are the pros and cons of the SVN plugins for Eclipse, Subclipse and Subversive?
QUESTION:
SVN in Eclipse is spread into two camps. The SVN people have developed a plugin called Subclipse. The Eclipse people have a plugin called Subversive. Broadly speaking they both do the same things. What are the advanta... | [
"svn",
"eclipse",
"subclipse",
"subversive"
] | 639 | 177 | 440,735 | 32 | 0 | 2008-09-14T13:14:58.083000 | 2008-09-14T20:34:46.043000 |
61,339 | 61,468 | Getting user photo from SPUser using WSS Object model | I am trying to retrieve a user on Sharepoint's user photo through the WSS 3.0 object model. I have been browsing the web for solutions, but so far I've been unable to find a way to do it. Is it possible, and if so how? | Here is a code snippet that should help get the job done for you. You may need to do some additional validation to avoid any exceptions (ensuring the profile actually exists, ensuring the image URL actually exists, etc...): //get current profile manager UserProfileManager objUserProfileManager = new UserProfileManager(... | Getting user photo from SPUser using WSS Object model I am trying to retrieve a user on Sharepoint's user photo through the WSS 3.0 object model. I have been browsing the web for solutions, but so far I've been unable to find a way to do it. Is it possible, and if so how? | TITLE:
Getting user photo from SPUser using WSS Object model
QUESTION:
I am trying to retrieve a user on Sharepoint's user photo through the WSS 3.0 object model. I have been browsing the web for solutions, but so far I've been unable to find a way to do it. Is it possible, and if so how?
ANSWER:
Here is a code snipp... | [
"sharepoint",
"photo",
"wss"
] | 4 | 5 | 10,531 | 3 | 0 | 2008-09-14T13:47:59.517000 | 2008-09-14T17:06:42.707000 |
61,341 | 61,350 | Is there a way to insert assembly code into C? | I remember back in the day with the old borland DOS compiler you could do something like this: asm { mov ax,ex etc etc... } Is there a semi-platform independent way to do this now? I have a need to make a BIOS call, so if there was a way to do this without asm code, that would be equally useful to me. | Using GCC __asm__("movl %edx, %eax\n\t" "addl $2, %eax\n\t"); Using VC++ __asm { mov eax, edx add eax, 2 } | Is there a way to insert assembly code into C? I remember back in the day with the old borland DOS compiler you could do something like this: asm { mov ax,ex etc etc... } Is there a semi-platform independent way to do this now? I have a need to make a BIOS call, so if there was a way to do this without asm code, that w... | TITLE:
Is there a way to insert assembly code into C?
QUESTION:
I remember back in the day with the old borland DOS compiler you could do something like this: asm { mov ax,ex etc etc... } Is there a semi-platform independent way to do this now? I have a need to make a BIOS call, so if there was a way to do this withou... | [
"c",
"inline-assembly",
"assembly"
] | 85 | 89 | 124,689 | 5 | 0 | 2008-09-14T13:55:31.200000 | 2008-09-14T14:05:30.787000 |
61,342 | 61,351 | Threads or asynch? | How do you make your application multithreaded? Do you use asynch functions? or do you spawn a new thread? I think that asynch functions are already spawning a thread so if your job is doing just some file reading, being lazy and just spawning your job on a thread would just "waste" ressources... So is there some kind ... | Spawning threads is only going to waste resources if you start spawning tons of them, one or two extra threads isn't going to effect the platforms proformance, infact System currently has over 70 threads for me, and msn is using 32 (I really have no idea how a messenger can use that many threads, exspecialy when its mi... | Threads or asynch? How do you make your application multithreaded? Do you use asynch functions? or do you spawn a new thread? I think that asynch functions are already spawning a thread so if your job is doing just some file reading, being lazy and just spawning your job on a thread would just "waste" ressources... So ... | TITLE:
Threads or asynch?
QUESTION:
How do you make your application multithreaded? Do you use asynch functions? or do you spawn a new thread? I think that asynch functions are already spawning a thread so if your job is doing just some file reading, being lazy and just spawning your job on a thread would just "waste"... | [
"multithreading",
"language-agnostic"
] | 9 | 6 | 490 | 5 | 0 | 2008-09-14T13:56:14.990000 | 2008-09-14T14:06:39.223000 |
61,346 | 61,365 | Can an iPhone App Be Run as Root? | I am thinking about the design of an iPhone app I'd like to create. One possible problem is that this application will have to run as root (to access certain network ports). In a typical UNIX app, I'd just get the app to run with setuid, but I'm wondering if that is possible with an iPhone app. I've read this question ... | Section 3.3.4 of the iPhone SDK Agreement suggests that you mustn't work outside your sandbox. Given that Apple has been somewhat arbitrary on which applications they permit, you should definitely double-check with them before you start developing. Compared to 2.0.x, the sandbox restrictions have actually increased in ... | Can an iPhone App Be Run as Root? I am thinking about the design of an iPhone app I'd like to create. One possible problem is that this application will have to run as root (to access certain network ports). In a typical UNIX app, I'd just get the app to run with setuid, but I'm wondering if that is possible with an iP... | TITLE:
Can an iPhone App Be Run as Root?
QUESTION:
I am thinking about the design of an iPhone app I'd like to create. One possible problem is that this application will have to run as root (to access certain network ports). In a typical UNIX app, I'd just get the app to run with setuid, but I'm wondering if that is p... | [
"iphone",
"permissions",
"setuid"
] | 4 | 5 | 3,542 | 3 | 0 | 2008-09-14T14:01:07.770000 | 2008-09-14T14:22:54.487000 |
61,354 | 1,228,834 | How to get entire chain of Exceptions in Application.ThreadException event handler? | I was just working on fixing up exception handling in a.NET 2.0 app, and I stumbled onto some weird issue with Application.ThreadException. What I want is to be able to catch all exceptions from events behind GUI elements (e.g. button_Click, etc.). I then want to filter these exceptions on 'fatality', e.g. with some ty... | This question is more usefully phrased and answered here: Why does the inner exception reach the ThreadException handler and not the actual thrown exception? | How to get entire chain of Exceptions in Application.ThreadException event handler? I was just working on fixing up exception handling in a.NET 2.0 app, and I stumbled onto some weird issue with Application.ThreadException. What I want is to be able to catch all exceptions from events behind GUI elements (e.g. button_C... | TITLE:
How to get entire chain of Exceptions in Application.ThreadException event handler?
QUESTION:
I was just working on fixing up exception handling in a.NET 2.0 app, and I stumbled onto some weird issue with Application.ThreadException. What I want is to be able to catch all exceptions from events behind GUI eleme... | [
".net",
"winforms",
"exception"
] | 5 | 4 | 2,933 | 7 | 0 | 2008-09-14T14:08:15.617000 | 2009-08-04T17:25:26.963000 |
61,357 | 61,362 | Using CSS how best to display name value pairs? | Should I still be using tables anyway? The table code I'd be replacing is: Name Value... From what I've been reading I should have something like Name Value... Ideas and links to online samples greatly appreciated. I'm a developer way out of my design depth. EDIT: My need is to be able to both to display the data to a ... | I think that definition lists are pretty close semantically to name/value pairs. Name Value Definition lists - misused or misunderstood? | Using CSS how best to display name value pairs? Should I still be using tables anyway? The table code I'd be replacing is: Name Value... From what I've been reading I should have something like Name Value... Ideas and links to online samples greatly appreciated. I'm a developer way out of my design depth. EDIT: My need... | TITLE:
Using CSS how best to display name value pairs?
QUESTION:
Should I still be using tables anyway? The table code I'd be replacing is: Name Value... From what I've been reading I should have something like Name Value... Ideas and links to online samples greatly appreciated. I'm a developer way out of my design de... | [
"html",
"css"
] | 40 | 54 | 38,264 | 7 | 0 | 2008-09-14T14:14:20.640000 | 2008-09-14T14:17:59.850000 |
61,383 | 61,411 | Is there a good admin generator for Ruby on Rails? | My current project is in Rails. Coming from a Symfony (PHP) and Django (Python) background, they both have excellent admin generators. Seems like this is missing in Rails. For those who aren't familiar with Symfony or Django, they both allow you to specify some metadata around your models to automatically (dynamically)... | Scaffolding is the normal way to create an admin backend BUT there is a project called ActiveScaffold which may solve your problem. | Is there a good admin generator for Ruby on Rails? My current project is in Rails. Coming from a Symfony (PHP) and Django (Python) background, they both have excellent admin generators. Seems like this is missing in Rails. For those who aren't familiar with Symfony or Django, they both allow you to specify some metadat... | TITLE:
Is there a good admin generator for Ruby on Rails?
QUESTION:
My current project is in Rails. Coming from a Symfony (PHP) and Django (Python) background, they both have excellent admin generators. Seems like this is missing in Rails. For those who aren't familiar with Symfony or Django, they both allow you to sp... | [
"ruby-on-rails",
"ruby"
] | 36 | 11 | 17,640 | 13 | 0 | 2008-09-14T14:41:11.557000 | 2008-09-14T15:34:17.873000 |
61,386 | 62,524 | Is knowing blend required? | Do you expect your WPF developers to know expression blend? Any good resources for learning more about Blend? [UPDATE] Does knowing blend make you more productive? | I found Blend a great way to ease into XAML. Many of the common things you want to do are easy in Blend, especially databinding. Databinding has no intellisense and I found doing things in Blend a great way of discovering how do write the databinding syntax. I now find myself mostly editing raw XAML buy hand. The areas... | Is knowing blend required? Do you expect your WPF developers to know expression blend? Any good resources for learning more about Blend? [UPDATE] Does knowing blend make you more productive? | TITLE:
Is knowing blend required?
QUESTION:
Do you expect your WPF developers to know expression blend? Any good resources for learning more about Blend? [UPDATE] Does knowing blend make you more productive?
ANSWER:
I found Blend a great way to ease into XAML. Many of the common things you want to do are easy in Blen... | [
"wpf",
"xaml",
"expression-blend"
] | 9 | 12 | 1,372 | 14 | 0 | 2008-09-14T14:50:10.757000 | 2008-09-15T12:51:34.683000 |
61,399 | 300,912 | Enhancing the web user experience for the vision impaired | I was listening to a recent episode of Hanselminutes where Scott Hanselman was discussing accessibility in web applications and it got me thinking about accessibility in my own applications. We all understand the importance of semantic markup in our web applications as it relates to accessibility but what about other s... | Check out Fangs Fangs is an in-browser tool for Firefox that emulates what a screen reader “sees” when visiting a Web page. Its function is simple: to output a transcript of what a screen reader will read out to a user when a Web page is visited. It’s a helpful tool for quickly analyzing if you’ve structured your conte... | Enhancing the web user experience for the vision impaired I was listening to a recent episode of Hanselminutes where Scott Hanselman was discussing accessibility in web applications and it got me thinking about accessibility in my own applications. We all understand the importance of semantic markup in our web applicat... | TITLE:
Enhancing the web user experience for the vision impaired
QUESTION:
I was listening to a recent episode of Hanselminutes where Scott Hanselman was discussing accessibility in web applications and it got me thinking about accessibility in my own applications. We all understand the importance of semantic markup i... | [
"accessibility",
"section508"
] | 6 | 4 | 383 | 7 | 0 | 2008-09-14T15:18:32.373000 | 2008-11-19T03:27:36.157000 |
61,400 | 61,868 | What Makes a Good Unit Test? | I'm sure most of you are writing lots of automated tests and that you also have run into some common pitfalls when unit testing. My question is do you follow any rules of conduct for writing tests in order to avoid problems in the future? To be more specific: What are the properties of good unit tests or how do you wri... | Let me begin by plugging sources - Pragmatic Unit Testing in Java with JUnit (There's a version with C#-Nunit too.. but I have this one.. its agnostic for the most part. Recommended.) Good Tests should be A TRIP (The acronymn isn't sticky enough - I have a printout of the cheatsheet in the book that I had to pull out t... | What Makes a Good Unit Test? I'm sure most of you are writing lots of automated tests and that you also have run into some common pitfalls when unit testing. My question is do you follow any rules of conduct for writing tests in order to avoid problems in the future? To be more specific: What are the properties of good... | TITLE:
What Makes a Good Unit Test?
QUESTION:
I'm sure most of you are writing lots of automated tests and that you also have run into some common pitfalls when unit testing. My question is do you follow any rules of conduct for writing tests in order to avoid problems in the future? To be more specific: What are the ... | [
"unit-testing",
"language-agnostic",
"tdd",
"integration-testing",
"testing-strategies"
] | 97 | 93 | 58,014 | 18 | 0 | 2008-09-14T15:20:44.583000 | 2008-09-15T04:50:59.003000 |
61,402 | 61,435 | C++ Exception code lookup | Knowing an exception code, is there a way to find out more about what the actual exception that was thrown means? My exception in question: 0x64487347 Exception address: 0x1 The call stack shows no information. I'm reviewing a.dmp of a crash and not actually debugging in Visual Studio. | Because you're reviewing a crash dump I'll assume it came in from a customer and you cannot easily reproduce the fault with more instrumentation. I don't have much help to offer save to note that the exception code 0x64487347 is ASCII "dShG", and developers often use the initials of the routine or fault condition when ... | C++ Exception code lookup Knowing an exception code, is there a way to find out more about what the actual exception that was thrown means? My exception in question: 0x64487347 Exception address: 0x1 The call stack shows no information. I'm reviewing a.dmp of a crash and not actually debugging in Visual Studio. | TITLE:
C++ Exception code lookup
QUESTION:
Knowing an exception code, is there a way to find out more about what the actual exception that was thrown means? My exception in question: 0x64487347 Exception address: 0x1 The call stack shows no information. I'm reviewing a.dmp of a crash and not actually debugging in Visu... | [
"c++",
"exception",
"visual-c++",
"crash",
"memory-dump"
] | 1 | 4 | 8,758 | 3 | 0 | 2008-09-14T15:21:34.457000 | 2008-09-14T16:13:31.930000 |
61,405 | 62,009 | How do I make a subproject with Qt? | I'm about to start on a large Qt application, which is made up of smaller components (groups of classes that work together). For example, there might be a dialog that is used in the project, but should be developed on its own before being integrated into the project. Instead of working on it in another folder somewhere... | Here is what I would do. Let's say I want the following folder hierarchy: /MyWholeApp will contain the files for the whole application. /MyWholeApp/DummyDlg/ will contain the files for the standalone dialogbox which will be eventually part of the whole application. I would develop the standalone dialog box and the rela... | How do I make a subproject with Qt? I'm about to start on a large Qt application, which is made up of smaller components (groups of classes that work together). For example, there might be a dialog that is used in the project, but should be developed on its own before being integrated into the project. Instead of worki... | TITLE:
How do I make a subproject with Qt?
QUESTION:
I'm about to start on a large Qt application, which is made up of smaller components (groups of classes that work together). For example, there might be a dialog that is used in the project, but should be developed on its own before being integrated into the project... | [
"qt"
] | 17 | 24 | 20,068 | 3 | 0 | 2008-09-14T15:26:19.343000 | 2008-09-15T09:09:49.427000 |
61,418 | 61,426 | How to disable a warning in Delphi about "return value ... might be undefined"? | I have a function that gives me the following warning: [DCC Warning] filename.pas(6939): W1035 Return value of function 'function' might be undefined The function, however, is clean, small, and does have a known, expected, return value. The first statement in the function is: Result:= ''; and there is no local variable... | Are you sure you have done everything to solve the warning? Maybe you could post the code for us to look at? You can turn off the warning locally this way: {$WARN NO_RETVAL OFF} function func(...): string; begin... end; {$WARN NO_RETVAL ON} | How to disable a warning in Delphi about "return value ... might be undefined"? I have a function that gives me the following warning: [DCC Warning] filename.pas(6939): W1035 Return value of function 'function' might be undefined The function, however, is clean, small, and does have a known, expected, return value. The... | TITLE:
How to disable a warning in Delphi about "return value ... might be undefined"?
QUESTION:
I have a function that gives me the following warning: [DCC Warning] filename.pas(6939): W1035 Return value of function 'function' might be undefined The function, however, is clean, small, and does have a known, expected,... | [
"delphi",
"warnings",
"directive"
] | 9 | 8 | 6,279 | 6 | 0 | 2008-09-14T15:40:38.060000 | 2008-09-14T15:49:57.837000 |
61,421 | 2,135,255 | How do I make a ListBox refresh its item text? | I'm making an example for someone who hasn't yet realized that controls like ListBox don't have to contain strings; he had been storing formatted strings and jumping through complicated parsing hoops to get the data back out of the ListBox and I'd like to show him there's a better way. I noticed that if I have an objec... | BindingList handles updating the bindings by itself. using System; using System.ComponentModel; using System.Windows.Forms;
namespace TestBindingList { public class Employee { public string Name { get; set; } public int Id { get; set; } }
public partial class Form1: Form { private BindingList _employees;
private Lis... | How do I make a ListBox refresh its item text? I'm making an example for someone who hasn't yet realized that controls like ListBox don't have to contain strings; he had been storing formatted strings and jumping through complicated parsing hoops to get the data back out of the ListBox and I'd like to show him there's ... | TITLE:
How do I make a ListBox refresh its item text?
QUESTION:
I'm making an example for someone who hasn't yet realized that controls like ListBox don't have to contain strings; he had been storing formatted strings and jumping through complicated parsing hoops to get the data back out of the ListBox and I'd like to... | [
".net",
"winforms",
"user-interface"
] | 45 | 25 | 71,291 | 13 | 0 | 2008-09-14T15:43:14.280000 | 2010-01-25T20:09:43.900000 |
61,446 | 61,447 | What is the best code template facility for Emacs? | Particularly, what is the best snippets package out there? Features: easy to define new snippets (plain text, custom input with defaults) simple navigation between predefined positions in the snippet multiple insertion of the same custom input accepts currently selected text as a custom input cross-platform (Windows, L... | TextMate's snippets is the most closest match but it is not a cross-platform solution and not for Emacs. The second closest thing is YASnippet ( screencast shows the main capabilities). But it interferes with hippie-expand package in my setup and the embedded language is EmacsLisp which I'm not comfortable with outside... | What is the best code template facility for Emacs? Particularly, what is the best snippets package out there? Features: easy to define new snippets (plain text, custom input with defaults) simple navigation between predefined positions in the snippet multiple insertion of the same custom input accepts currently selecte... | TITLE:
What is the best code template facility for Emacs?
QUESTION:
Particularly, what is the best snippets package out there? Features: easy to define new snippets (plain text, custom input with defaults) simple navigation between predefined positions in the snippet multiple insertion of the same custom input accepts... | [
"emacs",
"template-engine",
"code-snippets"
] | 30 | 23 | 13,734 | 6 | 0 | 2008-09-14T16:27:21.880000 | 2008-09-14T16:30:24.150000 |
61,449 | 61,455 | How do I access the host machine from the guest machine? | I've just created a new Windows XP VM on my Mac using VMware Fusion. The VM is using NAT to share the host's internet connection. How do I access a Rails application, which is accessible on the Mac itself using http://localhost:3000? | On the XP machine, find your IP address by going to the command prompt and typing ipconfig. Try replacing the last number with 1 or 2. For example, if your IP address is 192.168.78.128, use http://192.168.78.1:3000. | How do I access the host machine from the guest machine? I've just created a new Windows XP VM on my Mac using VMware Fusion. The VM is using NAT to share the host's internet connection. How do I access a Rails application, which is accessible on the Mac itself using http://localhost:3000? | TITLE:
How do I access the host machine from the guest machine?
QUESTION:
I've just created a new Windows XP VM on my Mac using VMware Fusion. The VM is using NAT to share the host's internet connection. How do I access a Rails application, which is accessible on the Mac itself using http://localhost:3000?
ANSWER:
On... | [
"networking",
"virtual-machine",
"vmware"
] | 131 | 139 | 130,501 | 7 | 0 | 2008-09-14T16:32:18.063000 | 2008-09-14T16:40:51.893000 |
61,451 | 67,590 | Does Django have HTML helpers? | Does Django have any template tags to generate common HTML markup? For example, I know that I can get a url using {% url mapper.views.foo %} But that only gives me the URL and not the HTML code to create the link. Does Django have anything similar to Rails' link_to helper? I found django-helpers but since this is a com... | No it doesn't. James Bennett answered a similar question a while back, regarding Rails' built-in JavaScript helpers. It's really unlikely that Django will ever have 'helper' functionality built-in. The reason, if I understand correctly, has to do with Django's core philosophy of keeping things loosely coupled. Having t... | Does Django have HTML helpers? Does Django have any template tags to generate common HTML markup? For example, I know that I can get a url using {% url mapper.views.foo %} But that only gives me the URL and not the HTML code to create the link. Does Django have anything similar to Rails' link_to helper? I found django-... | TITLE:
Does Django have HTML helpers?
QUESTION:
Does Django have any template tags to generate common HTML markup? For example, I know that I can get a url using {% url mapper.views.foo %} But that only gives me the URL and not the HTML code to create the link. Does Django have anything similar to Rails' link_to helpe... | [
"html",
"django"
] | 25 | 26 | 10,035 | 6 | 0 | 2008-09-14T16:37:32.650000 | 2008-09-15T22:22:19.897000 |
61,456 | 66,527 | MVC.net jQuery Validation | After trying to avoid JavaScript for years, Iv started using Query for validation in MVC asp.net, as there does not seem to be an official way of doing validation, Iv been surprised how good jQuery is. Firstly is there a way to get intellisense working for jQuery and its validation plugin, so that i don have to learn t... | Try specifying both a wrapper and a label container in your options. I also added display:none; to the style of error-container to let jQuery decide when to show it. $().ready(function() {
$("#CreateLog").validate({
errorLabelContainer: $("ul", $('div.error-container')),
wrapper: 'li',
rules: {
UserName: {
requi... | MVC.net jQuery Validation After trying to avoid JavaScript for years, Iv started using Query for validation in MVC asp.net, as there does not seem to be an official way of doing validation, Iv been surprised how good jQuery is. Firstly is there a way to get intellisense working for jQuery and its validation plugin, so ... | TITLE:
MVC.net jQuery Validation
QUESTION:
After trying to avoid JavaScript for years, Iv started using Query for validation in MVC asp.net, as there does not seem to be an official way of doing validation, Iv been surprised how good jQuery is. Firstly is there a way to get intellisense working for jQuery and its vali... | [
"jquery",
"asp.net-mvc",
"validation"
] | 14 | 11 | 23,647 | 4 | 0 | 2008-09-14T16:43:56.147000 | 2008-09-15T20:18:55.763000 |
61,486 | 61,500 | Figure out div that is visible out of four divs | I need to figure out what div is visible out of four possible divs using jQuery. Only one of those div's will be visible at any given time. This is what I have that works so far: $("#FeatureImage1:visible, #FeatureImage2:visible, #FeatureImage3:visible, #FeatureImage4:visible").attr("id"); Is there a way to refactor th... | Assign the same class to each div then: $("div.myClass:visible").attr("id"); | Figure out div that is visible out of four divs I need to figure out what div is visible out of four possible divs using jQuery. Only one of those div's will be visible at any given time. This is what I have that works so far: $("#FeatureImage1:visible, #FeatureImage2:visible, #FeatureImage3:visible, #FeatureImage4:vis... | TITLE:
Figure out div that is visible out of four divs
QUESTION:
I need to figure out what div is visible out of four possible divs using jQuery. Only one of those div's will be visible at any given time. This is what I have that works so far: $("#FeatureImage1:visible, #FeatureImage2:visible, #FeatureImage3:visible, ... | [
"jquery",
"dom",
"css-selectors"
] | 6 | 15 | 8,740 | 2 | 0 | 2008-09-14T17:27:28.210000 | 2008-09-14T17:44:25.597000 |
61,517 | 62,680 | Python dictionary from an object's fields | Do you know if there is a built-in function to build a dictionary from an arbitrary object? I'd like to do something like this: >>> class Foo:... bar = 'hello'... baz = 'world'... >>> f = Foo() >>> props(f) { 'bar': 'hello', 'baz': 'world' } NOTE: It should not include methods. Only fields. | Note that best practice in Python 2.7 is to use new-style classes (not needed with Python 3), i.e. class Foo(object):... Also, there's a difference between an 'object' and a 'class'. To build a dictionary from an arbitrary object, it's sufficient to use __dict__. Usually, you'll declare your methods at class level and ... | Python dictionary from an object's fields Do you know if there is a built-in function to build a dictionary from an arbitrary object? I'd like to do something like this: >>> class Foo:... bar = 'hello'... baz = 'world'... >>> f = Foo() >>> props(f) { 'bar': 'hello', 'baz': 'world' } NOTE: It should not include methods.... | TITLE:
Python dictionary from an object's fields
QUESTION:
Do you know if there is a built-in function to build a dictionary from an arbitrary object? I'd like to do something like this: >>> class Foo:... bar = 'hello'... baz = 'world'... >>> f = Foo() >>> props(f) { 'bar': 'hello', 'baz': 'world' } NOTE: It should no... | [
"python",
"dictionary",
"attributes",
"object",
"metaprogramming"
] | 508 | 613 | 767,974 | 21 | 0 | 2008-09-14T18:00:43.030000 | 2008-09-15T13:08:56.107000 |
61,520 | 61,526 | What are the pros and cons of object databases? | There is a lot of information out there on object-relational mappers and how to best avoid impedance mismatch, all of which seem to be moot points if one were to use an object database. My question is why isn't this used more frequently? Is it because of performance reasons or because object databases cause your data t... | Familiarity. The administrators of databases know relational concepts; object ones, not so much. Performance. Relational databases have been proven to scale far better. Maturity. SQL is a powerful, long-developed language. Vendor support. You can pick between many more first-party (SQL servers) and third-party (adminis... | What are the pros and cons of object databases? There is a lot of information out there on object-relational mappers and how to best avoid impedance mismatch, all of which seem to be moot points if one were to use an object database. My question is why isn't this used more frequently? Is it because of performance reaso... | TITLE:
What are the pros and cons of object databases?
QUESTION:
There is a lot of information out there on object-relational mappers and how to best avoid impedance mismatch, all of which seem to be moot points if one were to use an object database. My question is why isn't this used more frequently? Is it because of... | [
"database",
"oop",
"rdbms",
"relational",
"object-oriented-database"
] | 10 | 12 | 4,857 | 7 | 0 | 2008-09-14T18:04:57.543000 | 2008-09-14T18:11:49.633000 |
61,524 | 61,603 | Testing network interrupts in software | I have a network C++ program in Windows that I'd like to test for network disconnects at various times. What are my options? Currently I am: Actually disconnecting the network wire from the back of my computer using ipconfig /release Using the cports program to close out the socket completely None of these methods thou... | You might want to abstract the network layer, and then you can have unit tests that inject interesting failure events at appropriate points. | Testing network interrupts in software I have a network C++ program in Windows that I'd like to test for network disconnects at various times. What are my options? Currently I am: Actually disconnecting the network wire from the back of my computer using ipconfig /release Using the cports program to close out the socke... | TITLE:
Testing network interrupts in software
QUESTION:
I have a network C++ program in Windows that I'd like to test for network disconnects at various times. What are my options? Currently I am: Actually disconnecting the network wire from the back of my computer using ipconfig /release Using the cports program to c... | [
"windows",
"testing",
"networking",
"network-programming"
] | 11 | 11 | 2,014 | 4 | 0 | 2008-09-14T18:09:36.317000 | 2008-09-14T20:09:03.703000 |
61,535 | 61,546 | How To Discover RSS Feeds for a given URL | I get a URL from a user. I need to know: a) is the URL a valid RSS feed? b) if not is there a valid feed associated with that URL using PHP/Javascript or something similar (Ex. http://techcrunch.com fails a), but b) would return their RSS feed) | Found something that I wanted: Google's AJAX Feed API has a load feed and lookup feed function (Docs here ). a) Load feed provides the feed (and feed status) in JSON b) Lookup feed provides the RSS feed for a given URL Theres also a find feed function that searches for RSS feeds based on a keyword. Planning to use this... | How To Discover RSS Feeds for a given URL I get a URL from a user. I need to know: a) is the URL a valid RSS feed? b) if not is there a valid feed associated with that URL using PHP/Javascript or something similar (Ex. http://techcrunch.com fails a), but b) would return their RSS feed) | TITLE:
How To Discover RSS Feeds for a given URL
QUESTION:
I get a URL from a user. I need to know: a) is the URL a valid RSS feed? b) if not is there a valid feed associated with that URL using PHP/Javascript or something similar (Ex. http://techcrunch.com fails a), but b) would return their RSS feed)
ANSWER:
Found ... | [
"php",
"rss",
"feed",
"atom-feed"
] | 20 | 20 | 7,461 | 6 | 0 | 2008-09-14T18:32:37.837000 | 2008-09-14T18:45:06.433000 |
61,559 | 61,565 | Is .NET/Mono or Java the better choice for cross-platform development? | How much less libraries are there for Mono than for Java? I lack the overview over both alternatives but I have pretty much freedom of choice for my next project. I'm looking for hard technical facts in the areas of performance (for example, I'm told Java is good for threading, and I hear the runtime code optimization ... | Well....Java is actually more portable. Mono isn't implemented everywhere, and it lags behind the Microsoft implementation significantly. The Java SDK seems to stay in better sync across platforms (and it works on more platforms). I'd also say Java has more tool availability across all those platforms, although there a... | Is .NET/Mono or Java the better choice for cross-platform development? How much less libraries are there for Mono than for Java? I lack the overview over both alternatives but I have pretty much freedom of choice for my next project. I'm looking for hard technical facts in the areas of performance (for example, I'm tol... | TITLE:
Is .NET/Mono or Java the better choice for cross-platform development?
QUESTION:
How much less libraries are there for Mono than for Java? I lack the overview over both alternatives but I have pretty much freedom of choice for my next project. I'm looking for hard technical facts in the areas of performance (fo... | [
"java",
".net",
"linux",
"mono",
"cross-platform"
] | 111 | 96 | 26,513 | 15 | 0 | 2008-09-14T19:00:24.460000 | 2008-09-14T19:05:57.647000 |
61,598 | 62,003 | Code to make a DHTMLEd control replace straight quotes with curly quotes | I've got an old, legacy VB6 application that uses the DHTML editing control as an HTML editor. The Microsoft DHTML editing control, a.k.a. DHTMLEd, is probably nothing more than an IE control using IE's own native editing capability internally. I'd like to modify the app to implement smart quotes like Word. Specificall... | Here's the VB6 version: Private Sub DHTMLEdit1_onkeypress() Dim e As Object Set e = DHTMLEdit1.DOM.parentWindow.event 'Perform smart-quote replacement' Select Case e.keyCode Case 34: 'Double-Quote' e.keyCode = 0 If IsAtWordEnd Then InsertDoubleUndo ChrW$(8221), ChrW$(34) Else InsertDoubleUndo ChrW$(8220), ChrW$(34) End... | Code to make a DHTMLEd control replace straight quotes with curly quotes I've got an old, legacy VB6 application that uses the DHTML editing control as an HTML editor. The Microsoft DHTML editing control, a.k.a. DHTMLEd, is probably nothing more than an IE control using IE's own native editing capability internally. I'... | TITLE:
Code to make a DHTMLEd control replace straight quotes with curly quotes
QUESTION:
I've got an old, legacy VB6 application that uses the DHTML editing control as an HTML editor. The Microsoft DHTML editing control, a.k.a. DHTMLEd, is probably nothing more than an IE control using IE's own native editing capabil... | [
"html",
"dom",
"vb6"
] | 10 | 15 | 2,141 | 1 | 0 | 2008-09-14T19:51:48.613000 | 2008-09-15T08:57:53.247000 |
61,604 | 61,612 | api documentation and "value limits": do they match? | Do you often see in API documentation (as in 'javadoc of public functions' for example) the description of "value limits" as well as the classic documentation? Note: I am not talking about comments within the code By "value limits", I mean: does a parameter can support a null value (or an empty String, or...)? does a '... | I think they can belong together but don't necessarily have to belong together. In your scenario, it seems like it makes sense that the limits are documented in such a way that they appear in the generated API documentation and intellisense (if the language/IDE support it). I think it does depend on the language as wel... | api documentation and "value limits": do they match? Do you often see in API documentation (as in 'javadoc of public functions' for example) the description of "value limits" as well as the classic documentation? Note: I am not talking about comments within the code By "value limits", I mean: does a parameter can suppo... | TITLE:
api documentation and "value limits": do they match?
QUESTION:
Do you often see in API documentation (as in 'javadoc of public functions' for example) the description of "value limits" as well as the classic documentation? Note: I am not talking about comments within the code By "value limits", I mean: does a p... | [
"language-agnostic",
"documentation",
"comments",
"design-by-contract"
] | 6 | 5 | 1,479 | 5 | 0 | 2008-09-14T20:13:51.227000 | 2008-09-14T20:21:57.417000 |
61,605 | 61,636 | Is it pythonic for a function to return multiple values? | In python, you can have a function return multiple values. Here's a contrived example: def divide(x, y): quotient = x/y remainder = x % y return quotient, remainder
(q, r) = divide(22, 7) This seems very useful, but it looks like it can also be abused ("Well..function X already computes what we need as an intermediate... | Absolutely (for the example you provided). Tuples are first class citizens in Python There is a builtin function divmod() that does exactly that. q, r = divmod(x, y) # ((x - x%y)/y, x%y) Invariant: div*y + mod == x There are other examples: zip, enumerate, dict.items. for i, e in enumerate([1, 3, 3]): print "index=%d, ... | Is it pythonic for a function to return multiple values? In python, you can have a function return multiple values. Here's a contrived example: def divide(x, y): quotient = x/y remainder = x % y return quotient, remainder
(q, r) = divide(22, 7) This seems very useful, but it looks like it can also be abused ("Well..fu... | TITLE:
Is it pythonic for a function to return multiple values?
QUESTION:
In python, you can have a function return multiple values. Here's a contrived example: def divide(x, y): quotient = x/y remainder = x % y return quotient, remainder
(q, r) = divide(22, 7) This seems very useful, but it looks like it can also be... | [
"python",
"function",
"return-value",
"multiple-return-values"
] | 89 | 115 | 68,013 | 9 | 0 | 2008-09-14T20:15:19.977000 | 2008-09-14T20:54:14.190000 |
61,615 | 61,624 | Should you use international identifiers in Java/C#? | C# and Java allow almost any character in class names, method names, local variables, etc.. Is it bad practice to use non-ASCII characters, testing the boundaries of poor editors and analysis tools and making it difficult for some people to read, or is American arrogance the only argument against? | I would stick to english, simply because you usually never know who is working on that code, and because some third-party tools used in the build/testing/bugtracking progress may have problems. Typing äöüß on a Non-German Keyboard is simply a PITA, and I simply believe that anyone involved in software development shoul... | Should you use international identifiers in Java/C#? C# and Java allow almost any character in class names, method names, local variables, etc.. Is it bad practice to use non-ASCII characters, testing the boundaries of poor editors and analysis tools and making it difficult for some people to read, or is American arrog... | TITLE:
Should you use international identifiers in Java/C#?
QUESTION:
C# and Java allow almost any character in class names, method names, local variables, etc.. Is it bad practice to use non-ASCII characters, testing the boundaries of poor editors and analysis tools and making it difficult for some people to read, or... | [
"c#",
"java",
"coding-style"
] | 27 | 36 | 19,858 | 11 | 0 | 2008-09-14T20:28:43.050000 | 2008-09-14T20:38:19.530000 |
61,622 | 61,660 | NHibernate and shared web hosting | Has anyone been able to get an NHibernate-based project up and running on a shared web host? NHibernate does a whole lot of fancy stuff with reflection behind the scenes but the host that I'm using at the moment only allows applications to run in medium trust, which limits what you can do with reflection, and it's thro... | I have had no issues with running NHibernate based apps on WebHost4Life, although I don't like them. Getting NHibernate to run on medium trust is possible. A full description on how this can be done is found here: http://blechie.com/WPierce/archive/2008/02/17/Lazy-Loading-with-nHibernate-Under-Medium-Trust.aspx | NHibernate and shared web hosting Has anyone been able to get an NHibernate-based project up and running on a shared web host? NHibernate does a whole lot of fancy stuff with reflection behind the scenes but the host that I'm using at the moment only allows applications to run in medium trust, which limits what you can... | TITLE:
NHibernate and shared web hosting
QUESTION:
Has anyone been able to get an NHibernate-based project up and running on a shared web host? NHibernate does a whole lot of fancy stuff with reflection behind the scenes but the host that I'm using at the moment only allows applications to run in medium trust, which l... | [
"security",
"nhibernate",
"web-hosting"
] | 4 | 12 | 1,882 | 3 | 0 | 2008-09-14T20:37:13.217000 | 2008-09-14T21:18:57.263000 |
61,655 | 61,664 | Are there any JavaScript live syntax highlighters? | I've found syntax highlighters that highlight pre-existing code, but I'd like to do it as you type with a WYSIWYG-style editor. I don't need auto-completed functions, just the highlighting. As a follow-up question, what is the WYSIWYG editor that stackoverflow uses? Edit: Thanks to the answer below, I found two that lo... | Here is a really interesting article about how to write one: (Even better, he gives the full source to a JavaScript formatter and colorizer.) Implementing a syntax-higlighting JavaScript editor in JavaScript or A brutal odyssey to the dark side of the DOM tree How does one do decent syntax highlighting? A very simple s... | Are there any JavaScript live syntax highlighters? I've found syntax highlighters that highlight pre-existing code, but I'd like to do it as you type with a WYSIWYG-style editor. I don't need auto-completed functions, just the highlighting. As a follow-up question, what is the WYSIWYG editor that stackoverflow uses? Ed... | TITLE:
Are there any JavaScript live syntax highlighters?
QUESTION:
I've found syntax highlighters that highlight pre-existing code, but I'd like to do it as you type with a WYSIWYG-style editor. I don't need auto-completed functions, just the highlighting. As a follow-up question, what is the WYSIWYG editor that stac... | [
"javascript",
"syntax-highlighting",
"wysiwyg"
] | 12 | 8 | 7,133 | 8 | 0 | 2008-09-14T21:11:34.507000 | 2008-09-14T21:29:48.767000 |
61,669 | 61,681 | Profiling in Visual Studio 2008 PRO | How do I use the profiler in Visual Studio 2008? I know theres a build option in Config Properties -> Linker -> Advanced -> Profile (/PROFILE), however I can't find anything about actauly using it, only articles I was able to find appear to only apply to older versions of Visual Studio (eg most say to goto Build->Profi... | The profiler is only available in the Team System editions of Visual Studio 2008. The last version that I used that included a profiler was Visual C++ 6.0. For Visual Studio 2005, you could try Compuware DevPartner Performance Analysis Community Edition. | Profiling in Visual Studio 2008 PRO How do I use the profiler in Visual Studio 2008? I know theres a build option in Config Properties -> Linker -> Advanced -> Profile (/PROFILE), however I can't find anything about actauly using it, only articles I was able to find appear to only apply to older versions of Visual Stud... | TITLE:
Profiling in Visual Studio 2008 PRO
QUESTION:
How do I use the profiler in Visual Studio 2008? I know theres a build option in Config Properties -> Linker -> Advanced -> Profile (/PROFILE), however I can't find anything about actauly using it, only articles I was able to find appear to only apply to older versi... | [
"c++",
"visual-studio",
"visual-studio-2008",
"profiling"
] | 19 | 9 | 23,973 | 4 | 0 | 2008-09-14T21:41:54.060000 | 2008-09-14T22:08:12.293000 |
61,680 | 61,684 | How to work around a very large 2d array in C++ | I need to create a 2D int array of size 800x800. But doing so creates a stack overflow (ha ha). I'm new to C++, so should I do something like a vector of vectors? And just encapsulate the 2d array into a class? Specifically, this array is my zbuffer in a graphics program. I need to store a z value for every pixel on th... | You need about 2.5 megs, so just using the heap should be fine. You don't need a vector unless you need to resize it. See C++ FAQ Lite for an example of using a "2D" heap array. int *array = new int[800*800]; (Don't forget to delete[] it when you're done.) | How to work around a very large 2d array in C++ I need to create a 2D int array of size 800x800. But doing so creates a stack overflow (ha ha). I'm new to C++, so should I do something like a vector of vectors? And just encapsulate the 2d array into a class? Specifically, this array is my zbuffer in a graphics program.... | TITLE:
How to work around a very large 2d array in C++
QUESTION:
I need to create a 2D int array of size 800x800. But doing so creates a stack overflow (ha ha). I'm new to C++, so should I do something like a vector of vectors? And just encapsulate the 2d array into a class? Specifically, this array is my zbuffer in a... | [
"c++",
"arrays",
"graphics",
"2d",
"zbuffer"
] | 10 | 12 | 13,522 | 10 | 0 | 2008-09-14T22:08:02.280000 | 2008-09-14T22:13:48.443000 |
61,691 | 61,697 | How to add uninstall option in .NET Setup Project? | The.NET Setup project seems to have a lot of options, but I don't see an "Uninstall" option. I'd prefer if people could "uninstall" from the standard "start menu" folder rather than send them to the control panel to uninstall my app, so can someone please tell me how to do this? Also, I am aware of non Microsoft instal... | You can make shortcut to: msiexec /uninstall [path to msi or product code] | How to add uninstall option in .NET Setup Project? The.NET Setup project seems to have a lot of options, but I don't see an "Uninstall" option. I'd prefer if people could "uninstall" from the standard "start menu" folder rather than send them to the control panel to uninstall my app, so can someone please tell me how t... | TITLE:
How to add uninstall option in .NET Setup Project?
QUESTION:
The.NET Setup project seems to have a lot of options, but I don't see an "Uninstall" option. I'd prefer if people could "uninstall" from the standard "start menu" folder rather than send them to the control panel to uninstall my app, so can someone pl... | [
".net",
"installation",
"uninstallation"
] | 8 | 9 | 17,984 | 3 | 0 | 2008-09-14T22:25:46.247000 | 2008-09-14T22:38:33.347000 |
61,692 | 72,078 | How do I get my Java application to shutdown nicely in windows? | I have a Java application which I want to shutdown 'nicely' when the user selects Start->Shutdown. I've tried using JVM shutdown listeners via Runtime.addShutdownHook(...) but this doesn't work as I can't use any UI elements from it. I've also tried using the exit handler on my main application UI window but it has no ... | The previously mentioned JNI approach will likely work. You can use JNA which is basically a wrapper around JNI to make it easier to use. An added bonus is that it (in my opinion at least) generally is faster and more maintainable than raw JNI. You can find JNA at https://jna.dev.java.net/ If you're just starting the a... | How do I get my Java application to shutdown nicely in windows? I have a Java application which I want to shutdown 'nicely' when the user selects Start->Shutdown. I've tried using JVM shutdown listeners via Runtime.addShutdownHook(...) but this doesn't work as I can't use any UI elements from it. I've also tried using ... | TITLE:
How do I get my Java application to shutdown nicely in windows?
QUESTION:
I have a Java application which I want to shutdown 'nicely' when the user selects Start->Shutdown. I've tried using JVM shutdown listeners via Runtime.addShutdownHook(...) but this doesn't work as I can't use any UI elements from it. I've... | [
"java",
"windows",
"shutdown"
] | 6 | 4 | 8,702 | 3 | 0 | 2008-09-14T22:28:03.340000 | 2008-09-16T13:18:51.210000 |
61,699 | 1,476,781 | Adding assemblies to the GAC from Inno Setup | Until recently we were using Inno Setup for our installations, something I would like to continue doing, unless we can get an uninstall option in the start menu (thanks Giovanni Galbo), however we now need to GAC some external libraries, something I suspect is only doable (or at least only supported) though the.NET Set... | According to http://jrsoftware.org/files/is5-whatsnew.htm you should be able to do it with v5.3 and above Added.NET support (these cause an internal error if used on a system with no.NET Framework present): * Added new [Files] section flag: gacinstall. * Added new [Files] section parameter: StrongAssemblyName. * Added ... | Adding assemblies to the GAC from Inno Setup Until recently we were using Inno Setup for our installations, something I would like to continue doing, unless we can get an uninstall option in the start menu (thanks Giovanni Galbo), however we now need to GAC some external libraries, something I suspect is only doable (o... | TITLE:
Adding assemblies to the GAC from Inno Setup
QUESTION:
Until recently we were using Inno Setup for our installations, something I would like to continue doing, unless we can get an uninstall option in the start menu (thanks Giovanni Galbo), however we now need to GAC some external libraries, something I suspect... | [
".net",
"installation",
"gac",
"inno-setup"
] | 4 | 6 | 4,781 | 2 | 0 | 2008-09-14T22:39:04.950000 | 2009-09-25T11:28:48.273000 |
61,704 | 61,726 | Switching editors in Eclipse with keyboard, rather than switching Design/Source | In Eclipse, I can switch through open editors using control-page up/down. This works great, except for editors like XML or JavaScript, where there are Design and Source tabs. For those editors, it just toggles between the different tabs. Is there any way to get Eclipse to ignore them? I know about alt-F6 for "Next Edit... | You're right -- looks like Eclipse has acknowledged it as a bug. It's fixed in 3.5. | Switching editors in Eclipse with keyboard, rather than switching Design/Source In Eclipse, I can switch through open editors using control-page up/down. This works great, except for editors like XML or JavaScript, where there are Design and Source tabs. For those editors, it just toggles between the different tabs. Is... | TITLE:
Switching editors in Eclipse with keyboard, rather than switching Design/Source
QUESTION:
In Eclipse, I can switch through open editors using control-page up/down. This works great, except for editors like XML or JavaScript, where there are Design and Source tabs. For those editors, it just toggles between the ... | [
"eclipse"
] | 3 | 2 | 738 | 3 | 0 | 2008-09-14T22:46:13.700000 | 2008-09-14T23:40:48.250000 |
61,705 | 64,919 | Where to save high scores in an XNA game? | I'm making a simple 2 player game in XNA and started looking into saving the player's high scores. I want the game to work on the XBox 360 as well as Windows, so I have to use the framework to save the data. It seems that you save data to a particular user's gamer tag - so my question is, what to do with high scores? S... | the XNA Live API doesn't give you access to leaderboards... so your real only option is to store the scores locally. If you want users to see each other's scores... you could use two different stores. The player's store for his own save data... and then title storage to store scores. Of course then, if the 360 has more... | Where to save high scores in an XNA game? I'm making a simple 2 player game in XNA and started looking into saving the player's high scores. I want the game to work on the XBox 360 as well as Windows, so I have to use the framework to save the data. It seems that you save data to a particular user's gamer tag - so my q... | TITLE:
Where to save high scores in an XNA game?
QUESTION:
I'm making a simple 2 player game in XNA and started looking into saving the player's high scores. I want the game to work on the XBox 360 as well as Windows, so I have to use the framework to save the data. It seems that you save data to a particular user's g... | [
"xna",
"data-storage",
"xbox"
] | 6 | 3 | 8,914 | 3 | 0 | 2008-09-14T22:46:58.130000 | 2008-09-15T17:27:25.550000 |
61,714 | 61,806 | How to capture crash logs in Java | I'm working on a cross platform application in Java which currently works nicely on Windows, Linux and MacOS X. I'm trying to work out a nice way to do detection (and handling) of 'crashes'. Is there an easy, cross-platform way to detect 'crashes' in Java and to do something in response? I guess by 'crashes' I mean unc... | For simple catch-all handling, you can use the following static method in Thread. From the Javadoc: static void setDefaultUncaughtExceptionHandler ( Thread.UncaughtExceptionHandler eh) Set the default handler invoked when a thread abruptly terminates due to an uncaught exception, and no other handler has been defined f... | How to capture crash logs in Java I'm working on a cross platform application in Java which currently works nicely on Windows, Linux and MacOS X. I'm trying to work out a nice way to do detection (and handling) of 'crashes'. Is there an easy, cross-platform way to detect 'crashes' in Java and to do something in respons... | TITLE:
How to capture crash logs in Java
QUESTION:
I'm working on a cross platform application in Java which currently works nicely on Windows, Linux and MacOS X. I'm trying to work out a nice way to do detection (and handling) of 'crashes'. Is there an easy, cross-platform way to detect 'crashes' in Java and to do so... | [
"java",
"error-handling",
"crash"
] | 2 | 4 | 4,777 | 3 | 0 | 2008-09-14T23:09:25.160000 | 2008-09-15T02:38:16.013000 |
61,718 | 61,721 | Database integration tests | When you are doing integration tests with either just your data access layer or the majority of the application stack. What is the best way prevent multiple tests from clashing with each other if they are run on the same database? | Transactions. What the ruby on rails unit test framework does is this: Load all fixture data.
For each test:
BEGIN TRANSACTION
# Yield control to user code
ROLLBACK TRANSACTION
End for each This means that Any changes your test makes to the database won't affect other threads while it's in-progress The next test's... | Database integration tests When you are doing integration tests with either just your data access layer or the majority of the application stack. What is the best way prevent multiple tests from clashing with each other if they are run on the same database? | TITLE:
Database integration tests
QUESTION:
When you are doing integration tests with either just your data access layer or the majority of the application stack. What is the best way prevent multiple tests from clashing with each other if they are run on the same database?
ANSWER:
Transactions. What the ruby on rail... | [
"tdd",
"integration-testing",
"database-testing"
] | 10 | 10 | 1,705 | 6 | 0 | 2008-09-14T23:25:02.267000 | 2008-09-14T23:33:14.260000 |
61,733 | 61,740 | C# Casting vs. Parse | Which of the following is better code in c# and why? ((DateTime)g[0]["MyUntypedDateField"]).ToShortDateString() or DateTime.Parse(g[0]["MyUntypedDateField"].ToString()).ToShortDateString() Ultimately, is it better to cast or to parse? | If g[0]["MyUntypedDateField"] is really a DateTime object, then the cast is the better choice. If it's not really a DateTime, then you have no choice but to use the Parse (you would get an InvalidCastException if you tried to use the cast) | C# Casting vs. Parse Which of the following is better code in c# and why? ((DateTime)g[0]["MyUntypedDateField"]).ToShortDateString() or DateTime.Parse(g[0]["MyUntypedDateField"].ToString()).ToShortDateString() Ultimately, is it better to cast or to parse? | TITLE:
C# Casting vs. Parse
QUESTION:
Which of the following is better code in c# and why? ((DateTime)g[0]["MyUntypedDateField"]).ToShortDateString() or DateTime.Parse(g[0]["MyUntypedDateField"].ToString()).ToShortDateString() Ultimately, is it better to cast or to parse?
ANSWER:
If g[0]["MyUntypedDateField"] is real... | [
"c#",
"datetime",
"parsing",
"string",
"casting"
] | 16 | 12 | 17,745 | 6 | 0 | 2008-09-14T23:52:35.117000 | 2008-09-15T00:00:12.493000 |
61,735 | 61,741 | Include CSS or Javascript file for specific node in Drupal 6 | What is the best method for including a CSS or Javascript file for a specific node in Drupal 6. I want to create a page on my site that has a little javascript application running, so the CSS and javascript is specific to that page and would not want to be included in other page loads at all. | The best solution I've come up with so far is to enable the PHP input mode, and then call drupal_add_css and drupal_add_js as appropriate in a PHP block in the start of the body of your node. | Include CSS or Javascript file for specific node in Drupal 6 What is the best method for including a CSS or Javascript file for a specific node in Drupal 6. I want to create a page on my site that has a little javascript application running, so the CSS and javascript is specific to that page and would not want to be in... | TITLE:
Include CSS or Javascript file for specific node in Drupal 6
QUESTION:
What is the best method for including a CSS or Javascript file for a specific node in Drupal 6. I want to create a page on my site that has a little javascript application running, so the CSS and javascript is specific to that page and would... | [
"drupal",
"preprocessor"
] | 23 | 3 | 22,135 | 6 | 0 | 2008-09-14T23:54:58.403000 | 2008-09-15T00:00:15.100000 |
61,747 | 1,286,153 | Installing PDO-drivers for PostgreSQL on Mac (using Zend for eclipse) | How can I get PDO to work on my mac (os x 10.5)? I'm using the built in php and php in Zend/Eclipse. Can't seem to find useful drivers for it at all. | I had to install the PDO_PGSQL driver recently on Leopard, and I ran across a multitude of problems. In my search for answers, I stumbled across this question. Now I have it successfully installed, and so, even though this question is quite old, I hope that what I've found can help others (like myself) who will undoubt... | Installing PDO-drivers for PostgreSQL on Mac (using Zend for eclipse) How can I get PDO to work on my mac (os x 10.5)? I'm using the built in php and php in Zend/Eclipse. Can't seem to find useful drivers for it at all. | TITLE:
Installing PDO-drivers for PostgreSQL on Mac (using Zend for eclipse)
QUESTION:
How can I get PDO to work on my mac (os x 10.5)? I'm using the built in php and php in Zend/Eclipse. Can't seem to find useful drivers for it at all.
ANSWER:
I had to install the PDO_PGSQL driver recently on Leopard, and I ran acro... | [
"eclipse",
"macos",
"postgresql",
"pdo"
] | 11 | 32 | 25,109 | 5 | 0 | 2008-09-15T00:14:10.353000 | 2009-08-17T04:28:56.280000 |
61,750 | 126,470 | How to implement database engine independent paging? | Task: implement paging of database records suitable for different RDBMS. Method should work for mainstream engines - MSSQL2000+, Oracle, MySql, etc. Please don't post RDBMS specific solutions, I know how to implement this for most of the modern database engines. I'm looking for the universal solution. Only temporary ta... | There would have been a universal solution if SQL specifications had included paging as a standard. The requirement for any RDBMS language to be called an RDBMS language does not include paging support as well. Many database products support SQL with proprietary extensions to the standard language. Some of them support... | How to implement database engine independent paging? Task: implement paging of database records suitable for different RDBMS. Method should work for mainstream engines - MSSQL2000+, Oracle, MySql, etc. Please don't post RDBMS specific solutions, I know how to implement this for most of the modern database engines. I'm ... | TITLE:
How to implement database engine independent paging?
QUESTION:
Task: implement paging of database records suitable for different RDBMS. Method should work for mainstream engines - MSSQL2000+, Oracle, MySql, etc. Please don't post RDBMS specific solutions, I know how to implement this for most of the modern data... | [
"database",
"paging"
] | 7 | 5 | 2,595 | 6 | 0 | 2008-09-15T00:22:47.010000 | 2008-09-24T10:53:47.080000 |
61,760 | 61,777 | Browser WYSIWYG best practices | I am using a rich text editor on a web page..NET has feature that prevent one from posting HTML tags, so I added a JavaScript snippet to change the angle brackets to and alias pair of characters before the post. The alias is replaced on the server with the necessary angle bracket and then stored in the database. With X... | There's actually a way to turn that "feature" off. This will allow the user to post whichever characters they want, and there will be no need to convert characters to an alias using Javascript. See this article for disabling request validation. It means that you'll have to do your own validation, but from the sounds of... | Browser WYSIWYG best practices I am using a rich text editor on a web page..NET has feature that prevent one from posting HTML tags, so I added a JavaScript snippet to change the angle brackets to and alias pair of characters before the post. The alias is replaced on the server with the necessary angle bracket and then... | TITLE:
Browser WYSIWYG best practices
QUESTION:
I am using a rich text editor on a web page..NET has feature that prevent one from posting HTML tags, so I added a JavaScript snippet to change the angle brackets to and alias pair of characters before the post. The alias is replaced on the server with the necessary angl... | [
"asp.net",
"javascript",
"wysiwyg"
] | 2 | 4 | 792 | 3 | 0 | 2008-09-15T00:36:50.940000 | 2008-09-15T01:25:32.570000 |
61,775 | 61,816 | Replacing Virtual PC/Server with VMWare Fusion/Server for Development Environments | I develop exclusively on VMs. I currently run Boot Camp on a MacBook Pro and do all my development on a series of Virtual PC VMs for many different environments. This post by Andrew Connell litterally changed the way I work. I'm thinking about switching to Fusion and running everything in OS X but I wasn't able to answ... | I've not used Fusion, just workstation and server 1) Yes, you can create a linked clone from current vm state, or from a saved state (snapshot) in VMware Workstation 2) Yes, revert to snapshots 3) There's a number of different network setups, NAT's one of them 4) VMware virtual machines created with VMware Fusion are f... | Replacing Virtual PC/Server with VMWare Fusion/Server for Development Environments I develop exclusively on VMs. I currently run Boot Camp on a MacBook Pro and do all my development on a series of Virtual PC VMs for many different environments. This post by Andrew Connell litterally changed the way I work. I'm thinking... | TITLE:
Replacing Virtual PC/Server with VMWare Fusion/Server for Development Environments
QUESTION:
I develop exclusively on VMs. I currently run Boot Camp on a MacBook Pro and do all my development on a series of Virtual PC VMs for many different environments. This post by Andrew Connell litterally changed the way I ... | [
"vmware",
"virtualization",
"virtual-pc"
] | 2 | 1 | 2,715 | 5 | 0 | 2008-09-15T01:14:22.300000 | 2008-09-15T03:03:40.150000 |
61,779 | 65,220 | What technology(ies) and language(s) is Microsoft Navison implemented with/in? | Navision is also known as Microsoft Dynamics NAV. | Navision's application logic is written using a proprietary language called C/AL, which is loosely based on Pascal. It currently offers both a native database option as well as MS SQL Server. The next version (NAV 2009) will use.NET assemblies served via IIS. C/AL logic will be translated to C# code and deployed to the... | What technology(ies) and language(s) is Microsoft Navison implemented with/in? Navision is also known as Microsoft Dynamics NAV. | TITLE:
What technology(ies) and language(s) is Microsoft Navison implemented with/in?
QUESTION:
Navision is also known as Microsoft Dynamics NAV.
ANSWER:
Navision's application logic is written using a proprietary language called C/AL, which is loosely based on Pascal. It currently offers both a native database optio... | [
"navision"
] | 2 | 3 | 1,294 | 2 | 0 | 2008-09-15T01:34:04.500000 | 2008-09-15T18:03:27.617000 |
61,781 | 66,440 | python cgi on IIS | How do you set up IIS so that you can call python scripts from asp pages? Ok, so I found the answer to that question here: http://support.microsoft.com/kb/276494 So on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which is not in the web root directory. | I don't believe that VBScript as hosted by IIS has any way of executing an external process. If you are using python as an AXscripting engine then you could just use the sys module. If the script you're calling is actually meant to be a cgi script you'll have to mimic all the environment variables that the cgi uses. Th... | python cgi on IIS How do you set up IIS so that you can call python scripts from asp pages? Ok, so I found the answer to that question here: http://support.microsoft.com/kb/276494 So on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which is not in the web root dir... | TITLE:
python cgi on IIS
QUESTION:
How do you set up IIS so that you can call python scripts from asp pages? Ok, so I found the answer to that question here: http://support.microsoft.com/kb/276494 So on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which is not i... | [
"python",
"iis",
"asp-classic",
"vbscript",
"cgi"
] | 0 | 1 | 1,410 | 2 | 0 | 2008-09-15T01:41:31.347000 | 2008-09-15T20:09:09.530000 |
61,784 | 61,825 | Has anyone attempted to make PHP's system functions more Object-Oriented? | I'm just curious if any project exists that attempts to group all (or most) of PHP's built-in functions into a more object-oriented class hierarchy. For example, grouping all the string functions into a single String class, etc. I realize this won't actually solve any problems (unless the modifications took place at th... | To Answer your question, Yes there exists several of libraries that do exactly what you are talking about. As far as which one you want to use is an entirely different question. PHPClasses and pear.org are good places to start looking for such libraries. Update: As the others have suggested SPL is a good library and wr... | Has anyone attempted to make PHP's system functions more Object-Oriented? I'm just curious if any project exists that attempts to group all (or most) of PHP's built-in functions into a more object-oriented class hierarchy. For example, grouping all the string functions into a single String class, etc. I realize this wo... | TITLE:
Has anyone attempted to make PHP's system functions more Object-Oriented?
QUESTION:
I'm just curious if any project exists that attempts to group all (or most) of PHP's built-in functions into a more object-oriented class hierarchy. For example, grouping all the string functions into a single String class, etc.... | [
"php",
"oop",
"wrapper"
] | 10 | 5 | 523 | 4 | 0 | 2008-09-15T01:56:25.630000 | 2008-09-15T03:21:17.533000 |
61,795 | 389,330 | Java profiler for IBM JVM 1.4.2 (WebSphere 6.0.2) | I'm looking for a Java profiler that works well with the JVM coming with WebSphere 6.0.2 (IBM JVM 1.4.2). I use yourkit for my usual profiling needs, but it specifically refuses to work with this old jvm (I'm sure the authors had their reasons...). Can anybody point to a decent profiler that can do the job? Not interes... | Update: I found out that JProfiler integrates smoothly with WAS 6.0.2 (IBM JDK 1.4). | Java profiler for IBM JVM 1.4.2 (WebSphere 6.0.2) I'm looking for a Java profiler that works well with the JVM coming with WebSphere 6.0.2 (IBM JVM 1.4.2). I use yourkit for my usual profiling needs, but it specifically refuses to work with this old jvm (I'm sure the authors had their reasons...). Can anybody point to ... | TITLE:
Java profiler for IBM JVM 1.4.2 (WebSphere 6.0.2)
QUESTION:
I'm looking for a Java profiler that works well with the JVM coming with WebSphere 6.0.2 (IBM JVM 1.4.2). I use yourkit for my usual profiling needs, but it specifically refuses to work with this old jvm (I'm sure the authors had their reasons...). Can... | [
"java",
"websphere",
"profiler"
] | 2 | 2 | 5,066 | 3 | 0 | 2008-09-15T02:07:18.383000 | 2008-12-23T16:21:56.233000 |
61,796 | 61,813 | Does Tiles for Struts2 support UTF-8 encoded templates? | If so what are required configuration elements to enable UTF-8 for tiles? I'm finding my tile results are sent as: Content-Type text/html; | What if you put this at the top? <%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %> | Does Tiles for Struts2 support UTF-8 encoded templates? If so what are required configuration elements to enable UTF-8 for tiles? I'm finding my tile results are sent as: Content-Type text/html; | TITLE:
Does Tiles for Struts2 support UTF-8 encoded templates?
QUESTION:
If so what are required configuration elements to enable UTF-8 for tiles? I'm finding my tile results are sent as: Content-Type text/html;
ANSWER:
What if you put this at the top? <%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-... | [
"java",
"internationalization",
"tiles"
] | 0 | 0 | 1,112 | 1 | 0 | 2008-09-15T02:08:06.227000 | 2008-09-15T02:57:37.340000 |
61,805 | 93,938 | ASP.NET MVC ViewData (using indices) | I had a working solution using ASP.NET MVC Preview 3 (was upgraded from a Preview 2 solution) that uses an untyped ViewMasterPage like so: public partial class Home: ViewMasterPage On Home.Master there is a display statement like this: <%= ((GenericViewData)ViewData["Generic"]).Skin %> However, a developer on the team ... | We made that change because we wanted a bit of symmetry with the [] indexer. The Eval() method uses reflection and looks into the model to retrieve values. The indexer only looks at items directly added to the dictionary. | ASP.NET MVC ViewData (using indices) I had a working solution using ASP.NET MVC Preview 3 (was upgraded from a Preview 2 solution) that uses an untyped ViewMasterPage like so: public partial class Home: ViewMasterPage On Home.Master there is a display statement like this: <%= ((GenericViewData)ViewData["Generic"]).Skin... | TITLE:
ASP.NET MVC ViewData (using indices)
QUESTION:
I had a working solution using ASP.NET MVC Preview 3 (was upgraded from a Preview 2 solution) that uses an untyped ViewMasterPage like so: public partial class Home: ViewMasterPage On Home.Master there is a display statement like this: <%= ((GenericViewData)ViewDat... | [
"asp.net-mvc"
] | 1 | 1 | 1,603 | 5 | 0 | 2008-09-15T02:25:56.230000 | 2008-09-18T16:04:29.547000 |
61,817 | 2,878,350 | What's the best method in ASP.NET to obtain the current domain? | I am wondering what the best way to obtain the current domain is in ASP.NET? For instance: http://www.domainname.com/subdir/ should yield http://www.domainname.com http://www.sub.domainname.com/subdir/ should yield http://sub.domainname.com As a guide, I should be able to add a url like "/Folder/Content/filename.html" ... | Same answer as MattMitchell's but with some modification. This checks for the default port instead. Edit: Updated syntax and using Request.Url.Authority as suggested $"{Request.Url.Scheme}{System.Uri.SchemeDelimiter}{Request.Url.Authority}" | What's the best method in ASP.NET to obtain the current domain? I am wondering what the best way to obtain the current domain is in ASP.NET? For instance: http://www.domainname.com/subdir/ should yield http://www.domainname.com http://www.sub.domainname.com/subdir/ should yield http://sub.domainname.com As a guide, I s... | TITLE:
What's the best method in ASP.NET to obtain the current domain?
QUESTION:
I am wondering what the best way to obtain the current domain is in ASP.NET? For instance: http://www.domainname.com/subdir/ should yield http://www.domainname.com http://www.sub.domainname.com/subdir/ should yield http://sub.domainname.c... | [
"asp.net",
"asp.net-mvc",
"domain-name"
] | 104 | 190 | 96,244 | 11 | 0 | 2008-09-15T03:04:09.447000 | 2010-05-20T22:34:17.400000 |
61,838 | 191,935 | Do I need to release xib resources? | If I have something like a UILabel linked to a xib file, do I need to release it on dealloc of my view? The reason I ask is because I don't alloc it, which makes me think I don't need to release it either? eg (in the header): IBOutlet UILabel *lblExample; in the implementation:.... [lblExample setText:@"whatever"];....... | If you follow what is now considered to be best practice, you should release outlet properties, because you should have retained them in the set accessor: @interface MyController: MySuperclass { Control *uiElement; } @property (nonatomic, retain) IBOutlet Control *uiElement; @end
@implementation MyController
@synthes... | Do I need to release xib resources? If I have something like a UILabel linked to a xib file, do I need to release it on dealloc of my view? The reason I ask is because I don't alloc it, which makes me think I don't need to release it either? eg (in the header): IBOutlet UILabel *lblExample; in the implementation:.... [... | TITLE:
Do I need to release xib resources?
QUESTION:
If I have something like a UILabel linked to a xib file, do I need to release it on dealloc of my view? The reason I ask is because I don't alloc it, which makes me think I don't need to release it either? eg (in the header): IBOutlet UILabel *lblExample; in the imp... | [
"iphone",
"objective-c",
"cocoa-touch"
] | 38 | 35 | 9,409 | 8 | 0 | 2008-09-15T03:51:30.660000 | 2008-10-10T15:41:00.363000 |
61,850 | 61,854 | Is there a way to asynchronously filter an IList? | Ok, so there has to be a way to do this... no? If not I'd love some ideas. I have two repeaters and an image inside an update panel along with some AJAX dropdowns with link buttons to the left. I want to update the data inside the update panel as fast as possible as values are selected from the dropdowns. What do you t... | As far as I know, it is not easy to get just Data and data-bind the repeater on the client side. But, you might want to check this out. | Is there a way to asynchronously filter an IList? Ok, so there has to be a way to do this... no? If not I'd love some ideas. I have two repeaters and an image inside an update panel along with some AJAX dropdowns with link buttons to the left. I want to update the data inside the update panel as fast as possible as val... | TITLE:
Is there a way to asynchronously filter an IList?
QUESTION:
Ok, so there has to be a way to do this... no? If not I'd love some ideas. I have two repeaters and an image inside an update panel along with some AJAX dropdowns with link buttons to the left. I want to update the data inside the update panel as fast ... | [
"c#",
"javascript",
"ajax",
".net-3.5",
"repeater"
] | 3 | 1 | 950 | 3 | 0 | 2008-09-15T04:07:11.370000 | 2008-09-15T04:25:18.970000 |
61,853 | 61,856 | Anyone using WPF for real LOB applications? | Anyone using WPF for real LOB applications? We have all seen the clever demos of WPF showing videos mapped onto 3D elements. These look great but what about the real world of line-of-business applications that make up the majority of developers efforts. Is WPF just for nice eye candy? | While we discussing it, smart guys are building amazing apps: Lawson Smart Office brings WPF goodness to the enterprise IGT’s Next-Generation UI with WPF Billy Hollis on Getting Smart with WPF | Anyone using WPF for real LOB applications? Anyone using WPF for real LOB applications? We have all seen the clever demos of WPF showing videos mapped onto 3D elements. These look great but what about the real world of line-of-business applications that make up the majority of developers efforts. Is WPF just for nice e... | TITLE:
Anyone using WPF for real LOB applications?
QUESTION:
Anyone using WPF for real LOB applications? We have all seen the clever demos of WPF showing videos mapped onto 3D elements. These look great but what about the real world of line-of-business applications that make up the majority of developers efforts. Is W... | [
".net",
"wpf"
] | 13 | 9 | 7,176 | 8 | 0 | 2008-09-15T04:24:55.713000 | 2008-09-15T04:34:25.643000 |
61,861 | 62,589 | Web Control Properties | I would like to make my web control more readable in design mode, basically I want the tag declaration to look like: string value 1 string value 2 Lets say I have a private variable in the code behind: List values = new List (); So how can I make my user control fill out the private variable with the values that are de... | I think what you are searching for is the attribute: [PersistenceMode(PersistenceMode.InnerProperty)] Persistence Mode Remember that you have to register your namespace and prefix with: <%@ Register Namespace="MyNamespace" TagPrefix="Pref" %> | Web Control Properties I would like to make my web control more readable in design mode, basically I want the tag declaration to look like: string value 1 string value 2 Lets say I have a private variable in the code behind: List values = new List (); So how can I make my user control fill out the private variable with... | TITLE:
Web Control Properties
QUESTION:
I would like to make my web control more readable in design mode, basically I want the tag declaration to look like: string value 1 string value 2 Lets say I have a private variable in the code behind: List values = new List (); So how can I make my user control fill out the pri... | [
"c#",
"asp.net"
] | 1 | 2 | 700 | 2 | 0 | 2008-09-15T04:38:47.427000 | 2008-09-15T12:59:31.233000 |
61,870 | 61,879 | Sum of items in a collection | Using LINQ to SQL, I have an Order class with a collection of OrderDetails. The Order Details has a property called LineTotal which gets Qnty x ItemPrice. I know how to do a new LINQ query of the database to find the order total, but as I already have the collection of OrderDetails from the DB, is there a simple method... | You can do LINQ to Objects and the use LINQ to calculate the totals: decimal sumLineTotal = (from od in orderdetailscollection select od.LineTotal).Sum(); You can also use lambda-expressions to do this, which is a bit "cleaner". decimal sumLineTotal = orderdetailscollection.Sum(od => od.LineTotal); You can then hook th... | Sum of items in a collection Using LINQ to SQL, I have an Order class with a collection of OrderDetails. The Order Details has a property called LineTotal which gets Qnty x ItemPrice. I know how to do a new LINQ query of the database to find the order total, but as I already have the collection of OrderDetails from the... | TITLE:
Sum of items in a collection
QUESTION:
Using LINQ to SQL, I have an Order class with a collection of OrderDetails. The Order Details has a property called LineTotal which gets Qnty x ItemPrice. I know how to do a new LINQ query of the database to find the order total, but as I already have the collection of Ord... | [
"linq",
"sum"
] | 73 | 162 | 105,837 | 1 | 0 | 2008-09-15T04:53:37.827000 | 2008-09-15T05:02:40.037000 |
61,871 | 61,873 | How do I use my pager (more/less) on error output only | I have a program that spits out both standard error and standard out, and I want to run my pager less on the standard error, but ignore standard out. How do I do that? Update: That's it... I didn't want to lose stdout... just keep it out of pager program 2>&1 >log | less then later less log | You could try redirecting standard out to /dev/null, but redirecting standard error to where standard out used to go. Example in ksh/bash: program 2>&1 >/dev/null | less Here the redirection 2>&1, which sets file descriptor 2 (stderr) to point to the same stream as file descriptor 1 (stdout), gets evaluated before the ... | How do I use my pager (more/less) on error output only I have a program that spits out both standard error and standard out, and I want to run my pager less on the standard error, but ignore standard out. How do I do that? Update: That's it... I didn't want to lose stdout... just keep it out of pager program 2>&1 >log ... | TITLE:
How do I use my pager (more/less) on error output only
QUESTION:
I have a program that spits out both standard error and standard out, and I want to run my pager less on the standard error, but ignore standard out. How do I do that? Update: That's it... I didn't want to lose stdout... just keep it out of pager ... | [
"unix"
] | 3 | 4 | 785 | 1 | 0 | 2008-09-15T04:55:08.633000 | 2008-09-15T04:56:32.283000 |
61,872 | 66,678 | Use float or decimal for accounting application dollar amount? | We are rewriting our legacy accounting system in VB.NET and SQL Server. We brought in a new team of.NET/ SQL Programmers to do the rewrite. Most of the system is already completed with the dollar amounts using floats. The legacy system language, I programmed in, did not have a float, so I probably would have used a dec... | Should Float or Decimal data type be used for dollar amounts? The answer is easy. Never floats. NEVER! Floats were according to IEEE 754 always binary, only the new standard IEEE 754R defined decimal formats. Many of the fractional binary parts can never equal the exact decimal representation. Any binary number can be ... | Use float or decimal for accounting application dollar amount? We are rewriting our legacy accounting system in VB.NET and SQL Server. We brought in a new team of.NET/ SQL Programmers to do the rewrite. Most of the system is already completed with the dollar amounts using floats. The legacy system language, I programme... | TITLE:
Use float or decimal for accounting application dollar amount?
QUESTION:
We are rewriting our legacy accounting system in VB.NET and SQL Server. We brought in a new team of.NET/ SQL Programmers to do the rewrite. Most of the system is already completed with the dollar amounts using floats. The legacy system lan... | [
"sql-server",
"vb.net",
"database-design",
"currency",
"accounting"
] | 77 | 112 | 48,480 | 24 | 0 | 2008-09-15T04:55:25.717000 | 2008-09-15T20:35:25.350000 |
61,888 | 61,895 | Using Subversion for general purpose backup | Is it possible to use Apache Subversion (SVN) as general purpose backup tool? (As a kind of rsync alternative.) | I found this article to be a pretty cool description of using svn to backup your home directory, and more: I use Subversion to backup my Linux boxes. With some minor creativity, it easily covers: Daily snapshots and offsite backup. Easy addition and removal of files and folders. Detailed tracking of file versions. It a... | Using Subversion for general purpose backup Is it possible to use Apache Subversion (SVN) as general purpose backup tool? (As a kind of rsync alternative.) | TITLE:
Using Subversion for general purpose backup
QUESTION:
Is it possible to use Apache Subversion (SVN) as general purpose backup tool? (As a kind of rsync alternative.)
ANSWER:
I found this article to be a pretty cool description of using svn to backup your home directory, and more: I use Subversion to backup my ... | [
"svn",
"backup"
] | 15 | 9 | 15,541 | 12 | 0 | 2008-09-15T05:16:15.247000 | 2008-09-15T05:21:52.020000 |
61,894 | 102,572 | What's a good way to find relative paths in Google App Engine? | So I've done the trivial "warmup" apps with GAE. Now I'd like to build something with a more complex directory structure. Something along the lines of: siteroot/ models/ controllers/ controller1/ controller2/... templates/ template1/ template2/.....etc. The controllers will be Python modules handling requests. They wou... | You can't use relative paths, as Toni suggests, because you have no guarantee that the path from your working directory to your app's directory will remain the same. The correct solution is to either use os.path.split, as you are, or to use something like: path = os.path.join(os.path.dirname(__file__), '..', 'templates... | What's a good way to find relative paths in Google App Engine? So I've done the trivial "warmup" apps with GAE. Now I'd like to build something with a more complex directory structure. Something along the lines of: siteroot/ models/ controllers/ controller1/ controller2/... templates/ template1/ template2/.....etc. The... | TITLE:
What's a good way to find relative paths in Google App Engine?
QUESTION:
So I've done the trivial "warmup" apps with GAE. Now I'd like to build something with a more complex directory structure. Something along the lines of: siteroot/ models/ controllers/ controller1/ controller2/... templates/ template1/ templ... | [
"python",
"google-app-engine"
] | 5 | 4 | 4,920 | 2 | 0 | 2008-09-15T05:21:47.760000 | 2008-09-19T15:02:56.883000 |
61,902 | 61,922 | iframe wikipedia article without the wrapper | I want to embed a wikipedia article into a page but I don't want all the wrapper (navigation, etc.) that sits around the articles. I saw it done here: http://www.dayah.com/periodic/. Click on an element and the iframe is displayed and links to the article only (no wrapper). So how'd they do that? Seems like JavaScript ... | The periodic table example loads the printer-friendly version of the wiki artice into an iframe. http://en.wikipedia.org/wiki/Potasium? printable=yes it's done in function click_wiki(e) (line 534, interactivity.js) var article = el.childNodes[0].childNodes[n_name].innerHTML;... window.frames["WikiFrame"].location.repla... | iframe wikipedia article without the wrapper I want to embed a wikipedia article into a page but I don't want all the wrapper (navigation, etc.) that sits around the articles. I saw it done here: http://www.dayah.com/periodic/. Click on an element and the iframe is displayed and links to the article only (no wrapper). ... | TITLE:
iframe wikipedia article without the wrapper
QUESTION:
I want to embed a wikipedia article into a page but I don't want all the wrapper (navigation, etc.) that sits around the articles. I saw it done here: http://www.dayah.com/periodic/. Click on an element and the iframe is displayed and links to the article o... | [
"javascript",
"iframe",
"wikipedia"
] | 3 | 16 | 8,704 | 4 | 0 | 2008-09-15T05:28:22.503000 | 2008-09-15T05:58:34.847000 |
61,929 | 63,079 | Firebird database replication | I have reached the point where I've decided to replace my custom-built replication system with a system that has been built by someone else, mainly for reliability purposes. Can anyone recommend any replication system that is worth it? Is FiBRE any good? What I need might be a little away from a generic system, though.... | I have used CopyCat to create a replication project. It allows you create your own replication client/server configuration using CodeGear Delphi. This allows you complete flexibilty as to how you want your replication to work. If you don't use Delphi, or need a prefabricated solution, CopyTiger does the same thing alre... | Firebird database replication I have reached the point where I've decided to replace my custom-built replication system with a system that has been built by someone else, mainly for reliability purposes. Can anyone recommend any replication system that is worth it? Is FiBRE any good? What I need might be a little away ... | TITLE:
Firebird database replication
QUESTION:
I have reached the point where I've decided to replace my custom-built replication system with a system that has been built by someone else, mainly for reliability purposes. Can anyone recommend any replication system that is worth it? Is FiBRE any good? What I need might... | [
"database",
"replication",
"firebird"
] | 5 | 3 | 7,720 | 3 | 0 | 2008-09-15T06:16:50.810000 | 2008-09-15T13:54:02.647000 |
61,953 | 61,961 | How do you bind an Enum to a DropDownList control in ASP.NET? | Let's say I have the following simple enum: enum Response { Yes = 1, No = 2, Maybe = 3 } How can I bind this enum to a DropDownList control so that the descriptions are displayed in the list as well as retrieve the associated numeric value (1,2,3) once an option has been selected? | I probably wouldn't bind the data as it's an enum, and it won't change after compile time (unless I'm having one of those stoopid moments). Better just to iterate through the enum: Dim itemValues As Array = System.Enum.GetValues(GetType(Response)) Dim itemNames As Array = System.Enum.GetNames(GetType(Response))
For i ... | How do you bind an Enum to a DropDownList control in ASP.NET? Let's say I have the following simple enum: enum Response { Yes = 1, No = 2, Maybe = 3 } How can I bind this enum to a DropDownList control so that the descriptions are displayed in the list as well as retrieve the associated numeric value (1,2,3) once an op... | TITLE:
How do you bind an Enum to a DropDownList control in ASP.NET?
QUESTION:
Let's say I have the following simple enum: enum Response { Yes = 1, No = 2, Maybe = 3 } How can I bind this enum to a DropDownList control so that the descriptions are displayed in the list as well as retrieve the associated numeric value ... | [
"c#",
".net",
"asp.net"
] | 138 | 118 | 191,850 | 27 | 0 | 2008-09-15T07:03:32.243000 | 2008-09-15T07:10:22.833000 |
61,959 | 61,975 | TFS vs open source alternatives? | We're currently in the process of setting up a source control/build/and more-server for.NET development and we're thinking about either utilizing the Team Foundation Server (which costs a lot of dough) or combining several open source options, such as SourceForge Enterprise/GForge and Subversion and CruiseControl.net a... | My work is currently using a mostly OSS build process with Cruise Control as the engine and it is great. I would suggest that if you don't know why you would need TFS, it's probably not worth the cost. The thing you have to keep in mind with the OSS stuff is that the software has either been in use by the Java crew for... | TFS vs open source alternatives? We're currently in the process of setting up a source control/build/and more-server for.NET development and we're thinking about either utilizing the Team Foundation Server (which costs a lot of dough) or combining several open source options, such as SourceForge Enterprise/GForge and S... | TITLE:
TFS vs open source alternatives?
QUESTION:
We're currently in the process of setting up a source control/build/and more-server for.NET development and we're thinking about either utilizing the Team Foundation Server (which costs a lot of dough) or combining several open source options, such as SourceForge Enter... | [
"svn",
"open-source",
"tfs",
"cruisecontrol.net"
] | 7 | 5 | 11,630 | 17 | 0 | 2008-09-15T07:07:47.490000 | 2008-09-15T07:33:03.840000 |
61,963 | 71,826 | Howto import an oracle dump in an different tablespace | I want to import an oracle dump into a different tablespace. I have a tablespace A used by User A. I've revoked DBA on this user and given him the grants connect and resource. Then I've dumped everything with the command exp a/*** owner=a file=oracledump.DMP log=log.log compress=y Now I want to import the dump into the... | You've got a couple of issues here. Firstly, the different versions of Oracle you're using is the reason for the table statistics error - I had the same issue when some of our Oracle 10g Databases got upgraded to Release 2, and some were still on Release 1 and I was swapping.DMP files between them. The solution that wo... | Howto import an oracle dump in an different tablespace I want to import an oracle dump into a different tablespace. I have a tablespace A used by User A. I've revoked DBA on this user and given him the grants connect and resource. Then I've dumped everything with the command exp a/*** owner=a file=oracledump.DMP log=lo... | TITLE:
Howto import an oracle dump in an different tablespace
QUESTION:
I want to import an oracle dump into a different tablespace. I have a tablespace A used by User A. I've revoked DBA on this user and given him the grants connect and resource. Then I've dumped everything with the command exp a/*** owner=a file=ora... | [
"oracle",
"oracle-dump"
] | 39 | 34 | 215,193 | 10 | 0 | 2008-09-15T07:15:53.803000 | 2008-09-16T12:47:33.950000 |
61,967 | 62,130 | Is there a way to loop through a table variable in TSQL without using a cursor? | Let's say I have the following simple table variable: declare @databases table ( DatabaseID int, Name varchar(15), Server varchar(15) ) -- insert a bunch rows into @databases Is declaring and using a cursor my only option if I wanted to iterate through the rows? Is there another way? | First of all you should be absolutely sure you need to iterate through each row — set based operations will perform faster in every case I can think of and will normally use simpler code. Depending on your data it may be possible to loop using just SELECT statements as shown below: Declare @Id int
While (Select Count(... | Is there a way to loop through a table variable in TSQL without using a cursor? Let's say I have the following simple table variable: declare @databases table ( DatabaseID int, Name varchar(15), Server varchar(15) ) -- insert a bunch rows into @databases Is declaring and using a cursor my only option if I wanted to ite... | TITLE:
Is there a way to loop through a table variable in TSQL without using a cursor?
QUESTION:
Let's say I have the following simple table variable: declare @databases table ( DatabaseID int, Name varchar(15), Server varchar(15) ) -- insert a bunch rows into @databases Is declaring and using a cursor my only option ... | [
"sql-server",
"t-sql",
"loops"
] | 305 | 450 | 825,562 | 21 | 0 | 2008-09-15T07:18:51.347000 | 2008-09-15T10:42:15.260000 |
61,972 | 61,987 | JavaScript sqlite | Best recommendations for accessing and manipulation of sqlite databases from JavaScript. | Well, if you are working on client side JavaScript, I think you will be out of luck... browsers tend to sandbox the JavaScript environment so you don't have access to the machine in any kind of general capacity like accessing a database. If you are talking about an SQLite DB on the server end accessed from the client e... | JavaScript sqlite Best recommendations for accessing and manipulation of sqlite databases from JavaScript. | TITLE:
JavaScript sqlite
QUESTION:
Best recommendations for accessing and manipulation of sqlite databases from JavaScript.
ANSWER:
Well, if you are working on client side JavaScript, I think you will be out of luck... browsers tend to sandbox the JavaScript environment so you don't have access to the machine in any ... | [
"javascript",
"sqlite"
] | 46 | 13 | 84,316 | 10 | 0 | 2008-09-15T07:28:56.910000 | 2008-09-15T07:54:33.960000 |
61,995 | 62,429 | Match conditionally upon current node value | Given the following XML: jd John Doe jd Pierre Spring ps How can I get "John Doe" from within the current/login matcher? I tried the following: | I'd define a key to index the people: Using a key here simply keeps the code clean, but you might also find it helpful for efficiency if you're often having to retrieve the elements based on their child. I'd have a template that returned the formatted name of a given: And then I'd do: | Match conditionally upon current node value Given the following XML: jd John Doe jd Pierre Spring ps How can I get "John Doe" from within the current/login matcher? I tried the following: | TITLE:
Match conditionally upon current node value
QUESTION:
Given the following XML: jd John Doe jd Pierre Spring ps How can I get "John Doe" from within the current/login matcher? I tried the following:
ANSWER:
I'd define a key to index the people: Using a key here simply keeps the code clean, but you might also fi... | [
"xslt",
"xpath",
"xmlnode"
] | 8 | 10 | 25,340 | 5 | 0 | 2008-09-15T08:06:59.377000 | 2008-09-15T12:42:47.997000 |
62,012 | 62,019 | Apache Fall Back When PHP Fails | I was wondering if anybody knew of a method to configure apache to fall back to returning a static HTML page, should it (Apache) be able to determine that PHP has died? This would provide the developer with a elegant solution to displaying an error page and not (worst case scenario) the source code of the PHP page that... | The PHP source code is only displayed when apache is not configured correctly to handle php files. That is, when a proper handler has not been defined. On errors, what is shown can be configured on php.ini, mainly the display_errors variable. That should be set to off and log_errors to on on a production environment. I... | Apache Fall Back When PHP Fails I was wondering if anybody knew of a method to configure apache to fall back to returning a static HTML page, should it (Apache) be able to determine that PHP has died? This would provide the developer with a elegant solution to displaying an error page and not (worst case scenario) the ... | TITLE:
Apache Fall Back When PHP Fails
QUESTION:
I was wondering if anybody knew of a method to configure apache to fall back to returning a static HTML page, should it (Apache) be able to determine that PHP has died? This would provide the developer with a elegant solution to displaying an error page and not (worst c... | [
"php",
"apache",
"configuration"
] | 4 | 9 | 1,800 | 4 | 0 | 2008-09-15T09:16:30.643000 | 2008-09-15T09:30:30.330000 |
62,013 | 65,670 | Problem with Login control of ASP.NET | I set up a website to use SqlMembershipProvider as written on this page. I followed every step. I have the database, I modified the Web.config to use this provider, with the correct connection string, and the authentication mode is set to Forms. Created some users to test with. I created a Login.aspx and put the Login ... | I have checked the code over in the files you have sent me (thanks again for sending them through). Note: I have not tested this since I have not installed the database etc.. However, I am pretty sure this is the issue. You need to set the MembershipProvider Property for your ASP.NET controls. Making the definitions fo... | Problem with Login control of ASP.NET I set up a website to use SqlMembershipProvider as written on this page. I followed every step. I have the database, I modified the Web.config to use this provider, with the correct connection string, and the authentication mode is set to Forms. Created some users to test with. I c... | TITLE:
Problem with Login control of ASP.NET
QUESTION:
I set up a website to use SqlMembershipProvider as written on this page. I followed every step. I have the database, I modified the Web.config to use this provider, with the correct connection string, and the authentication mode is set to Forms. Created some users... | [
"asp.net"
] | 6 | 5 | 14,814 | 13 | 0 | 2008-09-15T09:19:11.993000 | 2008-09-15T18:56:04.853000 |
62,027 | 68,148 | WSE 2.0 raises wse910 error | I had to use a Microsoft Web Services Enhancements 2.0 service and it raised wse910 error when the time difference between the server and client was more than 5 minutes. I read in many places that setting the timeToleranceInSeconds, ttlInSeconds and defaultTtlInSeconds values should help, but only setting the clock of ... | Does this help? It also mentions setting timeToleranceInSeconds and defaultTtlInSeconds on the client as well as the server. | WSE 2.0 raises wse910 error I had to use a Microsoft Web Services Enhancements 2.0 service and it raised wse910 error when the time difference between the server and client was more than 5 minutes. I read in many places that setting the timeToleranceInSeconds, ttlInSeconds and defaultTtlInSeconds values should help, bu... | TITLE:
WSE 2.0 raises wse910 error
QUESTION:
I had to use a Microsoft Web Services Enhancements 2.0 service and it raised wse910 error when the time difference between the server and client was more than 5 minutes. I read in many places that setting the timeToleranceInSeconds, ttlInSeconds and defaultTtlInSeconds valu... | [
"wse2.0"
] | 0 | 0 | 1,030 | 1 | 0 | 2008-09-15T09:34:11.303000 | 2008-09-16T00:12:42.767000 |
62,029 | 62,037 | VS2008 Command Prompt + Cygwin | I use the VS2008 command prompt for builds, TFS access etc. and the cygwin prompt for grep, vi and unix-like tools. Is there any way I can 'import' the vcvars32.bat functionality into the cygwin environment so I can call "tfs checkout" from cygwin itself? | According to this page you need to: "Depending on your preference, you can either add the variables required for compilation direct to your environment, or use the vcvars32.bat script to set them for you. Note you have to compile from a cygwin bash shell, to use vcvars32, first run a DOS shell, then run vcvars32.bat, t... | VS2008 Command Prompt + Cygwin I use the VS2008 command prompt for builds, TFS access etc. and the cygwin prompt for grep, vi and unix-like tools. Is there any way I can 'import' the vcvars32.bat functionality into the cygwin environment so I can call "tfs checkout" from cygwin itself? | TITLE:
VS2008 Command Prompt + Cygwin
QUESTION:
I use the VS2008 command prompt for builds, TFS access etc. and the cygwin prompt for grep, vi and unix-like tools. Is there any way I can 'import' the vcvars32.bat functionality into the cygwin environment so I can call "tfs checkout" from cygwin itself?
ANSWER:
Accord... | [
"command-line",
"cygwin"
] | 13 | 16 | 7,410 | 3 | 0 | 2008-09-15T09:38:26.940000 | 2008-09-15T09:41:42.893000 |
62,038 | 62,148 | Rails model validators break earlier migrations | I have a sequence of migrations in a rails app which includes the following steps: Create basic version of the 'user' model Create an instance of this model - there needs to be at least one initial user in my system so that you can log in and start using it Update the 'user' model to add a new field / column. Now I'm u... | The easiest way to avoid this issue is to use rake db:schema:load on the second machine, instead of db:migrate. rake db:schema:load uses schema.rb to load the most current version of your schema, as opposed to migrating it up form scratch. If you run into this issue when deploying to a production machine (where preserv... | Rails model validators break earlier migrations I have a sequence of migrations in a rails app which includes the following steps: Create basic version of the 'user' model Create an instance of this model - there needs to be at least one initial user in my system so that you can log in and start using it Update the 'us... | TITLE:
Rails model validators break earlier migrations
QUESTION:
I have a sequence of migrations in a rails app which includes the following steps: Create basic version of the 'user' model Create an instance of this model - there needs to be at least one initial user in my system so that you can log in and start using... | [
"ruby-on-rails",
"migration",
"validation"
] | 5 | 6 | 1,374 | 4 | 0 | 2008-09-15T09:42:18.570000 | 2008-09-15T10:55:59.140000 |
62,044 | 62,060 | How do I use a pipe in the exec parameter for a find command? | I'm trying to construct a find command to process a bunch of files in a directory using two different executables. Unfortunately, -exec on find doesn't allow to use pipe or even \| because the shell interprets that character first. Here is specifically what I'm trying to do (which doesn't work because pipe ends the fin... | Try this find /path/to/jpgs -type f -exec sh -c 'jhead -v {} | grep 123' \; -print Alternatively you could try to embed your exec statement inside a sh script and then do: find -exec some_script {} \; | How do I use a pipe in the exec parameter for a find command? I'm trying to construct a find command to process a bunch of files in a directory using two different executables. Unfortunately, -exec on find doesn't allow to use pipe or even \| because the shell interprets that character first. Here is specifically what ... | TITLE:
How do I use a pipe in the exec parameter for a find command?
QUESTION:
I'm trying to construct a find command to process a bunch of files in a directory using two different executables. Unfortunately, -exec on find doesn't allow to use pipe or even \| because the shell interprets that character first. Here is ... | [
"bash",
"shell",
"find"
] | 82 | 90 | 51,142 | 6 | 0 | 2008-09-15T09:45:00.153000 | 2008-09-15T09:54:10.147000 |
62,062 | 101,435 | How to do Flash pseudo-streaming? | I need to build something that starts serving a H.264 encoded video to a flash player halfway through the file (to support skipping to a point in the video that has not been buffered yet). Currently, the videos are in the FLV container format, but transcoding is an option. I managed to re-write the file header and meta... | The flash player can only start playing H.264 video once it's downloaded the MOOV atom. Existing pseudo-streaming providers just give you an FLV header - either the first 13 bytes of the file or a hardcoded one - and then serve the file from the given offset. If you want to make an H.264 pseudo-streamer, you'll need to... | How to do Flash pseudo-streaming? I need to build something that starts serving a H.264 encoded video to a flash player halfway through the file (to support skipping to a point in the video that has not been buffered yet). Currently, the videos are in the FLV container format, but transcoding is an option. I managed to... | TITLE:
How to do Flash pseudo-streaming?
QUESTION:
I need to build something that starts serving a H.264 encoded video to a flash player halfway through the file (to support skipping to a point in the video that has not been buffered yet). Currently, the videos are in the FLV container format, but transcoding is an op... | [
"flash",
"video",
"streaming",
"flv"
] | 7 | 2 | 8,272 | 3 | 0 | 2008-09-15T09:55:40.770000 | 2008-09-19T12:30:18.670000 |
62,069 | 64,844 | MySQL Interview Questions | I've been asked to screen some candidates for a MySQL DBA / Developer position for a role that requires an enterprise level skill set. I myself am a SQL Server person so I know what I would be looking for from that point of view with regards to scalability / design etc but is there anything specific I should be asking ... | Although SQL Server and MySQL are both RDBMs, MySQL has many unique features that can illustrate the difference between novice and expert. Your first step should be to ensure that the candidate is comfortable using the command line, not just GUI tools such as phpMyAdmin. During the interview, try asking the candidate t... | MySQL Interview Questions I've been asked to screen some candidates for a MySQL DBA / Developer position for a role that requires an enterprise level skill set. I myself am a SQL Server person so I know what I would be looking for from that point of view with regards to scalability / design etc but is there anything sp... | TITLE:
MySQL Interview Questions
QUESTION:
I've been asked to screen some candidates for a MySQL DBA / Developer position for a role that requires an enterprise level skill set. I myself am a SQL Server person so I know what I would be looking for from that point of view with regards to scalability / design etc but is... | [
"mysql"
] | 9 | 39 | 16,848 | 3 | 0 | 2008-09-15T09:58:36.127000 | 2008-09-15T17:18:10.720000 |
62,077 | 62,546 | Is there a Transformation engine or library using .NET? | We're looking for a Transformation library or engine which can read any input (EDIfact files, CSV, XML, stuff like that. So files (or webservices results) that contain data which must be transformed to a known business object structure.) This data should be transformed this to a existing business object using custom ru... | If you think that XSLT is too difficult for you, I think you can try LINQ to XML for parsing XML files. It is integrated in the.NET framework, and you can use C# (or, if you use VB.NET 9.0, better because of the XML literals) instead of learning another language. You can integrate it with the existing application witho... | Is there a Transformation engine or library using .NET? We're looking for a Transformation library or engine which can read any input (EDIfact files, CSV, XML, stuff like that. So files (or webservices results) that contain data which must be transformed to a known business object structure.) This data should be transf... | TITLE:
Is there a Transformation engine or library using .NET?
QUESTION:
We're looking for a Transformation library or engine which can read any input (EDIfact files, CSV, XML, stuff like that. So files (or webservices results) that contain data which must be transformed to a known business object structure.) This dat... | [
"c#",
"transformation",
"altova"
] | 3 | 3 | 3,769 | 5 | 0 | 2008-09-15T10:05:11.493000 | 2008-09-15T12:54:48.373000 |
62,079 | 62,094 | Comparing runtimes | I am trying to get some accurate runtime comparisons of PHP vs Python (and potentially any other language that I have to include). Timing within a script is not my problem but timing within a script does not account for everything from the moment the request is made to run the script to output. 1) Is it actually worth ... | If your idea is to compare the languages, I'd say anything outside them is not relevant for comparison purposes. Nonetheless you can use the time command to measure everything and can compare it with the timing within a script. Like this: $ time script.php HI!
real 0m3.218s user 0m0.080s sys 0m0.064s It will give you ... | Comparing runtimes I am trying to get some accurate runtime comparisons of PHP vs Python (and potentially any other language that I have to include). Timing within a script is not my problem but timing within a script does not account for everything from the moment the request is made to run the script to output. 1) Is... | TITLE:
Comparing runtimes
QUESTION:
I am trying to get some accurate runtime comparisons of PHP vs Python (and potentially any other language that I have to include). Timing within a script is not my problem but timing within a script does not account for everything from the moment the request is made to run the scrip... | [
"php",
"python",
"benchmarking"
] | 2 | 4 | 1,064 | 3 | 0 | 2008-09-15T10:06:19.103000 | 2008-09-15T10:18:05.207000 |
62,086 | 62,926 | E4X : Assigning to root node | I am using Adobe Flex/Air here, but as far as I know this applies to all of JavaScript. I have come across this problem a few times, and there must be an easy solution out there! Suppose I have the following XML (using e4x): var xml:XML = foo I can change the contents of the example node using the following code: xml.e... | It seems you confuse variables for the values they contain. The assignment node = textInput.text; changes the value the variable node points to, it doesn't change anything with the object that node currently points to. To do what you want to do you can use the setChildren method of the XML class: node.setChildren(textI... | E4X : Assigning to root node I am using Adobe Flex/Air here, but as far as I know this applies to all of JavaScript. I have come across this problem a few times, and there must be an easy solution out there! Suppose I have the following XML (using e4x): var xml:XML = foo I can change the contents of the example node us... | TITLE:
E4X : Assigning to root node
QUESTION:
I am using Adobe Flex/Air here, but as far as I know this applies to all of JavaScript. I have come across this problem a few times, and there must be an easy solution out there! Suppose I have the following XML (using e4x): var xml:XML = foo I can change the contents of t... | [
"javascript",
"apache-flex",
"air",
"e4x"
] | 1 | 5 | 2,414 | 3 | 0 | 2008-09-15T10:12:05.283000 | 2008-09-15T13:36:18.273000 |
62,102 | 70,574 | What does Class::MethodMaker exactly do? | I want to know what exactly is the sequence of calls that occurs when a getter/setter created through Class::MethodMaker is called? How much costlier are getter/setters defined by MethodMaker than the native ones (overwritten in the module)? | I don't have a simple answer for your question regarding Class::MethodMaker performance. As a previous answer mentioned, you can use the debugger to find out what's going on under the hood. However, I know that Class::MethodMaker generates huge amounts of code at install time. This would indicate three separate things ... | What does Class::MethodMaker exactly do? I want to know what exactly is the sequence of calls that occurs when a getter/setter created through Class::MethodMaker is called? How much costlier are getter/setters defined by MethodMaker than the native ones (overwritten in the module)? | TITLE:
What does Class::MethodMaker exactly do?
QUESTION:
I want to know what exactly is the sequence of calls that occurs when a getter/setter created through Class::MethodMaker is called? How much costlier are getter/setters defined by MethodMaker than the native ones (overwritten in the module)?
ANSWER:
I don't ha... | [
"perl"
] | 2 | 2 | 1,444 | 5 | 0 | 2008-09-15T10:26:10.227000 | 2008-09-16T09:07:47.770000 |
62,110 | 62,122 | ADO.NET Entity Framework tutorials | Does anyone know of any good tutorials on ADO.NET Entity Framework? There are a few useful links here at Stack OverFlow, and I've found one tutorial at Jason's DotNet Architecture Blog, but can anyone recommend any other good tutorials? Any tutorials available from Microsoft, either online or as part of any conference/... | Microsoft offers.NET 3.5 Enhancements Training Kit it contains documentation and sample code for ADO.NET EF | ADO.NET Entity Framework tutorials Does anyone know of any good tutorials on ADO.NET Entity Framework? There are a few useful links here at Stack OverFlow, and I've found one tutorial at Jason's DotNet Architecture Blog, but can anyone recommend any other good tutorials? Any tutorials available from Microsoft, either o... | TITLE:
ADO.NET Entity Framework tutorials
QUESTION:
Does anyone know of any good tutorials on ADO.NET Entity Framework? There are a few useful links here at Stack OverFlow, and I've found one tutorial at Jason's DotNet Architecture Blog, but can anyone recommend any other good tutorials? Any tutorials available from M... | [
"entity-framework",
"ado.net"
] | 28 | 13 | 22,738 | 4 | 0 | 2008-09-15T10:30:51.307000 | 2008-09-15T10:37:13.383000 |
62,127 | 62,150 | How can I find the current DNS server? | I'm using Delphi and need to get the current Windows DNS server IP address so I can do a lookup. What function should I call to find it? The only solution I have right now does an ipconfig/all to get it, which is horrible. | Found a nice one using the function GetNetworkParams().Seems to work quite good. You can find it here: http://www.swissdelphicenter.ch/torry/showcode.php?id=2452 | How can I find the current DNS server? I'm using Delphi and need to get the current Windows DNS server IP address so I can do a lookup. What function should I call to find it? The only solution I have right now does an ipconfig/all to get it, which is horrible. | TITLE:
How can I find the current DNS server?
QUESTION:
I'm using Delphi and need to get the current Windows DNS server IP address so I can do a lookup. What function should I call to find it? The only solution I have right now does an ipconfig/all to get it, which is horrible.
ANSWER:
Found a nice one using the func... | [
"windows",
"delphi",
"networking",
"dns"
] | 5 | 4 | 5,963 | 3 | 0 | 2008-09-15T10:40:10.257000 | 2008-09-15T10:56:10.687000 |
62,137 | 62,140 | What is a Covered Index? | I've just heard the term covered index in some database discussion - what does it mean? | A covering index is an index that contains all of, and possibly more, the columns you need for your query. For instance, this: SELECT * FROM tablename WHERE criteria will typically use indexes to speed up the resolution of which rows to retrieve using criteria, but then it will go to the full table to retrieve the rows... | What is a Covered Index? I've just heard the term covered index in some database discussion - what does it mean? | TITLE:
What is a Covered Index?
QUESTION:
I've just heard the term covered index in some database discussion - what does it mean?
ANSWER:
A covering index is an index that contains all of, and possibly more, the columns you need for your query. For instance, this: SELECT * FROM tablename WHERE criteria will typically... | [
"sql",
"database",
"indexing"
] | 71 | 64 | 48,671 | 4 | 0 | 2008-09-15T10:45:57.607000 | 2008-09-15T10:51:35.253000 |
62,146 | 415,736 | Does anyone have a handy visulization widget that I can use for a web project? | What I want is lots of nodes which can expand making a mind map. I'd ideally like to expand and collapse nodes. I would like to be able to navigate by either dragging around the page, or by following expanded nodes. | I have a colleague who needed that kind of functionalities to graph Maven dependencies between projects. He ended up using FreeMind to do the visualization. He just had to write an XML file conforming to the FreeMind format. I even think you can just use OPML as the file format and find a ready to use XSLT to transform... | Does anyone have a handy visulization widget that I can use for a web project? What I want is lots of nodes which can expand making a mind map. I'd ideally like to expand and collapse nodes. I would like to be able to navigate by either dragging around the page, or by following expanded nodes. | TITLE:
Does anyone have a handy visulization widget that I can use for a web project?
QUESTION:
What I want is lots of nodes which can expand making a mind map. I'd ideally like to expand and collapse nodes. I would like to be able to navigate by either dragging around the page, or by following expanded nodes.
ANSWER... | [
"visualization"
] | 1 | 4 | 339 | 4 | 0 | 2008-09-15T10:54:54.497000 | 2009-01-06T07:42:14.937000 |
62,151 | 62,160 | DateTime.Now vs. DateTime.UtcNow | I've been wondering what exactly are the principles of how the two properties work. I know the second one is universal and basically doesn't deal with time zones, but can someone explain in detail how they work and which one should be used in what scenario? | DateTime.UtcNow tells you the date and time as it would be in Coordinated Universal Time, which is also called the Greenwich Mean Time time zone - basically like it would be if you were in London England, but not during the summer. DateTime.Now gives the date and time as it would appear to someone in your current local... | DateTime.Now vs. DateTime.UtcNow I've been wondering what exactly are the principles of how the two properties work. I know the second one is universal and basically doesn't deal with time zones, but can someone explain in detail how they work and which one should be used in what scenario? | TITLE:
DateTime.Now vs. DateTime.UtcNow
QUESTION:
I've been wondering what exactly are the principles of how the two properties work. I know the second one is universal and basically doesn't deal with time zones, but can someone explain in detail how they work and which one should be used in what scenario?
ANSWER:
Da... | [
".net",
"language-features",
"date"
] | 315 | 461 | 303,372 | 13 | 0 | 2008-09-15T10:57:42.413000 | 2008-09-15T11:02:43.383000 |
62,153 | 180,008 | Reasons not to build your own bug tracking system | Several times now I've been faced with plans from a team that wants to build their own bug tracking system - Not as a product, but as an internal tool. The arguments I've heard in favous are usually along the lines of: Wanting to 'eat our own dog food' in terms of some internally built web framework Needing some highly... | First, look at these Ohloh metrics: Trac: 44 KLoC, 10 Person Years, $577,003 Bugzilla: 54 KLoC, 13 Person Years, $714,437 Redmine: 171 KLoC, 44 Person Years, $2,400,723 Mantis: 182 KLoC, 47 Person Years, $2,562,978 What do we learn from these numbers? We learn that building Yet Another Bug Tracker is a great way to was... | Reasons not to build your own bug tracking system Several times now I've been faced with plans from a team that wants to build their own bug tracking system - Not as a product, but as an internal tool. The arguments I've heard in favous are usually along the lines of: Wanting to 'eat our own dog food' in terms of some ... | TITLE:
Reasons not to build your own bug tracking system
QUESTION:
Several times now I've been faced with plans from a team that wants to build their own bug tracking system - Not as a product, but as an internal tool. The arguments I've heard in favous are usually along the lines of: Wanting to 'eat our own dog food'... | [
"bug-tracking"
] | 54 | 81 | 20,126 | 35 | 0 | 2008-09-15T10:59:42.003000 | 2008-10-07T19:39:28.133000 |
62,154 | 62,200 | Response.Clear in ASP.NET 3.5 | I have recently upgraded some of my web applications to ASP.NET 3.5 by installing the framework on the server and setting up my web applications acrodingly and all is well, however. On some pages, I want to clear the current contents of the response buffer with code like this: Response.Clear(); // Output some stuff Res... | Try setting Buffer="True" in the Page Directive of the page and not in codebehind. I just tried this in VS2008 on a Web Site project: Create new item Choose "Web page" Leave all the html-tags in there, just for fun Fill the page_load like this protected void Page_Load(object sender, EventArgs e) { Response.Write("test1... | Response.Clear in ASP.NET 3.5 I have recently upgraded some of my web applications to ASP.NET 3.5 by installing the framework on the server and setting up my web applications acrodingly and all is well, however. On some pages, I want to clear the current contents of the response buffer with code like this: Response.Cle... | TITLE:
Response.Clear in ASP.NET 3.5
QUESTION:
I have recently upgraded some of my web applications to ASP.NET 3.5 by installing the framework on the server and setting up my web applications acrodingly and all is well, however. On some pages, I want to clear the current contents of the response buffer with code like ... | [
"asp.net"
] | 6 | 12 | 16,152 | 1 | 0 | 2008-09-15T11:00:17.603000 | 2008-09-15T11:24:29.573000 |
62,159 | 62,176 | Would you bother to mock StreamReader object? | I use a stream reader to import some data and at the moment I hardcode a small sample file in the test to do the job. Is it sensible to use Mock Objects with this and how? | I don't see any points to mock StreamReader unless you're making StreamReader derived class. If you need to provide test input via StreamReader, just read some predefined data from any suitable source. | Would you bother to mock StreamReader object? I use a stream reader to import some data and at the moment I hardcode a small sample file in the test to do the job. Is it sensible to use Mock Objects with this and how? | TITLE:
Would you bother to mock StreamReader object?
QUESTION:
I use a stream reader to import some data and at the moment I hardcode a small sample file in the test to do the job. Is it sensible to use Mock Objects with this and how?
ANSWER:
I don't see any points to mock StreamReader unless you're making StreamRead... | [
".net",
"mocking"
] | 3 | 3 | 2,886 | 4 | 0 | 2008-09-15T11:02:43.353000 | 2008-09-15T11:10:45.283000 |
62,188 | 66,744 | What's the shortest code to cause a stack overflow? | To commemorate the public launch of Stack Overflow, what's the shortest code to cause a stack overflow? Any language welcome. ETA: Just to be clear on this question, seeing as I'm an occasional Scheme user: tail-call "recursion" is really iteration, and any solution which can be converted to an iterative solution relat... | All these answers and no Befunge? I'd wager a fair amount it's shortest solution of them all: 1 Not kidding. Try it yourself: http://www.quirkster.com/iano/js/befunge.html EDIT: I guess I need to explain this one. The 1 operand pushes a 1 onto Befunge's internal stack and the lack of anything else puts it in a loop und... | What's the shortest code to cause a stack overflow? To commemorate the public launch of Stack Overflow, what's the shortest code to cause a stack overflow? Any language welcome. ETA: Just to be clear on this question, seeing as I'm an occasional Scheme user: tail-call "recursion" is really iteration, and any solution w... | TITLE:
What's the shortest code to cause a stack overflow?
QUESTION:
To commemorate the public launch of Stack Overflow, what's the shortest code to cause a stack overflow? Any language welcome. ETA: Just to be clear on this question, seeing as I'm an occasional Scheme user: tail-call "recursion" is really iteration, ... | [
"language-agnostic",
"code-golf"
] | 160 | 211 | 37,522 | 129 | 0 | 2008-09-15T11:17:38.467000 | 2008-09-15T20:43:25.687000 |
62,201 | 76,136 | How (and whether) to populate rails application with initial data | I've got a rails application where users have to log in. Therefore in order for the application to be usable, there must be one initial user in the system for the first person to log in with (they can then create subsequent users). Up to now I've used a migration to add a special user to the database. After asking this... | I thought I'd summarise some of the great answers I've had to this question, together with my own thoughts now I've read them all:) There are two distinct issues here: Should I pre-populate the database with my special 'admin' user? Or should the application provide a way to set up when it's first used? How does one pr... | How (and whether) to populate rails application with initial data I've got a rails application where users have to log in. Therefore in order for the application to be usable, there must be one initial user in the system for the first person to log in with (they can then create subsequent users). Up to now I've used a ... | TITLE:
How (and whether) to populate rails application with initial data
QUESTION:
I've got a rails application where users have to log in. Therefore in order for the application to be usable, there must be one initial user in the system for the first person to log in with (they can then create subsequent users). Up t... | [
"ruby-on-rails",
"data-migration"
] | 65 | 4 | 36,222 | 13 | 0 | 2008-09-15T11:25:19.260000 | 2008-09-16T19:42:43.517000 |
62,219 | 62,224 | Is there any way to get rid of the long list of usings at the top of my .cs files? | As I get more and more namespaces in my solution, the list of using statements at the top of my files grows longer and longer. This is especially the case in my unit tests where for each component that might be called I need to include the using for the interface, the IoC container, and the concrete type. With upward o... | Some people enjoy hiding the usings in a #region. Otherwise, I think you're out of luck. Unless you want to put the namespace on all your referents. | Is there any way to get rid of the long list of usings at the top of my .cs files? As I get more and more namespaces in my solution, the list of using statements at the top of my files grows longer and longer. This is especially the case in my unit tests where for each component that might be called I need to include t... | TITLE:
Is there any way to get rid of the long list of usings at the top of my .cs files?
QUESTION:
As I get more and more namespaces in my solution, the list of using statements at the top of my files grows longer and longer. This is especially the case in my unit tests where for each component that might be called I... | [
"c#",
".net",
"visual-studio",
"namespaces"
] | 0 | 4 | 909 | 10 | 0 | 2008-09-15T11:41:43.230000 | 2008-09-15T11:44:04.033000 |
62,225 | 62,336 | Classis ASP debugging global.asa in VS2005 | I was trying to set a breakpoint in global.asa in an old classic ASP project with IIS 6 in Visual Studio 2005. Somehow the context menu for actually setting the breakpoint somewhere in global.asa is disabled (greyed). How can I set a breakpoint then? Breakpoints in.asp pages are no problem though and do work fine. | Try this: How to: Debug Global.asa files. The short version is to place a VBScript Stop statement or JScript debugger at the beginning of the procedure, before any statements that you will want to step through. | Classis ASP debugging global.asa in VS2005 I was trying to set a breakpoint in global.asa in an old classic ASP project with IIS 6 in Visual Studio 2005. Somehow the context menu for actually setting the breakpoint somewhere in global.asa is disabled (greyed). How can I set a breakpoint then? Breakpoints in.asp pages a... | TITLE:
Classis ASP debugging global.asa in VS2005
QUESTION:
I was trying to set a breakpoint in global.asa in an old classic ASP project with IIS 6 in Visual Studio 2005. Somehow the context menu for actually setting the breakpoint somewhere in global.asa is disabled (greyed). How can I set a breakpoint then? Breakpoi... | [
"visual-studio",
"debugging",
"visual-studio-2005",
"asp-classic",
"global.asa"
] | 2 | 2 | 1,271 | 1 | 0 | 2008-09-15T11:44:26.763000 | 2008-09-15T12:27:39.297000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.