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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
188,208 | 188,326 | What's the difference between "&> foo" and "> foo 2>&1"? | There seem to be two bash idioms for redirecting STDOUT and STDERR to a file: fooscript &> foo... and... fooscript > foo 2>&1 What's the difference? It seems to me that the first one is just a shortcut for the second one, but my coworker contends that the second one will produce no output even if there's an error with ... | From the bash manual: There are two formats for redirecting standard output and standard error: &>word and >&word Of the two forms, the first is preferred. This is semantically equivalent to >word 2>&1 The phrase "semantically equivalent" should settle the issue with your coworker. | What's the difference between "&> foo" and "> foo 2>&1"? There seem to be two bash idioms for redirecting STDOUT and STDERR to a file: fooscript &> foo... and... fooscript > foo 2>&1 What's the difference? It seems to me that the first one is just a shortcut for the second one, but my coworker contends that the second ... | TITLE:
What's the difference between "&> foo" and "> foo 2>&1"?
QUESTION:
There seem to be two bash idioms for redirecting STDOUT and STDERR to a file: fooscript &> foo... and... fooscript > foo 2>&1 What's the difference? It seems to me that the first one is just a shortcut for the second one, but my coworker contend... | [
"bash"
] | 10 | 8 | 2,585 | 8 | 0 | 2008-10-09T17:01:48.200000 | 2008-10-09T17:33:39.023000 |
188,214 | 188,226 | MS SQL datetime prior than 1/1/1900 | Surely there is a way to store a date value prior than 1-1-1900 in a column other than varchar? Or do I really have to break this out, and perform my own datetime library for date differences, sorting, and such? Yes, I understand how datetime's are actually stored (an integer value from a specific date), but I remember... | smalldatetime vs. datetime! http://msdn.microsoft.com/en-us/library/ms187819.aspx http://msdn.microsoft.com/en-us/library/ms182418.aspx! | MS SQL datetime prior than 1/1/1900 Surely there is a way to store a date value prior than 1-1-1900 in a column other than varchar? Or do I really have to break this out, and perform my own datetime library for date differences, sorting, and such? Yes, I understand how datetime's are actually stored (an integer value f... | TITLE:
MS SQL datetime prior than 1/1/1900
QUESTION:
Surely there is a way to store a date value prior than 1-1-1900 in a column other than varchar? Or do I really have to break this out, and perform my own datetime library for date differences, sorting, and such? Yes, I understand how datetime's are actually stored (... | [
"sql-server",
"date"
] | 4 | 10 | 14,905 | 3 | 0 | 2008-10-09T17:04:37.087000 | 2008-10-09T17:07:23.273000 |
188,225 | 188,256 | How to assign keyboard shortcut to Source Control commands in Visual Studio 2008? | I use Visual C++ 2008 in Visual Studio 2008. I frequently use the following command to diff an open file against its most recent checked-in version: File | Source Control | Compare... I can also do the same thing by clicking on an icon in the Source Control toolbar. I'm not certain, but I believe this command is the sa... | Tools -> Options -> Keyboard -> Commands Containing "Compare" | How to assign keyboard shortcut to Source Control commands in Visual Studio 2008? I use Visual C++ 2008 in Visual Studio 2008. I frequently use the following command to diff an open file against its most recent checked-in version: File | Source Control | Compare... I can also do the same thing by clicking on an icon in... | TITLE:
How to assign keyboard shortcut to Source Control commands in Visual Studio 2008?
QUESTION:
I use Visual C++ 2008 in Visual Studio 2008. I frequently use the following command to diff an open file against its most recent checked-in version: File | Source Control | Compare... I can also do the same thing by clic... | [
"visual-studio",
"visual-studio-2008",
"visual-c++",
"visual-studio-2005",
"perforce"
] | 2 | 2 | 930 | 2 | 0 | 2008-10-09T17:06:57.940000 | 2008-10-09T17:14:09.767000 |
188,236 | 339,734 | TFS Get Specific Version addin | I am looking for an addin that will allow me to click a button on the VS toolbar and the following actions should happen. On the highlighted project/folder/item from either Source Control Explorer or Solution Explorer, do a 'Get Specific Version' Click those 2 checkboxes, hit the 'Get' button on that dialog alt text ht... | I assume that you just want to make sure developers are starting their changes on the most recent version? If that is the case, and you are using VSTS 2008 and TFS 2008, then using the " Get Latest Version on Checkout " setting of both is probably your answer, if you aren't then the " CheckOut and Get Latest Version " ... | TFS Get Specific Version addin I am looking for an addin that will allow me to click a button on the VS toolbar and the following actions should happen. On the highlighted project/folder/item from either Source Control Explorer or Solution Explorer, do a 'Get Specific Version' Click those 2 checkboxes, hit the 'Get' bu... | TITLE:
TFS Get Specific Version addin
QUESTION:
I am looking for an addin that will allow me to click a button on the VS toolbar and the following actions should happen. On the highlighted project/folder/item from either Source Control Explorer or Solution Explorer, do a 'Get Specific Version' Click those 2 checkboxes... | [
"tfs",
"visual-studio-addins",
"vsx"
] | 0 | 1 | 1,234 | 2 | 0 | 2008-10-09T17:09:08.420000 | 2008-12-04T06:43:06.370000 |
188,241 | 189,091 | Which Version of StringComparer to use | If I want to have a case-insensitive string-keyed dictionary, which version of StringComparer should I use given these constraints: The keys in the dictionary come from either C# code or config files written in english locale only (either US, or UK) The software is internationalized and will run in different locales I ... | This MSDN article covers everything you could possibly want to know in great depth, including the Turkish-I problem. It's been a while since I read it, so I'm off to do so again. See you in an hour! | Which Version of StringComparer to use If I want to have a case-insensitive string-keyed dictionary, which version of StringComparer should I use given these constraints: The keys in the dictionary come from either C# code or config files written in english locale only (either US, or UK) The software is internationaliz... | TITLE:
Which Version of StringComparer to use
QUESTION:
If I want to have a case-insensitive string-keyed dictionary, which version of StringComparer should I use given these constraints: The keys in the dictionary come from either C# code or config files written in english locale only (either US, or UK) The software ... | [
"c#",
".net",
"string",
"internationalization"
] | 21 | 12 | 8,657 | 7 | 0 | 2008-10-09T17:10:30.240000 | 2008-10-09T20:33:29.207000 |
188,242 | 193,821 | Data Types supported in visual studio 2008 | I just downloaded and installed the latest Adventure Works database from http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=16040 to do some more playing around with LINQ and found that there are some data types that are not natively supported within Visual Studio 2008. I get the "One or m... | According to this blog post it's everything except the spatial types (Geometry and Geography) and the HierarchyID data type. As for why? Well they release support for most of the types in an update, as per this blog bost by the ADO.NET team, but that's the last LINQ to SQL entry. They seem to be only worried about the ... | Data Types supported in visual studio 2008 I just downloaded and installed the latest Adventure Works database from http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=16040 to do some more playing around with LINQ and found that there are some data types that are not natively supported wit... | TITLE:
Data Types supported in visual studio 2008
QUESTION:
I just downloaded and installed the latest Adventure Works database from http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=16040 to do some more playing around with LINQ and found that there are some data types that are not nati... | [
"sql-server",
"visual-studio",
"visual-studio-2008",
"linq",
"types"
] | 2 | 6 | 2,409 | 2 | 0 | 2008-10-09T17:10:43.657000 | 2008-10-11T07:46:48.167000 |
188,245 | 477,247 | mosso versus gogrid which is better? | I have reasonable experience to manage my own server, so gogrid style management is not a problem. But seems mosso is a tag cheaper somewhat- except the very difficult to access compute cycles terms. Anyone could share about this would be very welcomed. | It's simple, Mosso is just like a "reseller" hosting. They provide you everything whitelabel from billing to control panel then you sell it back to customers. If you are developer, I recommend you choose GoGrid. Firstly, Mosso doesn't provide SSH access. Secondly, if you are RoR/Mongrel user, you are capped to limited ... | mosso versus gogrid which is better? I have reasonable experience to manage my own server, so gogrid style management is not a problem. But seems mosso is a tag cheaper somewhat- except the very difficult to access compute cycles terms. Anyone could share about this would be very welcomed. | TITLE:
mosso versus gogrid which is better?
QUESTION:
I have reasonable experience to manage my own server, so gogrid style management is not a problem. But seems mosso is a tag cheaper somewhat- except the very difficult to access compute cycles terms. Anyone could share about this would be very welcomed.
ANSWER:
It... | [
"web-hosting",
"mosso",
"gogrid"
] | 3 | 1 | 1,373 | 6 | 0 | 2008-10-09T17:11:25.107000 | 2009-01-25T06:17:57.153000 |
188,248 | 188,824 | C# Custom ListView | Does anyone have any info on creating/drawing a customised ListView object? Currently Im working on a project that requires a customised look and feel within the application. I am using a standard (Windows.Forms) ListView which is not in the same style as the rest of the GUI. We are NOT using a toolbox for custom contr... | From what I can tell you will need to actually make some Win32 calls using NM_CUSTOMDRAW to actually change the paint behavior of the control. Here is one article I found. You are going to have to do a bit more digging. | C# Custom ListView Does anyone have any info on creating/drawing a customised ListView object? Currently Im working on a project that requires a customised look and feel within the application. I am using a standard (Windows.Forms) ListView which is not in the same style as the rest of the GUI. We are NOT using a toolb... | TITLE:
C# Custom ListView
QUESTION:
Does anyone have any info on creating/drawing a customised ListView object? Currently Im working on a project that requires a customised look and feel within the application. I am using a standard (Windows.Forms) ListView which is not in the same style as the rest of the GUI. We are... | [
"c#",
"listview"
] | 4 | 1 | 5,432 | 2 | 0 | 2008-10-09T17:12:02.907000 | 2008-10-09T19:30:20.647000 |
188,258 | 188,288 | ASP.NET Web Dev: Map one directory to another? | We are thinking of renaming our web directory schema to be more user friendly. However, we need any URL requests for the old directory structure to forward to the new one. so.... How do I forward requests for all of these: http://mydomain.com/OLDdirname/ http://mydomain.com/OLDdirname/samesubdir/ http://mydomain.com/OL... | You can use a number of things to do something like this. Basically, you're doing URL Rewriting. One of these products should help you get the job done: ISAPI Rewrite IIS Rewrite opURL IIRF | ASP.NET Web Dev: Map one directory to another? We are thinking of renaming our web directory schema to be more user friendly. However, we need any URL requests for the old directory structure to forward to the new one. so.... How do I forward requests for all of these: http://mydomain.com/OLDdirname/ http://mydomain.co... | TITLE:
ASP.NET Web Dev: Map one directory to another?
QUESTION:
We are thinking of renaming our web directory schema to be more user friendly. However, we need any URL requests for the old directory structure to forward to the new one. so.... How do I forward requests for all of these: http://mydomain.com/OLDdirname/ ... | [
"asp.net",
"iis"
] | 0 | 4 | 249 | 2 | 0 | 2008-10-09T17:15:30.963000 | 2008-10-09T17:23:40.963000 |
188,266 | 188,308 | How are ssl certificates verified? | What is the series of steps needed to securely verify a ssl certificate? My (very limited) understanding is that when you visit an https site, the server sends a certificate to the client (the browser) and the browser gets the certificate's issuer information from that certificate, then uses that to contact the issuere... | Here is a very simplified explanation: Your web browser downloads the web server's certificate, which contains the public key of the web server. This certificate is signed with the private key of a trusted certificate authority. Your web browser comes installed with the public keys of all of the major certificate autho... | How are ssl certificates verified? What is the series of steps needed to securely verify a ssl certificate? My (very limited) understanding is that when you visit an https site, the server sends a certificate to the client (the browser) and the browser gets the certificate's issuer information from that certificate, th... | TITLE:
How are ssl certificates verified?
QUESTION:
What is the series of steps needed to securely verify a ssl certificate? My (very limited) understanding is that when you visit an https site, the server sends a certificate to the client (the browser) and the browser gets the certificate's issuer information from th... | [
"security",
"ssl",
"certificate",
"x509"
] | 313 | 417 | 168,264 | 6 | 0 | 2008-10-09T17:16:29.793000 | 2008-10-09T17:28:36.913000 |
188,276 | 198,693 | Online Computer Science articles repository? | When I need some complex algorithm I first check if there's anything relevant already published on the Internet. 10 times out of 10 I'll find that someone already have figured out a solution much smarter than what I would have thought of. Apart from a generic Google search, I use: Citeseer That has a lot of good theori... | Google’s CS Curriculum Search might be useful. It's a Google web search restricted to the CS departments of universities. It categorises the results into “Lectures”, “Assignments” and “Reference”. Also Scholarpedia, which is like Wikipedia but with standards. | Online Computer Science articles repository? When I need some complex algorithm I first check if there's anything relevant already published on the Internet. 10 times out of 10 I'll find that someone already have figured out a solution much smarter than what I would have thought of. Apart from a generic Google search, ... | TITLE:
Online Computer Science articles repository?
QUESTION:
When I need some complex algorithm I first check if there's anything relevant already published on the Internet. 10 times out of 10 I'll find that someone already have figured out a solution much smarter than what I would have thought of. Apart from a gener... | [
"computer-science"
] | 16 | 4 | 1,809 | 8 | 0 | 2008-10-09T17:20:10.800000 | 2008-10-13T19:11:33.493000 |
188,281 | 188,448 | Delphi TThread.CurrentThread and EAccessViolation - Is This a Bug or My Incompetence..? | In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application, I'll get an error message like the following when the application closes: Exception EAccessViolation in module ntdll.dll at 0003DBBA. Access violation at address 7799DBBA in module 'ntdll.dll'. Write of address 00000014. Unless it's... | Unfortunately it seems like a bug linked to the call order of the finalization section in the Classes unit: DoneThreadSynchronization clears the ThreadLock structure, then FreeExternalThreads wants to destroy the Thread object you just created when calling CurrentThread, and that requires the ThreadLock to be already i... | Delphi TThread.CurrentThread and EAccessViolation - Is This a Bug or My Incompetence..? In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application, I'll get an error message like the following when the application closes: Exception EAccessViolation in module ntdll.dll at 0003DBBA. Access vio... | TITLE:
Delphi TThread.CurrentThread and EAccessViolation - Is This a Bug or My Incompetence..?
QUESTION:
In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application, I'll get an error message like the following when the application closes: Exception EAccessViolation in module ntdll.dll at 00... | [
"delphi",
"delphi-2009",
"tthread"
] | 11 | 15 | 8,175 | 4 | 0 | 2008-10-09T17:20:59.363000 | 2008-10-09T18:07:34.633000 |
188,299 | 188,407 | Marshal C++ struct array into C# | I have the following struct in C++: #define MAXCHARS 15
typedef struct { char data[MAXCHARS]; int prob[MAXCHARS]; } LPRData; And a function that I'm p/invoking into to get an array of 3 of these structures: void GetData(LPRData *data); In C++ I would just do something like this: LPRData *Results; Results = (LPRData *)... | I would try adding some attributes to your struct decloration [StructLayout(LayoutKind.Sequential, Size=TotalBytesInStruct),Serializable] public struct LPRData { /// char[15] [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 15)] public string data;
/// int[15] [MarshalAsAttribute(UnmanagedType.ByValArray, Size... | Marshal C++ struct array into C# I have the following struct in C++: #define MAXCHARS 15
typedef struct { char data[MAXCHARS]; int prob[MAXCHARS]; } LPRData; And a function that I'm p/invoking into to get an array of 3 of these structures: void GetData(LPRData *data); In C++ I would just do something like this: LPRDat... | TITLE:
Marshal C++ struct array into C#
QUESTION:
I have the following struct in C++: #define MAXCHARS 15
typedef struct { char data[MAXCHARS]; int prob[MAXCHARS]; } LPRData; And a function that I'm p/invoking into to get an array of 3 of these structures: void GetData(LPRData *data); In C++ I would just do something... | [
"c#",
"c++",
"interop",
"struct",
"marshalling"
] | 28 | 25 | 72,650 | 5 | 0 | 2008-10-09T17:27:02.937000 | 2008-10-09T17:54:03.180000 |
188,306 | 188,319 | Is it safe to just copy a SVN repository to an external HDD? | Right now, my SVN repository is on my laptop's HDD (although I use a code hosting service for more "critical" personal projects) and I just copy the directory over on a weekly basis (which will eventually be scripted or perhaps I'll make an app for the hell of it). Am I at risk for corrupting my SVN repository? So far,... | Consider using hot copy: svnadmin hotcopy — Make a hot copy of a repository... This subcommand makes a full “hot” backup of your repository, including all hooks, configuration files, and, of course, database files. If you pass the --clean-logs switch, svnadmin will perform a hotcopy of your repository, and then remove ... | Is it safe to just copy a SVN repository to an external HDD? Right now, my SVN repository is on my laptop's HDD (although I use a code hosting service for more "critical" personal projects) and I just copy the directory over on a weekly basis (which will eventually be scripted or perhaps I'll make an app for the hell o... | TITLE:
Is it safe to just copy a SVN repository to an external HDD?
QUESTION:
Right now, my SVN repository is on my laptop's HDD (although I use a code hosting service for more "critical" personal projects) and I just copy the directory over on a weekly basis (which will eventually be scripted or perhaps I'll make an ... | [
"svn",
"version-control",
"backup"
] | 8 | 12 | 1,997 | 6 | 0 | 2008-10-09T17:28:13.873000 | 2008-10-09T17:32:20.150000 |
188,310 | 188,412 | Expose Java class as SOAP WebService - how? | I am looking for a framework to turn given Java class into WebService (may be with some limitations on method parameters etc) Thanks | You can use axis2, or xfire. I'm sure there are other ways also, but these are the two that I've used. | Expose Java class as SOAP WebService - how? I am looking for a framework to turn given Java class into WebService (may be with some limitations on method parameters etc) Thanks | TITLE:
Expose Java class as SOAP WebService - how?
QUESTION:
I am looking for a framework to turn given Java class into WebService (may be with some limitations on method parameters etc) Thanks
ANSWER:
You can use axis2, or xfire. I'm sure there are other ways also, but these are the two that I've used. | [
"java",
"web-services",
"soap"
] | 2 | 3 | 2,105 | 2 | 0 | 2008-10-09T17:28:54.370000 | 2008-10-09T17:56:03.380000 |
188,327 | 188,662 | ASP.NET GridView CommandField Update/Cancel does not wrap | My question is on the ASP.NET GridView control. I am using a CommandField in the Columns tag as seen below. What renders is the shown in the following image (after I click on the Edit button). As you can see I am trying to have the Cancel link show up a new line and my question is how do you do what? If I change the Bu... | If you use a template field it will give you complete control over the look of your page, but it requires that you use the CommandName and possible CommandArgument properties, and also using the GridView's OnRowCommand. The aspx page: Some Stuff random content The code behind: protected void gvGrid_Command(object sende... | ASP.NET GridView CommandField Update/Cancel does not wrap My question is on the ASP.NET GridView control. I am using a CommandField in the Columns tag as seen below. What renders is the shown in the following image (after I click on the Edit button). As you can see I am trying to have the Cancel link show up a new line... | TITLE:
ASP.NET GridView CommandField Update/Cancel does not wrap
QUESTION:
My question is on the ASP.NET GridView control. I am using a CommandField in the Columns tag as seen below. What renders is the shown in the following image (after I click on the Edit button). As you can see I am trying to have the Cancel link ... | [
"asp.net",
"gridview",
"hyperlink",
"commandfield"
] | 1 | 3 | 22,752 | 2 | 0 | 2008-10-09T17:33:52.083000 | 2008-10-09T18:53:01.843000 |
188,334 | 188,435 | Inheriting from an ASP.NET web control: "Element <name> is not a known element" | I'm attempting to create a custom calendar control that inherits from ASP.Net's built in calendar user control. the code-behind file for my control looks like this: public partial class WeeklyEventsCalendar: Calendar { protected void Page_Load(object sender, EventArgs e) {
} } and compiles fine. However, when I try to... | Bryant hit on it. One thing you might consider if all you're doing is customizing the existing control is embedding an instance of the calendar on your user control and exposing the properties you need from it. This way your user control can handle all of the requisite customizations, and also provide only a limited in... | Inheriting from an ASP.NET web control: "Element <name> is not a known element" I'm attempting to create a custom calendar control that inherits from ASP.Net's built in calendar user control. the code-behind file for my control looks like this: public partial class WeeklyEventsCalendar: Calendar { protected void Page_L... | TITLE:
Inheriting from an ASP.NET web control: "Element <name> is not a known element"
QUESTION:
I'm attempting to create a custom calendar control that inherits from ASP.Net's built in calendar user control. the code-behind file for my control looks like this: public partial class WeeklyEventsCalendar: Calendar { pro... | [
"c#",
"asp.net",
"inheritance",
"user-controls"
] | 5 | 4 | 7,935 | 2 | 0 | 2008-10-09T17:35:00.270000 | 2008-10-09T18:04:23.563000 |
188,344 | 4,681,016 | Caching Application Block Error | Has anyone seen this error before? An error occurred creating the configuration section handler for cachingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's ... | This was the deal, when referencing dlls in the C:\EntLib4Src\bin, they are signed and could only be configured by the EntLibConfig.exe found in that same folder and not the one from "Start>Programs>Microsoft Patterns...>Ent Wasn't that tricky? | Caching Application Block Error Has anyone seen this error before? An error occurred creating the configuration section handler for cachingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its depen... | TITLE:
Caching Application Block Error
QUESTION:
Has anyone seen this error before? An error occurred creating the configuration section handler for cachingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' o... | [
"caching-application-block"
] | 1 | 0 | 1,526 | 2 | 0 | 2008-10-09T17:37:55.287000 | 2011-01-13T14:17:03.330000 |
188,349 | 188,377 | Simple animation using C#/Windows Forms | I need to knock out a quick animation in C#/Windows Forms for a Halloween display. Just some 2D shapes moving about on a solid background. Since this is just a quick one-off project I really don't want to install and learn an entire new set of tools for this. (DirectX dev kits, Silverlight, Flash, etc..) I also have to... | Set off a timer at your desired frame rate. At each timer firing twiddle the internal representation of the shapes on the screen (your model) per the animation motion you want to achieve, then call Invalidate(true). Inside the OnPaint just draw the model on the screen. Oh yeah, and you probably want to turn Double Buff... | Simple animation using C#/Windows Forms I need to knock out a quick animation in C#/Windows Forms for a Halloween display. Just some 2D shapes moving about on a solid background. Since this is just a quick one-off project I really don't want to install and learn an entire new set of tools for this. (DirectX dev kits, S... | TITLE:
Simple animation using C#/Windows Forms
QUESTION:
I need to knock out a quick animation in C#/Windows Forms for a Halloween display. Just some 2D shapes moving about on a solid background. Since this is just a quick one-off project I really don't want to install and learn an entire new set of tools for this. (D... | [
"c#",
".net",
"winforms",
"animation"
] | 64 | 15 | 94,490 | 2 | 0 | 2008-10-09T17:39:11.463000 | 2008-10-09T17:44:54.977000 |
188,351 | 195,073 | DataGridView Mouse Selection | I am using a DataGridView control in a Windows Forms application. When a user holds down control to select multiple items, it works fine. Now when the user releases control and clicks (and holds down the left mouse button) to start a drag operation, the selection changes. How can I stop the selection from clearing when... | I found this answer in a Microsoft Forum "In order to drag and drop multiple rows, Set DataGridView.MultiSelect to true and in the DataGridView.DragDrop event, remove and insert all the rows in the DataGridView.SelectedRows collection." This blog entry also shows how to implement drag and drop on a DataGridView But it ... | DataGridView Mouse Selection I am using a DataGridView control in a Windows Forms application. When a user holds down control to select multiple items, it works fine. Now when the user releases control and clicks (and holds down the left mouse button) to start a drag operation, the selection changes. How can I stop the... | TITLE:
DataGridView Mouse Selection
QUESTION:
I am using a DataGridView control in a Windows Forms application. When a user holds down control to select multiple items, it works fine. Now when the user releases control and clicks (and holds down the left mouse button) to start a drag operation, the selection changes. ... | [
".net",
"winforms",
"datagridview"
] | 4 | 3 | 6,663 | 3 | 0 | 2008-10-09T17:39:25.377000 | 2008-10-12T03:58:02.760000 |
188,364 | 188,581 | Best practices for creating various language-packs on a site? PHP | I've created a language pack for a site before, but I'm not sure if what I'm doing is the best method. Basically, all I have is a file with variables defining string constants. Usually a set of arrays where an array usually refers to a particular elements of the site. Then the site code just includes the appropriate fi... | I suggest using Zend_Translate. It is somewhat a combination of the other suggestions people left here, only more maintainable and better designed. You can switch adapters depending on your preference (supports gettext, csv and a multitude of others), you don't need defines or globals polluting your global scope and it... | Best practices for creating various language-packs on a site? PHP I've created a language pack for a site before, but I'm not sure if what I'm doing is the best method. Basically, all I have is a file with variables defining string constants. Usually a set of arrays where an array usually refers to a particular element... | TITLE:
Best practices for creating various language-packs on a site? PHP
QUESTION:
I've created a language pack for a site before, but I'm not sure if what I'm doing is the best method. Basically, all I have is a file with variables defining string constants. Usually a set of arrays where an array usually refers to a ... | [
"php",
"language-agnostic",
"language-packs"
] | 1 | 1 | 1,241 | 3 | 0 | 2008-10-09T17:41:49.757000 | 2008-10-09T18:31:02.903000 |
188,373 | 790,445 | Custom error pages in Reporting Services 2008 | I'd like to re-brand (and send error emails) for all of the SSRS default error pages (picture below) when you access reports via /ReportServer/. I'm already handling the ASP OnError event and some of the default SSRS errors appear to catch their own exceptions and then render this page cancel the response all before th... | Unfortunately, you can't when using the visual aspects of SSRS. You can if you consume the reports directly via SOAP and the web service. | Custom error pages in Reporting Services 2008 I'd like to re-brand (and send error emails) for all of the SSRS default error pages (picture below) when you access reports via /ReportServer/. I'm already handling the ASP OnError event and some of the default SSRS errors appear to catch their own exceptions and then rend... | TITLE:
Custom error pages in Reporting Services 2008
QUESTION:
I'd like to re-brand (and send error emails) for all of the SSRS default error pages (picture below) when you access reports via /ReportServer/. I'm already handling the ASP OnError event and some of the default SSRS errors appear to catch their own except... | [
"reporting-services",
"error-handling"
] | 3 | 1 | 7,873 | 3 | 0 | 2008-10-09T17:43:49.737000 | 2009-04-26T07:49:55.547000 |
188,389 | 188,430 | XML schema for elements with same name but different sub-structure depending on context | I try to define a schema for XML documents I receive. The documents look like: I tried XmlSpy and xsd.exe from.NET 2.0. Both created schema definitions which allow below any number of and elements. But what I'm looking for should restrict below to elements, and below to elements. Is this something xml schema is not cap... | Yes, XSD can handle this. I generated this schema from Visual Studio 2008 (much faster than doing it by hand) and it will do what you're looking for: | XML schema for elements with same name but different sub-structure depending on context I try to define a schema for XML documents I receive. The documents look like: I tried XmlSpy and xsd.exe from.NET 2.0. Both created schema definitions which allow below any number of and elements. But what I'm looking for should re... | TITLE:
XML schema for elements with same name but different sub-structure depending on context
QUESTION:
I try to define a schema for XML documents I receive. The documents look like: I tried XmlSpy and xsd.exe from.NET 2.0. Both created schema definitions which allow below any number of and elements. But what I'm loo... | [
"xsd"
] | 6 | 2 | 16,980 | 2 | 0 | 2008-10-09T17:48:30.133000 | 2008-10-09T18:03:01.213000 |
188,392 | 211,132 | How to connect my Spring + Hibernate based application backend with pure HTML and AJAX based client? | I'd like to call methods of my DAOs by AJAX. I'm quite new in that so I would like to ask what is the best way to do that. Is it possible to publish my beans as web services and call them with e.g. jQuery? I think it is not possible:) I've also read about Direct Web Remoting but I don't know which way to go... As I see... | Rather than exposing your DAO beans directly, you should create some Spring MVC controller beans, and call those from the client-side (using AJAX). Ideally, the controllers should not call the DAOs directly, but should instead call service beans (and the service beans should call the DAOs). One advantage of this approa... | How to connect my Spring + Hibernate based application backend with pure HTML and AJAX based client? I'd like to call methods of my DAOs by AJAX. I'm quite new in that so I would like to ask what is the best way to do that. Is it possible to publish my beans as web services and call them with e.g. jQuery? I think it is... | TITLE:
How to connect my Spring + Hibernate based application backend with pure HTML and AJAX based client?
QUESTION:
I'd like to call methods of my DAOs by AJAX. I'm quite new in that so I would like to ask what is the best way to do that. Is it possible to publish my beans as web services and call them with e.g. jQu... | [
"ajax",
"web-services",
"hibernate",
"spring"
] | 2 | 2 | 1,478 | 2 | 0 | 2008-10-09T17:49:04.173000 | 2008-10-17T05:05:02.343000 |
188,393 | 188,557 | Prevent views stealing focus/setting focus to a view | I have an MFC sdi app that uses a splitter window to contain a tree control alongside the main view showing the data. When the user selects something in the tree, that view keeps focus until the user deliberately clicks in the main data window. This means that any toolbar buttons associated with the main view are disab... | You don't want to bring the focus back to the other view as soon as someone clicks the tree: It would make your app unusable. e.g. It would prevent users from navigating through the tree using the keyboard since the tree would never keep the focus long enough. I you really want the toolbar to keep reflecting the state ... | Prevent views stealing focus/setting focus to a view I have an MFC sdi app that uses a splitter window to contain a tree control alongside the main view showing the data. When the user selects something in the tree, that view keeps focus until the user deliberately clicks in the main data window. This means that any to... | TITLE:
Prevent views stealing focus/setting focus to a view
QUESTION:
I have an MFC sdi app that uses a splitter window to contain a tree control alongside the main view showing the data. When the user selects something in the tree, that view keeps focus until the user deliberately clicks in the main data window. This... | [
"c++",
"windows",
"mfc"
] | 0 | 2 | 1,846 | 1 | 0 | 2008-10-09T17:49:14.577000 | 2008-10-09T18:26:38.467000 |
188,400 | 231,652 | How do I add an extra source directory that will be used by the maven-jxr-plugin? | I'm using the build-helper-maven-plugin to add it to my build, but I'd like to see the XREF source for this extra source directory as well. FYI: maven-jxr-plugin - The JXR plugin produces a cross-reference of the project's sources. The generated reports make it easier for the user to reference or find specific lines of... | The problem I was having was related to the order of the plugins in the pom.xml. When I moved the jxr plugin to the top of the plugin list everything started working. Crazy stuff. | How do I add an extra source directory that will be used by the maven-jxr-plugin? I'm using the build-helper-maven-plugin to add it to my build, but I'd like to see the XREF source for this extra source directory as well. FYI: maven-jxr-plugin - The JXR plugin produces a cross-reference of the project's sources. The ge... | TITLE:
How do I add an extra source directory that will be used by the maven-jxr-plugin?
QUESTION:
I'm using the build-helper-maven-plugin to add it to my build, but I'd like to see the XREF source for this extra source directory as well. FYI: maven-jxr-plugin - The JXR plugin produces a cross-reference of the project... | [
"java",
"maven-2",
"maven-plugin"
] | 0 | 0 | 1,316 | 2 | 0 | 2008-10-09T17:51:47.210000 | 2008-10-23T21:46:02.567000 |
188,408 | 188,416 | What is the best control to use to display items from a database? | I'm writing a website that will sell items from one of my classes. It will be linked to a SQL Server db where I will pull pricing, item name, quantity and description. If I wanted to display the items from the database in a thinkgeek fashion, what would be the best control to use so I can custimize the display to actua... | You'll get the best flexibility with an asp:Repeater. This means you'll have to program more, but it will give you more flexibility. | What is the best control to use to display items from a database? I'm writing a website that will sell items from one of my classes. It will be linked to a SQL Server db where I will pull pricing, item name, quantity and description. If I wanted to display the items from the database in a thinkgeek fashion, what would ... | TITLE:
What is the best control to use to display items from a database?
QUESTION:
I'm writing a website that will sell items from one of my classes. It will be linked to a SQL Server db where I will pull pricing, item name, quantity and description. If I wanted to display the items from the database in a thinkgeek fa... | [
"c#",
"asp.net"
] | 2 | 6 | 276 | 4 | 0 | 2008-10-09T17:54:38.203000 | 2008-10-09T17:58:07.133000 |
188,414 | 188,445 | Best XML Parser for PHP | I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality. I recently saw SimpleXML but I haven't tried it yet. Is it any simpler? What advantages and disadvantages do both have? Any other parser... | I would have to say SimpleXML takes the cake because it is firstly an extension, written in C, and is very fast. But second, the parsed document takes the form of a PHP object. So you can "query" like $root->myElement. | Best XML Parser for PHP I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality. I recently saw SimpleXML but I haven't tried it yet. Is it any simpler? What advantages and disadvantages do bot... | TITLE:
Best XML Parser for PHP
QUESTION:
I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality. I recently saw SimpleXML but I haven't tried it yet. Is it any simpler? What advantages and di... | [
"php",
"xml",
"parsing",
"xml-parsing"
] | 152 | 110 | 201,568 | 6 | 0 | 2008-10-09T17:57:06.810000 | 2008-10-09T18:06:53.497000 |
188,417 | 526,861 | How to run included tests on deployed pylons application | I have installed pylons based application from egg, so it sits somewhere under /usr/lib/python2.5/site-packages. I see that the tests are packaged too and I would like to run them (to catch a problem that shows up on deployed application but not on development version). So how do I run them? Doing "nosetests" from dire... | Straight from the horse's mouth: Install nose: easy_install -W nose. Run nose: nosetests --with-pylons=test.ini OR python setup.py nosetests To run "python setup.py nosetests" you need to have a [nosetests] block in your setup.cfg looking like this: [nosetests] verbose=True verbosity=2 with-pylons=test.ini detailed-err... | How to run included tests on deployed pylons application I have installed pylons based application from egg, so it sits somewhere under /usr/lib/python2.5/site-packages. I see that the tests are packaged too and I would like to run them (to catch a problem that shows up on deployed application but not on development ve... | TITLE:
How to run included tests on deployed pylons application
QUESTION:
I have installed pylons based application from egg, so it sits somewhere under /usr/lib/python2.5/site-packages. I see that the tests are packaged too and I would like to run them (to catch a problem that shows up on deployed application but not... | [
"python",
"unit-testing",
"pylons",
"nose",
"paster"
] | 0 | 1 | 503 | 1 | 0 | 2008-10-09T17:58:56.307000 | 2009-02-09T01:22:31.467000 |
188,422 | 188,770 | ASP.NET multi language website? | How can I transform a website to be able to handle multi language (example: english, french, spanish)? I do not like the resource file because I feel limited and it's pretty long to build the list. Do you have any suggestion? Update For the moment the best way we found is to use an XML file and with some Xpath et get v... | Implicit localization (on the Visual Studio - Tools menu - Generate Local Resources) is about as easy as it can be. Write your pages in your default language, pick the menu option, and your resource files are created and can be sent to someone to translate. The resx file is just xml, so if the translation company wants... | ASP.NET multi language website? How can I transform a website to be able to handle multi language (example: english, french, spanish)? I do not like the resource file because I feel limited and it's pretty long to build the list. Do you have any suggestion? Update For the moment the best way we found is to use an XML f... | TITLE:
ASP.NET multi language website?
QUESTION:
How can I transform a website to be able to handle multi language (example: english, french, spanish)? I do not like the resource file because I feel limited and it's pretty long to build the list. Do you have any suggestion? Update For the moment the best way we found ... | [
"asp.net",
".net-2.0",
"multilingual"
] | 6 | 9 | 10,544 | 7 | 0 | 2008-10-09T18:00:17.863000 | 2008-10-09T19:18:00.390000 |
188,425 | 188,441 | Is there a simple algorithm that can determine if X is prime? | I have been trying to work my way through Project Euler, and have noticed a handful of problems ask for you to determine a prime number as part of it. I know I can just divide x by 2, 3, 4, 5,..., square root of X and if I get to the square root, I can (safely) assume that the number is prime. Unfortunately this soluti... | The first algorithm is quite good and used a lot on Project Euler. If you know the maximum number that you want you can also research Eratosthenes's sieve. If you maintain the list of primes you can also refine the first algo to divide only with primes until the square root of the number. With these two algoritms (divi... | Is there a simple algorithm that can determine if X is prime? I have been trying to work my way through Project Euler, and have noticed a handful of problems ask for you to determine a prime number as part of it. I know I can just divide x by 2, 3, 4, 5,..., square root of X and if I get to the square root, I can (safe... | TITLE:
Is there a simple algorithm that can determine if X is prime?
QUESTION:
I have been trying to work my way through Project Euler, and have noticed a handful of problems ask for you to determine a prime number as part of it. I know I can just divide x by 2, 3, 4, 5,..., square root of X and if I get to the square... | [
"algorithm",
"primes"
] | 29 | 28 | 16,743 | 16 | 0 | 2008-10-09T18:01:44.880000 | 2008-10-09T18:05:32.503000 |
188,444 | 188,620 | Reading/Writing MS Word files in Python | Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native.doc file. | I'd look into IronPython which intrinsically has access to windows/office APIs because it runs on.NET runtime. | Reading/Writing MS Word files in Python Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native.doc file. | TITLE:
Reading/Writing MS Word files in Python
QUESTION:
Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native.doc file.
ANSWER:
I'd look into IronPyth... | [
"python",
"ms-word",
"read-write"
] | 20 | 7 | 81,928 | 4 | 0 | 2008-10-09T18:06:51.750000 | 2008-10-09T18:39:55.380000 |
188,452 | 265,079 | Reading/Writing a MS Word file in PHP | Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object? I know that I can: $file = fopen('c:\file.doc', 'w+'); fwrite($file, $text); fclose(); but Word will read it as an HTML file not a native.doc file. | Reading binary Word documents would involve creating a parser according to the published file format specifications for the DOC format. I think this is no real feasible solution. You could use the Microsoft Office XML formats for reading and writing Word files - this is compatible with the 2003 and 2007 version of Word... | Reading/Writing a MS Word file in PHP Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object? I know that I can: $file = fopen('c:\file.doc', 'w+'); fwrite($file, $text); fclose(); but Word will read it as an HTML file not a native.doc file. | TITLE:
Reading/Writing a MS Word file in PHP
QUESTION:
Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object? I know that I can: $file = fopen('c:\file.doc', 'w+'); fwrite($file, $text); fclose(); but Word will read it as an HTML file not a native.doc file.
ANSWER:
Reading bina... | [
"php",
"ms-word",
"read-write"
] | 33 | 29 | 139,998 | 16 | 0 | 2008-10-09T18:09:15.740000 | 2008-11-05T13:04:35.333000 |
188,461 | 188,506 | Switch statement fall-through...should it be allowed? | For as long as I can remember I have avoided using switch statement fall-through. Actually, I can't remember it ever entering my consciousness as a possible way to do things as it was drilled into my head early on that it was nothing more than a bug in the switch statement. However, today I ran across some code that us... | It may depend on what you consider fallthrough. I'm ok with this sort of thing: switch (value) { case 0: result = ZERO_DIGIT; break;
case 1: case 3: case 5: case 7: case 9: result = ODD_DIGIT; break;
case 2: case 4: case 6: case 8: result = EVEN_DIGIT; break; } But if you have a case label followed by code that falls... | Switch statement fall-through...should it be allowed? For as long as I can remember I have avoided using switch statement fall-through. Actually, I can't remember it ever entering my consciousness as a possible way to do things as it was drilled into my head early on that it was nothing more than a bug in the switch st... | TITLE:
Switch statement fall-through...should it be allowed?
QUESTION:
For as long as I can remember I have avoided using switch statement fall-through. Actually, I can't remember it ever entering my consciousness as a possible way to do things as it was drilled into my head early on that it was nothing more than a bu... | [
"coding-style",
"switch-statement"
] | 177 | 128 | 235,241 | 12 | 0 | 2008-10-09T18:11:08.903000 | 2008-10-09T18:18:45.440000 |
188,462 | 188,472 | What are the maximum columns in an Access 2003 query? | What are the maximum allowed number of columns in a query in access 2003? | 255 I believe. You can check by going to Help > Specifications > Query within Access. | What are the maximum columns in an Access 2003 query? What are the maximum allowed number of columns in a query in access 2003? | TITLE:
What are the maximum columns in an Access 2003 query?
QUESTION:
What are the maximum allowed number of columns in a query in access 2003?
ANSWER:
255 I believe. You can check by going to Help > Specifications > Query within Access. | [
"ms-access"
] | 4 | 5 | 15,405 | 4 | 0 | 2008-10-09T18:11:15.360000 | 2008-10-09T18:13:56.527000 |
188,463 | 188,811 | Can I run LAMP and Rails from the same Apache instance? | We have a RedHat box with Apache2, PHP5 and MySQL 5 for much of our development. Now, we have a Rails client, and we need to set up a Rails app on the same server. Can we install Ruby and the Rails framework with the same Apache, or should we avoid this? Why or Why not? Is it possible to direct subdomains to either PHP... | Yes, you can configure your virtual hosts to Rails, PHP, or anything else with the proper configuration. The details depend largely on how you are connecting to Rails, but generally however you would configure a single purpose Apache server should work for the virtual hosts. | Can I run LAMP and Rails from the same Apache instance? We have a RedHat box with Apache2, PHP5 and MySQL 5 for much of our development. Now, we have a Rails client, and we need to set up a Rails app on the same server. Can we install Ruby and the Rails framework with the same Apache, or should we avoid this? Why or Wh... | TITLE:
Can I run LAMP and Rails from the same Apache instance?
QUESTION:
We have a RedHat box with Apache2, PHP5 and MySQL 5 for much of our development. Now, we have a Rails client, and we need to set up a Rails app on the same server. Can we install Ruby and the Rails framework with the same Apache, or should we avo... | [
"ruby-on-rails",
"apache",
"apache2",
"lamp"
] | 6 | 3 | 2,497 | 2 | 0 | 2008-10-09T18:11:21.663000 | 2008-10-09T19:27:35.690000 |
188,476 | 188,483 | Comparing Two Strings producing a numeric delta | Does anyone know of a simple way to compare two strings together to generate the "amount of difference" between the two? (in a numeric value) I have been crawling google with little luck on this. And after doing some coding it's not as simple as I had thought. Any clues? | Are you talking about the "Edit Distance"? Do a search on "Levenshtein Distance", on SO or Google. I use the version posted on Stephen Toub's blog | Comparing Two Strings producing a numeric delta Does anyone know of a simple way to compare two strings together to generate the "amount of difference" between the two? (in a numeric value) I have been crawling google with little luck on this. And after doing some coding it's not as simple as I had thought. Any clues? | TITLE:
Comparing Two Strings producing a numeric delta
QUESTION:
Does anyone know of a simple way to compare two strings together to generate the "amount of difference" between the two? (in a numeric value) I have been crawling google with little luck on this. And after doing some coding it's not as simple as I had th... | [
"string",
"comparison"
] | 4 | 5 | 1,333 | 4 | 0 | 2008-10-09T18:14:24.123000 | 2008-10-09T18:16:10.250000 |
188,488 | 906,559 | In Emacs how to switch to other buffer? | The problem is following: I want to automate the way my emacs starts. It has to be split in two buffers and the slime-repl has to be started in the smallest (bottom) buffer. Plus, I want my file to be opened in the bigger (upper) buffer. In my.emacs there are lines: (slime)... (split-window-vertically -6) (switch-to-bu... | Instead of switch-to-buffer, use function pop-to-buffer. (pop-to-buffer BUFFER-OR-NAME &optional OTHER-WINDOW NORECORD) Select buffer BUFFER-OR-NAME in some window, preferably a different one. | In Emacs how to switch to other buffer? The problem is following: I want to automate the way my emacs starts. It has to be split in two buffers and the slime-repl has to be started in the smallest (bottom) buffer. Plus, I want my file to be opened in the bigger (upper) buffer. In my.emacs there are lines: (slime)... (s... | TITLE:
In Emacs how to switch to other buffer?
QUESTION:
The problem is following: I want to automate the way my emacs starts. It has to be split in two buffers and the slime-repl has to be started in the smallest (bottom) buffer. Plus, I want my file to be opened in the bigger (upper) buffer. In my.emacs there are li... | [
"emacs",
"dot-emacs"
] | 1 | 1 | 2,038 | 4 | 0 | 2008-10-09T18:16:37.160000 | 2009-05-25T12:32:55.083000 |
188,489 | 190,418 | group collaboration open source php app | I am on a committee that would benefit from an online application that allows the members to collaborate w/ members. I would want the ability to post messages and upload documents. Is there any free, easy to install on your server apps that you would suggest? | If you really want something similar to BaseCamp, you should try out ProjectPier. If you think you'll need more community features than a project management tool can offer, I would suggest jumping into Drupal. | group collaboration open source php app I am on a committee that would benefit from an online application that allows the members to collaborate w/ members. I would want the ability to post messages and upload documents. Is there any free, easy to install on your server apps that you would suggest? | TITLE:
group collaboration open source php app
QUESTION:
I am on a committee that would benefit from an online application that allows the members to collaborate w/ members. I would want the ability to post messages and upload documents. Is there any free, easy to install on your server apps that you would suggest?
A... | [
"php",
"collaboration"
] | 0 | 1 | 2,140 | 2 | 0 | 2008-10-09T18:16:54.320000 | 2008-10-10T07:30:48.477000 |
188,491 | 188,541 | Prevent programmers from knowing passwords used at runtime | My application connects to an FTP server with a username and password. I can create an encryption routine to encrypt and decrypt the password, but anybody with access to the source code and the encrypted password can decrypt the password. Is there an easy way to prevent every human being from knowing the entire passwor... | No. All an app user has to do is sniff their own network traffic (easy to do with Wireshark or such). You really need a way to give each user a unique token of some sort. Edit - more info: Any system that relies on "secret" login information that is the same for every copy of the application is flawed by design. In ord... | Prevent programmers from knowing passwords used at runtime My application connects to an FTP server with a username and password. I can create an encryption routine to encrypt and decrypt the password, but anybody with access to the source code and the encrypted password can decrypt the password. Is there an easy way t... | TITLE:
Prevent programmers from knowing passwords used at runtime
QUESTION:
My application connects to an FTP server with a username and password. I can create an encryption routine to encrypt and decrypt the password, but anybody with access to the source code and the encrypted password can decrypt the password. Is t... | [
"security",
"passwords"
] | 11 | 16 | 1,475 | 15 | 0 | 2008-10-09T18:17:15.647000 | 2008-10-09T18:24:13.383000 |
188,503 | 188,526 | Detecting the number of processors | How do you detect the number of physical processors/cores in.net? | System.Environment.ProcessorCount returns the number of logical processors http://msdn.microsoft.com/en-us/library/system.environment.processorcount.aspx For physical processor count you'd probably need to use WMI - the following metadata is supported in XP/Win2k3 upwards (Functionality enabled in SP's prior to Vista/W... | Detecting the number of processors How do you detect the number of physical processors/cores in.net? | TITLE:
Detecting the number of processors
QUESTION:
How do you detect the number of physical processors/cores in.net?
ANSWER:
System.Environment.ProcessorCount returns the number of logical processors http://msdn.microsoft.com/en-us/library/system.environment.processorcount.aspx For physical processor count you'd pro... | [
".net",
"wmi",
"cpu",
"environment"
] | 28 | 30 | 23,240 | 8 | 0 | 2008-10-09T18:18:24.427000 | 2008-10-09T18:22:14.340000 |
188,509 | 188,632 | How do I track down obsolete build configurations in VS 2008? | I have a large solution containing many C# projects. When I open the solution and hit F5 for the first time, I get compile errors like the following: Error 3 Metadata file 'C:\Users\david\Documents\VS.Projects\CeoTrunk\Ceoimage\bin\x86\Release\Ceoimage.dll' could not be found. I'm compiling the solution and the project... | Without seeing your solution and project files, here is what I suggest. Clean out ALL obj and bin directories (preferrably, delete your source and get a fresh copy). Try a full build and see if it still fails. If it does... Repeat step 1. Check your references for each project and make sure they reference other project... | How do I track down obsolete build configurations in VS 2008? I have a large solution containing many C# projects. When I open the solution and hit F5 for the first time, I get compile errors like the following: Error 3 Metadata file 'C:\Users\david\Documents\VS.Projects\CeoTrunk\Ceoimage\bin\x86\Release\Ceoimage.dll' ... | TITLE:
How do I track down obsolete build configurations in VS 2008?
QUESTION:
I have a large solution containing many C# projects. When I open the solution and hit F5 for the first time, I get compile errors like the following: Error 3 Metadata file 'C:\Users\david\Documents\VS.Projects\CeoTrunk\Ceoimage\bin\x86\Rele... | [
"visual-studio-2008",
"configuration",
"build",
"x86",
"release"
] | 1 | 2 | 217 | 1 | 0 | 2008-10-09T18:19:11.617000 | 2008-10-09T18:43:12.677000 |
188,518 | 188,582 | How to import data from Excel 2007 xlsx file into SQL Server 2000 Database? | SQL Server 2000 doesn't seem to support the xml based.xlsx file types. Besides converting the file to a 97-2003 file type, how else can I achieve this? | If you have Excel 2007, you might also have Access 2007. You can create an Access 2007 Access Data Project (.adp) file. Connect this to your SQL 2000 database. Then use the Access 2007 import table function to get the Excel 2007 data. | How to import data from Excel 2007 xlsx file into SQL Server 2000 Database? SQL Server 2000 doesn't seem to support the xml based.xlsx file types. Besides converting the file to a 97-2003 file type, how else can I achieve this? | TITLE:
How to import data from Excel 2007 xlsx file into SQL Server 2000 Database?
QUESTION:
SQL Server 2000 doesn't seem to support the xml based.xlsx file types. Besides converting the file to a 97-2003 file type, how else can I achieve this?
ANSWER:
If you have Excel 2007, you might also have Access 2007. You can ... | [
"sql-server",
"windows",
"sql-server-2000",
"excel-2007"
] | 1 | 0 | 7,203 | 2 | 0 | 2008-10-09T18:20:26.980000 | 2008-10-09T18:31:17.363000 |
188,532 | 188,559 | How do I enforce function signatures on a set of function declarations in C? | I want to make sure that a set of functions have the same signature in some C code. Ideally I would be able to define a new type that described the return value and arguments of a function and then declare my set of functions using this new type. Additionally, is there a way to specify default values for the arguments ... | /* define a typedef for function_t - functions that return void */ /* and take an int and char parameter */
typedef void function_t( int param1, char param2);
/* declare some functions that use that signature */
function_t foo; function_t bar; Now when you define the functions there will be an error if they do not u... | How do I enforce function signatures on a set of function declarations in C? I want to make sure that a set of functions have the same signature in some C code. Ideally I would be able to define a new type that described the return value and arguments of a function and then declare my set of functions using this new ty... | TITLE:
How do I enforce function signatures on a set of function declarations in C?
QUESTION:
I want to make sure that a set of functions have the same signature in some C code. Ideally I would be able to define a new type that described the return value and arguments of a function and then declare my set of functions... | [
"c"
] | 4 | 13 | 1,189 | 5 | 0 | 2008-10-09T18:22:52.153000 | 2008-10-09T18:26:53.223000 |
188,569 | 188,614 | Login.aspx always wants to be my home page! | Just starting out in asp.net. Have just created a login.aspx page in my site and stuck on a asp login control - that's all I did. Now my Welcome.aspx page won't show as the start page of my site when I debug - even though it is set as this. Plus I have even edited my web.config - (see below) - and it still does the sam... | If you want users to access welcome.aspx without being authenticated, put welcome.aspx in a separate folder, and set up a new web.config in that sub folder. fill out the authorization section in that web.config so that the files in that folder and subfolders will be accessible by anonymous users, like this: | Login.aspx always wants to be my home page! Just starting out in asp.net. Have just created a login.aspx page in my site and stuck on a asp login control - that's all I did. Now my Welcome.aspx page won't show as the start page of my site when I debug - even though it is set as this. Plus I have even edited my web.conf... | TITLE:
Login.aspx always wants to be my home page!
QUESTION:
Just starting out in asp.net. Have just created a login.aspx page in my site and stuck on a asp login control - that's all I did. Now my Welcome.aspx page won't show as the start page of my site when I debug - even though it is set as this. Plus I have even ... | [
"asp.net",
"forms-authentication"
] | 2 | 3 | 1,195 | 5 | 0 | 2008-10-09T18:29:07.930000 | 2008-10-09T18:39:04.853000 |
188,584 | 188,605 | ASP.NET : Check for click event in page_load | In c#, how can I check to see if a link button has been clicked in the page load method? I need to know if it was clicked before the click event is fired. | if( IsPostBack ) { // get the target of the post-back, will be the name of the control // that issued the post-back string eTarget = Request.Params["__EVENTTARGET"].ToString(); } | ASP.NET : Check for click event in page_load In c#, how can I check to see if a link button has been clicked in the page load method? I need to know if it was clicked before the click event is fired. | TITLE:
ASP.NET : Check for click event in page_load
QUESTION:
In c#, how can I check to see if a link button has been clicked in the page load method? I need to know if it was clicked before the click event is fired.
ANSWER:
if( IsPostBack ) { // get the target of the post-back, will be the name of the control // tha... | [
"c#",
"asp.net",
".net",
"pageload"
] | 16 | 26 | 31,211 | 6 | 0 | 2008-10-09T18:31:29.843000 | 2008-10-09T18:35:52.300000 |
188,591 | 266,785 | Is there a fix or a workaround for the memory leak in getpwnam? | Is there a fix or a workaround for the memory leak in getpwnam? | getpwnam() does not suffer of memory leak. Subsequent calls, indeed, will overwrite its static internal buffer. Such kind of functions are instead non-reentrant and therefore non-thread safe. Paul suggested the use of getpwnam_r() which is the reentrant version, that is safe to be used in a multithread context. That sa... | Is there a fix or a workaround for the memory leak in getpwnam? Is there a fix or a workaround for the memory leak in getpwnam? | TITLE:
Is there a fix or a workaround for the memory leak in getpwnam?
QUESTION:
Is there a fix or a workaround for the memory leak in getpwnam?
ANSWER:
getpwnam() does not suffer of memory leak. Subsequent calls, indeed, will overwrite its static internal buffer. Such kind of functions are instead non-reentrant and ... | [
"c++",
"linux"
] | 1 | 8 | 1,747 | 4 | 0 | 2008-10-09T18:32:50.997000 | 2008-11-05T21:32:32.843000 |
188,606 | 188,845 | How to make junit testing to stop after first failing test | Is there a way to make running junit test to stop after a test fails? | Yes... this ability (or the lack of it) is built into the various TestRunners (Console, AWT, Swing, Ant, Maven or the one built into Eclipse, etc). You'll have to look for this control in the documentation for the specific platform you're using. | How to make junit testing to stop after first failing test Is there a way to make running junit test to stop after a test fails? | TITLE:
How to make junit testing to stop after first failing test
QUESTION:
Is there a way to make running junit test to stop after a test fails?
ANSWER:
Yes... this ability (or the lack of it) is built into the various TestRunners (Console, AWT, Swing, Ant, Maven or the one built into Eclipse, etc). You'll have to l... | [
"java",
"testing",
"tdd",
"junit"
] | 6 | 3 | 5,328 | 2 | 0 | 2008-10-09T18:35:54.750000 | 2008-10-09T19:35:16.017000 |
188,621 | 188,772 | Accessing Controls on page loaded in IFrame in MS CRM 4.0 using Javascript | I have a custom aspx page loaded in a IFrame in one of the modules in MS CRM 4.0. This page basically has 6 textboxes (txtValue1, txtValue2 and so on..) with values in it. I want to access these values through javascript code either on the load event or save event. Does anybody know how to do it? I tried couple of code... | Try the following snippet... var textBox1Value = document.frames.IFRAME_NAME.document.all.txtValue1.value; where IFRAME_NAME is the name of the IFRAME you define in the form customizations and txtValue1 is the id of the textbox on the IFRAME. | Accessing Controls on page loaded in IFrame in MS CRM 4.0 using Javascript I have a custom aspx page loaded in a IFrame in one of the modules in MS CRM 4.0. This page basically has 6 textboxes (txtValue1, txtValue2 and so on..) with values in it. I want to access these values through javascript code either on the load ... | TITLE:
Accessing Controls on page loaded in IFrame in MS CRM 4.0 using Javascript
QUESTION:
I have a custom aspx page loaded in a IFrame in one of the modules in MS CRM 4.0. This page basically has 6 textboxes (txtValue1, txtValue2 and so on..) with values in it. I want to access these values through javascript code e... | [
"javascript",
"asp.net",
"iframe",
"dynamics-crm",
"dynamics-crm-4"
] | 2 | 2 | 6,241 | 2 | 0 | 2008-10-09T18:39:55.957000 | 2008-10-09T19:18:31.980000 |
188,625 | 188,630 | What interface or method should my class implement to print what I want in Console.WriteLine? | I have an object of class F. I want to output the contents of the object using Console.WriteLine for quick and dirty status updates like this: Console.WriteLine(objectF); This prints out only the name of the class to the console: F I want to overload this somehow so that I can instead print out some useful information ... | Console.WriteLine(objectF) Should work, if you overloaded ToString. When the framework needs to convert an object to a string representation, it invokes ToString. public override string ToString() { // replace the line below with your code return base.ToString(); } | What interface or method should my class implement to print what I want in Console.WriteLine? I have an object of class F. I want to output the contents of the object using Console.WriteLine for quick and dirty status updates like this: Console.WriteLine(objectF); This prints out only the name of the class to the conso... | TITLE:
What interface or method should my class implement to print what I want in Console.WriteLine?
QUESTION:
I have an object of class F. I want to output the contents of the object using Console.WriteLine for quick and dirty status updates like this: Console.WriteLine(objectF); This prints out only the name of the ... | [
"c#",
".net",
"console-application",
"console.writeline"
] | 1 | 6 | 1,545 | 4 | 0 | 2008-10-09T18:40:48.890000 | 2008-10-09T18:42:35.563000 |
188,628 | 188,648 | System.IO.Directory.Exists is giving an intermittent false negative | I’m getting an intermittent false negative on the following line of code in an ASP.NET 2 web site: if (!System.IO.Directory.Exists(folder)) The folder clearly exists, and even contains a log file that is written to when the CLR doesn’t lie about the folder’s existence. Any help would be appreciated. | Exists() returns false, rather than throwing an error, if any sort of IO error occurs. One thing to watch out for is security errors. Exists does not perform network authentication, so it requires being pre-authenticated if your accessing a network share, at least according to the docs. I haven't tried it myself. | System.IO.Directory.Exists is giving an intermittent false negative I’m getting an intermittent false negative on the following line of code in an ASP.NET 2 web site: if (!System.IO.Directory.Exists(folder)) The folder clearly exists, and even contains a log file that is written to when the CLR doesn’t lie about the fo... | TITLE:
System.IO.Directory.Exists is giving an intermittent false negative
QUESTION:
I’m getting an intermittent false negative on the following line of code in an ASP.NET 2 web site: if (!System.IO.Directory.Exists(folder)) The folder clearly exists, and even contains a log file that is written to when the CLR doesn’... | [
".net",
"asp.net"
] | 1 | 5 | 1,178 | 3 | 0 | 2008-10-09T18:41:48.043000 | 2008-10-09T18:48:18.937000 |
188,636 | 188,836 | How to force restart a Windows box using VBScript? | I'm trying to find a way to force Windows to reboot, and I am running into issues. I've tried Set OpSysSet = GetObject("winmgmts:{authenticationlevel=Pkt," _ & "(Shutdown)}").ExecQuery("select * from Win32_OperatingSystem where "_ & "Primary=true") for each OpSys in OpSysSet retVal = OpSys.Reboot() next I've also tried... | Try replacing: retVal = OpSys.Reboot() With: retVal = OpSys.Win32Shutdown(6) | How to force restart a Windows box using VBScript? I'm trying to find a way to force Windows to reboot, and I am running into issues. I've tried Set OpSysSet = GetObject("winmgmts:{authenticationlevel=Pkt," _ & "(Shutdown)}").ExecQuery("select * from Win32_OperatingSystem where "_ & "Primary=true") for each OpSys in Op... | TITLE:
How to force restart a Windows box using VBScript?
QUESTION:
I'm trying to find a way to force Windows to reboot, and I am running into issues. I've tried Set OpSysSet = GetObject("winmgmts:{authenticationlevel=Pkt," _ & "(Shutdown)}").ExecQuery("select * from Win32_OperatingSystem where "_ & "Primary=true") fo... | [
"windows",
"vbscript",
"reboot"
] | 8 | 10 | 51,199 | 5 | 0 | 2008-10-09T18:43:58.900000 | 2008-10-09T19:32:47.070000 |
188,639 | 188,751 | Strip Windows DLL debug info? | I normally don't work on Windows development, and am completely unfamiliar with the toolchain and build system. My embedded product includes some Windows DLLs from a third party in its filesystem (which are used by a Windows machine which mounts the filesystem). I have a problem: the most recent release of these DLLs h... | You'll want to get the release versions from the developers, even if it's a pain, because debug versions are by default compiled with code optimization disabled. So even if you somehow stripped out the debug information you would be left with code that's not as efficient as it could be. (Not to mention whatever debug t... | Strip Windows DLL debug info? I normally don't work on Windows development, and am completely unfamiliar with the toolchain and build system. My embedded product includes some Windows DLLs from a third party in its filesystem (which are used by a Windows machine which mounts the filesystem). I have a problem: the most ... | TITLE:
Strip Windows DLL debug info?
QUESTION:
I normally don't work on Windows development, and am completely unfamiliar with the toolchain and build system. My embedded product includes some Windows DLLs from a third party in its filesystem (which are used by a Windows machine which mounts the filesystem). I have a ... | [
"windows",
"dll"
] | 8 | 3 | 10,550 | 5 | 0 | 2008-10-09T18:44:27.617000 | 2008-10-09T19:13:51.130000 |
188,647 | 220,106 | What would you pick for your ASP.NET webapp; nHibernate, Linq, or SubSonic | Something else perhaps? I am already using nHibernate, but I get occasional issues where a lazy initialized proxy object won't actually initialize. I'm thinking of trying something else. The site has user accounts, user posts and photos, and filtering of those to certain location names and title/description matches. No... | I love SubSonic as it is quite easy to configure and generate a DAL. The implementation is not a full fledged ORM, as it only create a class per table. Being able to use stored procedures compensates for when you need to compose objects that are the results of joins. Again, SubSonic is intended to be functional, so it ... | What would you pick for your ASP.NET webapp; nHibernate, Linq, or SubSonic Something else perhaps? I am already using nHibernate, but I get occasional issues where a lazy initialized proxy object won't actually initialize. I'm thinking of trying something else. The site has user accounts, user posts and photos, and fil... | TITLE:
What would you pick for your ASP.NET webapp; nHibernate, Linq, or SubSonic
QUESTION:
Something else perhaps? I am already using nHibernate, but I get occasional issues where a lazy initialized proxy object won't actually initialize. I'm thinking of trying something else. The site has user accounts, user posts a... | [
"orm"
] | 4 | 1 | 1,043 | 13 | 0 | 2008-10-09T18:48:18.593000 | 2008-10-20T21:59:27.130000 |
188,663 | 1,710,006 | JQuery JavaScript Design: Self Executing Function or Object Literal? | I'm curious as to if there are any best practices relating to JQuery when constructing encapsulated code blocks. Generally, when I construct a page I like to encapsulate the functions used within that page inside an object. This allows me some encapsulation when building applications. There's nothing I hate more than s... | Since I've been working with jQuery for a while now, I've decided on a standard pattern that works well for me. It's a combination of the YUI module pattern with a bit of jQuery plugin pattern mixed in.. We ended up using the self executing closure pattern. This is beneficial in a few ways: It keeps code to a minimum I... | JQuery JavaScript Design: Self Executing Function or Object Literal? I'm curious as to if there are any best practices relating to JQuery when constructing encapsulated code blocks. Generally, when I construct a page I like to encapsulate the functions used within that page inside an object. This allows me some encapsu... | TITLE:
JQuery JavaScript Design: Self Executing Function or Object Literal?
QUESTION:
I'm curious as to if there are any best practices relating to JQuery when constructing encapsulated code blocks. Generally, when I construct a page I like to encapsulate the functions used within that page inside an object. This allo... | [
"javascript",
"jquery"
] | 9 | 11 | 17,618 | 3 | 0 | 2008-10-09T18:53:05.277000 | 2009-11-10T18:09:23.213000 |
188,669 | 188,678 | Do you have any Ajax loading image ideas for use with jQuery? | I have a page being loaded with jQuery. The initial load includes 100 records with 6 icons per record. Needless to say, it takes a few seconds to load and I want to give the user a "loading" prompt/animation. Any ideas? | http://www.ajaxload.info/ is a great resource for generating animated GIFs for this sort of thing. Once you've got your animation, render it as part of the page; fire the jQuery load mechanism on the animation's onload() event (so you're certain the animation has loaded first), and use a callback at the end of your loa... | Do you have any Ajax loading image ideas for use with jQuery? I have a page being loaded with jQuery. The initial load includes 100 records with 6 icons per record. Needless to say, it takes a few seconds to load and I want to give the user a "loading" prompt/animation. Any ideas? | TITLE:
Do you have any Ajax loading image ideas for use with jQuery?
QUESTION:
I have a page being loaded with jQuery. The initial load includes 100 records with 6 icons per record. Needless to say, it takes a few seconds to load and I want to give the user a "loading" prompt/animation. Any ideas?
ANSWER:
http://www.... | [
"javascript",
"jquery",
"ajax"
] | 4 | 11 | 14,325 | 7 | 0 | 2008-10-09T18:54:23.637000 | 2008-10-09T18:57:58.557000 |
188,673 | 188,880 | Apache - mod_rewrite RewriteRule question | I have a few problems with my mod_rewrite rules. There a three different url pattern I want to handle. http://example.com/%module%/%view%-%args%.html http://example.com/%module%/%view%.html http://example.com/%module% The following mod_rewrite rules don't really work. Also I've the problem that the query (example: user... | For the query string, flag your rules with QSA (Query String Append). What you are trying to configure is called a "front controller", of which there are already quite a lot ready-made. Maybe you should have a look at some popular PHP frameworks and adopt one that suits you. | Apache - mod_rewrite RewriteRule question I have a few problems with my mod_rewrite rules. There a three different url pattern I want to handle. http://example.com/%module%/%view%-%args%.html http://example.com/%module%/%view%.html http://example.com/%module% The following mod_rewrite rules don't really work. Also I've... | TITLE:
Apache - mod_rewrite RewriteRule question
QUESTION:
I have a few problems with my mod_rewrite rules. There a three different url pattern I want to handle. http://example.com/%module%/%view%-%args%.html http://example.com/%module%/%view%.html http://example.com/%module% The following mod_rewrite rules don't real... | [
"regex",
"apache",
"mod-rewrite"
] | 0 | 3 | 207 | 1 | 0 | 2008-10-09T18:56:16.783000 | 2008-10-09T19:43:04.053000 |
188,679 | 188,697 | Are there any style guides for HTML? | I have found that my HTML is, to be honest, very clunky. Small, simple pages are OK. But there comes a point when between indenting and the kinds of tags I have, it's impossible to keep lines short. Is there a W3C (or otherwise "official" or well accepted) formatting guide for clean, maintainable HTML? If not, what sug... | My advice is to not even worry about it. HTML and XML, unlike most languages, are almost trivial to re-indent to any style the programmer wants. In HTML I use width-2 tabs, and regularly have sections that run off the edge of the editor window. There's not really any way to avoid that unless you just skip indenting sec... | Are there any style guides for HTML? I have found that my HTML is, to be honest, very clunky. Small, simple pages are OK. But there comes a point when between indenting and the kinds of tags I have, it's impossible to keep lines short. Is there a W3C (or otherwise "official" or well accepted) formatting guide for clean... | TITLE:
Are there any style guides for HTML?
QUESTION:
I have found that my HTML is, to be honest, very clunky. Small, simple pages are OK. But there comes a point when between indenting and the kinds of tags I have, it's impossible to keep lines short. Is there a W3C (or otherwise "official" or well accepted) formatti... | [
"html",
"xhtml",
"coding-style"
] | 1 | 2 | 362 | 5 | 0 | 2008-10-09T18:58:04.173000 | 2008-10-09T19:02:00.687000 |
188,688 | 188,715 | What does the tilde before a function name mean in C#? | I am looking at some code and it has this statement: ~ConnectionManager() { Dispose(false); } The class implements the IDisposable interface, but I do not know if that is part of that the tilde(~) is used for. | ~ is the destructor Destructors are invoked automatically, and cannot be invoked explicitly. Destructors cannot be overloaded. Thus, a class can have, at most, one destructor. Destructors are not inherited. Thus, a class has no destructors other than the one, which may be declared in it. Destructors cannot be used with... | What does the tilde before a function name mean in C#? I am looking at some code and it has this statement: ~ConnectionManager() { Dispose(false); } The class implements the IDisposable interface, but I do not know if that is part of that the tilde(~) is used for. | TITLE:
What does the tilde before a function name mean in C#?
QUESTION:
I am looking at some code and it has this statement: ~ConnectionManager() { Dispose(false); } The class implements the IDisposable interface, but I do not know if that is part of that the tilde(~) is used for.
ANSWER:
~ is the destructor Destruct... | [
"c#",
"syntax",
"tilde"
] | 189 | 237 | 57,335 | 6 | 0 | 2008-10-09T19:00:38.723000 | 2008-10-09T19:05:46.577000 |
188,691 | 188,708 | How do I write my own confirm dialog in javascript? | I want to write something that acts just like confirm() in javascript, but I want to write it myself so I can skin the dialog box. In having trouble thinking through how I would basically force the javascript thread to wait until the user responds and then return true or false. | If I were you, I would look at one of the popular javascript libraries. Most contain some sort of modal dialog. A couple I found for JQuery are jqModal and SimpleModal. When you build the modal dialog, you will have to tie events to the buttons, so you would do something like: function askUserYesOrNo() { var myDialog =... | How do I write my own confirm dialog in javascript? I want to write something that acts just like confirm() in javascript, but I want to write it myself so I can skin the dialog box. In having trouble thinking through how I would basically force the javascript thread to wait until the user responds and then return true... | TITLE:
How do I write my own confirm dialog in javascript?
QUESTION:
I want to write something that acts just like confirm() in javascript, but I want to write it myself so I can skin the dialog box. In having trouble thinking through how I would basically force the javascript thread to wait until the user responds an... | [
"javascript",
"modal-dialog"
] | 3 | 5 | 12,364 | 5 | 0 | 2008-10-09T19:00:57.243000 | 2008-10-09T19:03:34.350000 |
188,692 | 188,723 | Why use EventArgs.Empty instead of null? | I recall reading, on multiple occasions and in multiple locations, that when firing the typical event: protected virtual OnSomethingHappened() { this.SomethingHappened(this, EventArgs.Empty); } e should be EventArgs.Empty if there are no interesting event args, not null. I've followed the guidance in my code, but I rea... | I believe the reasoning behind the NOT NULL is that when passed as a parameter, it is not expected for the method to need to potentially handle a null reference exception. If you pass null, and the method tries to do something with e it will get a null reference exception, with EventArgs.Empty it will not. | Why use EventArgs.Empty instead of null? I recall reading, on multiple occasions and in multiple locations, that when firing the typical event: protected virtual OnSomethingHappened() { this.SomethingHappened(this, EventArgs.Empty); } e should be EventArgs.Empty if there are no interesting event args, not null. I've fo... | TITLE:
Why use EventArgs.Empty instead of null?
QUESTION:
I recall reading, on multiple occasions and in multiple locations, that when firing the typical event: protected virtual OnSomethingHappened() { this.SomethingHappened(this, EventArgs.Empty); } e should be EventArgs.Empty if there are no interesting event args,... | [
"c#",
"events",
"eventargs"
] | 73 | 38 | 17,644 | 6 | 0 | 2008-10-09T19:01:04.807000 | 2008-10-09T19:07:58.757000 |
188,693 | 188,882 | Is the destructor called if the constructor throws an exception? | Looking for an answer for C# and C++. (in C#, replace 'destructor' with 'finalizer') | Preamble: Herb Sutter has a great article on the subject: http://herbsutter.wordpress.com/2008/07/25/constructor-exceptions-in-c-c-and-java/ C++: Yes and No While an object destructor won't be called if its constructor throws (the object "never existed"), the destructors of its internal objects could be called. As a su... | Is the destructor called if the constructor throws an exception? Looking for an answer for C# and C++. (in C#, replace 'destructor' with 'finalizer') | TITLE:
Is the destructor called if the constructor throws an exception?
QUESTION:
Looking for an answer for C# and C++. (in C#, replace 'destructor' with 'finalizer')
ANSWER:
Preamble: Herb Sutter has a great article on the subject: http://herbsutter.wordpress.com/2008/07/25/constructor-exceptions-in-c-c-and-java/ C+... | [
"c#",
"c++",
"destructor",
"finalizer"
] | 52 | 56 | 13,919 | 8 | 0 | 2008-10-09T19:01:05.527000 | 2008-10-09T19:43:40.573000 |
188,720 | 188,756 | Any way to transfer value from one cell to another? | Is there any way in the SQL language or in MySQL (or other DBMA) to transfer a value from one cell to another? For example, say there is a table called user_cars with the following structure: |id| |user_name| |num_cars| Bob has 5 cars, and John has 3 cars. Is there any way to in one query subtract 2 cars from Bob and a... | For Oracle you could do this. Don't know if there is an equivalent in mysql. Obviously this particular statement is very specific to the example you stated. UPDATE user_cars SET num_cars = num_cars + CASE WHEN user_name='Bob' THEN -2 WHEN user_name='John' THEN +2 END WHERE user_name IN ( 'Bob', 'John' ) | Any way to transfer value from one cell to another? Is there any way in the SQL language or in MySQL (or other DBMA) to transfer a value from one cell to another? For example, say there is a table called user_cars with the following structure: |id| |user_name| |num_cars| Bob has 5 cars, and John has 3 cars. Is there an... | TITLE:
Any way to transfer value from one cell to another?
QUESTION:
Is there any way in the SQL language or in MySQL (or other DBMA) to transfer a value from one cell to another? For example, say there is a table called user_cars with the following structure: |id| |user_name| |num_cars| Bob has 5 cars, and John has 3... | [
"sql",
"mysql",
"database"
] | 0 | 4 | 859 | 6 | 0 | 2008-10-09T19:07:10.177000 | 2008-10-09T19:15:21.223000 |
188,731 | 237,456 | Is it sensible to dynamically generate SVG images on websites yet? | I'm just learning about SVG, and it seems great but I'm not sure about browser support - have people successfully got around this, or is it still too early? | Raphael is a cross-browser vector graphics library which might be worth a look. | Is it sensible to dynamically generate SVG images on websites yet? I'm just learning about SVG, and it seems great but I'm not sure about browser support - have people successfully got around this, or is it still too early? | TITLE:
Is it sensible to dynamically generate SVG images on websites yet?
QUESTION:
I'm just learning about SVG, and it seems great but I'm not sure about browser support - have people successfully got around this, or is it still too early?
ANSWER:
Raphael is a cross-browser vector graphics library which might be wor... | [
"svg"
] | 4 | 8 | 2,598 | 6 | 0 | 2008-10-09T19:09:07.693000 | 2008-10-26T03:14:08.997000 |
188,738 | 188,763 | Why should I use Carp instead of warn in Perl? | People keep giving me examples with carp instead of warn. Why? What makes carp better than warn? | carp gives you more info as to where the message comes from (context) #!/usr/bin/perl
use Carp;
foo(); bar(); baz();
sub foo { warn "foo"; }
sub bar { carp "bar"; }
sub baz { foo(); bar(); } produces foo at./foo.pl line 9. bar at./foo.pl line 13 main::bar() called at./foo.pl line 6 foo at./foo.pl line 10. bar at./... | Why should I use Carp instead of warn in Perl? People keep giving me examples with carp instead of warn. Why? What makes carp better than warn? | TITLE:
Why should I use Carp instead of warn in Perl?
QUESTION:
People keep giving me examples with carp instead of warn. Why? What makes carp better than warn?
ANSWER:
carp gives you more info as to where the message comes from (context) #!/usr/bin/perl
use Carp;
foo(); bar(); baz();
sub foo { warn "foo"; }
sub ... | [
"perl",
"module",
"carp"
] | 26 | 41 | 10,018 | 4 | 0 | 2008-10-09T19:10:48.610000 | 2008-10-09T19:16:43.327000 |
188,769 | 188,797 | Is there a way to cast generic lists to lists of interface/base class types? | I'm trying to show someone a use for interfaces in a crazy situation they've created. They have several unrelated objects in lists, and need to perform an operation on two string properties in each object. I'm pointing out that if they define the properties as part of an interface, they can use the interface object as ... | The problem is with the method, not with how it's called..... void PrintProperties (IEnumerable list) where SP: ISpecialProperties { foreach (var item in list) { Console.WriteLine("{0} {1}", item.Prop1, item.Prop2); } } | Is there a way to cast generic lists to lists of interface/base class types? I'm trying to show someone a use for interfaces in a crazy situation they've created. They have several unrelated objects in lists, and need to perform an operation on two string properties in each object. I'm pointing out that if they define ... | TITLE:
Is there a way to cast generic lists to lists of interface/base class types?
QUESTION:
I'm trying to show someone a use for interfaces in a crazy situation they've created. They have several unrelated objects in lists, and need to perform an operation on two string properties in each object. I'm pointing out th... | [
".net",
"generics",
"covariance"
] | 3 | 5 | 1,844 | 5 | 0 | 2008-10-09T19:17:57.567000 | 2008-10-09T19:23:35.027000 |
188,776 | 188,790 | How to assign a process to a core in windows xp | Is there a way to assign a process to a core (or more than one core) on a multi-core system running Windows XP? An answer using a GUI is acceptable. | You can set a process's affinity using task manager. Right click on the process in the "Processes" tab, and select "Set Affinity...". The, uncheck all the processors you don't want it to run on. | How to assign a process to a core in windows xp Is there a way to assign a process to a core (or more than one core) on a multi-core system running Windows XP? An answer using a GUI is acceptable. | TITLE:
How to assign a process to a core in windows xp
QUESTION:
Is there a way to assign a process to a core (or more than one core) on a multi-core system running Windows XP? An answer using a GUI is acceptable.
ANSWER:
You can set a process's affinity using task manager. Right click on the process in the "Processe... | [
"windows-xp",
"multicore"
] | 3 | 4 | 4,638 | 7 | 0 | 2008-10-09T19:19:11.090000 | 2008-10-09T19:22:25.217000 |
188,787 | 188,837 | grep: matching on literal "+" | I need to find occurrences of "(+)" in my sql scripts, (i.e., Oracle outer join expressions). Realizing that "+", "(", and ")" are all special regex characters, I tried: grep "\(\+\)" * Now this does return occurrences of "(+)", but other lines as well. (Seemingly anything with open and close parens on the same line.) ... | GNU grep (which is included in Cygwin) supports two syntaxes for regular expressions: basic and extended. grep uses basic regular expressions and egrep or grep -E uses extended regular expressions. The basic difference, from the grep manual, is the following: In basic regular expressions the metacharacters?, +, {, |, (... | grep: matching on literal "+" I need to find occurrences of "(+)" in my sql scripts, (i.e., Oracle outer join expressions). Realizing that "+", "(", and ")" are all special regex characters, I tried: grep "\(\+\)" * Now this does return occurrences of "(+)", but other lines as well. (Seemingly anything with open and cl... | TITLE:
grep: matching on literal "+"
QUESTION:
I need to find occurrences of "(+)" in my sql scripts, (i.e., Oracle outer join expressions). Realizing that "+", "(", and ")" are all special regex characters, I tried: grep "\(\+\)" * Now this does return occurrences of "(+)", but other lines as well. (Seemingly anythin... | [
"regex",
"cygwin",
"grep"
] | 2 | 10 | 2,537 | 2 | 0 | 2008-10-09T19:22:00.647000 | 2008-10-09T19:33:07.707000 |
188,802 | 188,826 | Why does Word freeze when I'm debugging? | Whenever I'm at a break point in a certain C#.NET application in Visual Studio 2008 and I fire up Microsoft Word 2007, word will fail to open until I restart the C# application. I have a few theories about why, but does anyone know for sure? | This can be because Word is sending out DDE messages to top level windows, and your app is not able to process it since it is hung in the debugger. Raymond Chen has a blog post on this (though not directly related to debugger, but same effect). | Why does Word freeze when I'm debugging? Whenever I'm at a break point in a certain C#.NET application in Visual Studio 2008 and I fire up Microsoft Word 2007, word will fail to open until I restart the C# application. I have a few theories about why, but does anyone know for sure? | TITLE:
Why does Word freeze when I'm debugging?
QUESTION:
Whenever I'm at a break point in a certain C#.NET application in Visual Studio 2008 and I fire up Microsoft Word 2007, word will fail to open until I restart the C# application. I have a few theories about why, but does anyone know for sure?
ANSWER:
This can b... | [
".net",
"debugging",
"ms-word"
] | 3 | 4 | 288 | 2 | 0 | 2008-10-09T19:26:11.573000 | 2008-10-09T19:30:28.617000 |
188,808 | 188,838 | Textbox multiple line and blank line disappear | I have a Winform application built with C# and.Net 2.0. I have a textbox set with the MultiLine property. The problem is when someone writes text with multiple lines (press few enters), presses the save button, and then closes and loads the form again, all the new lines disappear (the text is there at least). For examp... | If I recall correctly, the textbox is really a string array. I think you can do this: textBox1.Lines = foo.Split(new String[] {"\n"},StringSplitOptions.RemoveEmptyEntries); Edit again: If you want to keep the blank lines, the change to StringSplitOptions.None | Textbox multiple line and blank line disappear I have a Winform application built with C# and.Net 2.0. I have a textbox set with the MultiLine property. The problem is when someone writes text with multiple lines (press few enters), presses the save button, and then closes and loads the form again, all the new lines di... | TITLE:
Textbox multiple line and blank line disappear
QUESTION:
I have a Winform application built with C# and.Net 2.0. I have a textbox set with the MultiLine property. The problem is when someone writes text with multiple lines (press few enters), presses the save button, and then closes and loads the form again, al... | [
"c#",
".net",
".net-2.0",
"textbox"
] | 1 | 3 | 5,259 | 2 | 0 | 2008-10-09T19:26:40.433000 | 2008-10-09T19:33:23.777000 |
188,828 | 188,849 | SQL - table alias scope | I learned to use "exists" instead of "in". BAD select * from table where nameid in ( select nameid from othertable where otherdesc = 'SomeDesc' ) GOOD select * from table t where exists ( select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeDesc' ) The explanation was: "The reason why this is ... | It's specific to each DBMS and depends on the query optimizer. Some optimizers detect IN clause and translate it. In all DBMSes I tested, alias is only valid inside the ( ) BTW, you can rewrite the query as: select t.* from table t join othertable o on t.nameid = o.nameid and o.otherdesc in ('SomeDesc','SomeOtherDesc')... | SQL - table alias scope I learned to use "exists" instead of "in". BAD select * from table where nameid in ( select nameid from othertable where otherdesc = 'SomeDesc' ) GOOD select * from table t where exists ( select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeDesc' ) The explanation was: ... | TITLE:
SQL - table alias scope
QUESTION:
I learned to use "exists" instead of "in". BAD select * from table where nameid in ( select nameid from othertable where otherdesc = 'SomeDesc' ) GOOD select * from table t where exists ( select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeDesc' ) The... | [
"sql",
"scope",
"table-alias"
] | 4 | 4 | 17,873 | 5 | 0 | 2008-10-09T19:30:41.333000 | 2008-10-09T19:36:03.113000 |
188,833 | 259,268 | Why is my ASP.NET AutoCompleteExtender returning undefined? | Why am I getting a textbox that returns undefined list of variables? When I run this code: var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count));
return query.ToList ().ToArray(); I get this XM... | updated my ajax kit to version 1.0.10920 then changed my code to the following: foreach (DataRow dr in dt.Rows) { items.SetValue("\"" + dr["somenumber"].ToString() + "\"", i); i++; } Late friday nights with.net is not fun. I have no life.:-P | Why is my ASP.NET AutoCompleteExtender returning undefined? Why am I getting a textbox that returns undefined list of variables? When I run this code: var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt... | TITLE:
Why is my ASP.NET AutoCompleteExtender returning undefined?
QUESTION:
Why am I getting a textbox that returns undefined list of variables? When I run this code: var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().... | [
"c#",
"linq",
"web-services",
"autocomplete"
] | 3 | 4 | 2,996 | 7 | 0 | 2008-10-09T19:32:14.683000 | 2008-11-03T16:56:31.687000 |
188,835 | 188,852 | Pronouncable passwords? | Modules or software solutions for generating English pronounceable passwords? Are there similar modules for other languages? -Adam | You'll want to investigate the Markov chain method. Here's an example: http://www.multicians.org/thvv/gpw.html and here are some auto-generated passwords: http://www.manic.org/new/pw/pron.html | Pronouncable passwords? Modules or software solutions for generating English pronounceable passwords? Are there similar modules for other languages? -Adam | TITLE:
Pronouncable passwords?
QUESTION:
Modules or software solutions for generating English pronounceable passwords? Are there similar modules for other languages? -Adam
ANSWER:
You'll want to investigate the Markov chain method. Here's an example: http://www.multicians.org/thvv/gpw.html and here are some auto-gene... | [
"algorithm",
"passwords"
] | 4 | 6 | 1,127 | 3 | 0 | 2008-10-09T19:32:35.867000 | 2008-10-09T19:36:36.140000 |
188,839 | 189,126 | Function pointer cast to different signature | I use a structure of function pointers to implement an interface for different backends. The signatures are very different, but the return values are almost all void, void * or int. struct my_interface { void (*func_a)(int i); void *(*func_b)(const char *bla);... int (*func_z)(char foo); }; But it is not required that ... | By the C specification, casting a function pointer results in undefined behavior. In fact, for a while, GCC 4.3 prereleases would return NULL whenever you casted a function pointer, perfectly valid by the spec, but they backed out that change before release because it broke lots of programs. Assuming GCC continues doin... | Function pointer cast to different signature I use a structure of function pointers to implement an interface for different backends. The signatures are very different, but the return values are almost all void, void * or int. struct my_interface { void (*func_a)(int i); void *(*func_b)(const char *bla);... int (*func_... | TITLE:
Function pointer cast to different signature
QUESTION:
I use a structure of function pointers to implement an interface for different backends. The signatures are very different, but the return values are almost all void, void * or int. struct my_interface { void (*func_a)(int i); void *(*func_b)(const char *bl... | [
"c",
"pointers"
] | 20 | 17 | 24,774 | 7 | 0 | 2008-10-09T19:33:47.783000 | 2008-10-09T20:42:45.960000 |
188,843 | 188,902 | What techniques do you use when you are designing an Object Model alone? | So no doubt that building a domain model is something that I think happens best when you approach it as as team. Even going so far as to involve someone who is not technical and a member of the 'business' in the modeling sessions. So much can get done quickly when you put the right people in a room and hammer out thing... | Everyone does it differently, I think, but... I almost always start with a Class diagram (usually UML-like and on paper), paying special attention to relationships between classes and their arity. Validation at this stage is mostly trying to understand if the high-level semantics of the entities make sense together. Th... | What techniques do you use when you are designing an Object Model alone? So no doubt that building a domain model is something that I think happens best when you approach it as as team. Even going so far as to involve someone who is not technical and a member of the 'business' in the modeling sessions. So much can get ... | TITLE:
What techniques do you use when you are designing an Object Model alone?
QUESTION:
So no doubt that building a domain model is something that I think happens best when you approach it as as team. Even going so far as to involve someone who is not technical and a member of the 'business' in the modeling sessions... | [
"oop",
"tdd"
] | 2 | 3 | 235 | 2 | 0 | 2008-10-09T19:34:56.237000 | 2008-10-09T19:48:10.050000 |
188,844 | 189,061 | How can I highlight/outline a Visual object in WPF? | If I had a Canvas with n number of Visual objects of any shape or size, how would I highlight/outline a Visual object programmatically? Is there something built into WPF to help me? | Having read the comments in the other answer -- in which you state that you wish the outline to conform to the shape of the visual -- I can only suggest you take a look at the BitmapEffects. There is one for an Outer Glow effect. Duplicating the visuals themselves would probably be less efficient, and would probably pr... | How can I highlight/outline a Visual object in WPF? If I had a Canvas with n number of Visual objects of any shape or size, how would I highlight/outline a Visual object programmatically? Is there something built into WPF to help me? | TITLE:
How can I highlight/outline a Visual object in WPF?
QUESTION:
If I had a Canvas with n number of Visual objects of any shape or size, how would I highlight/outline a Visual object programmatically? Is there something built into WPF to help me?
ANSWER:
Having read the comments in the other answer -- in which yo... | [
"wpf"
] | 5 | 5 | 4,105 | 3 | 0 | 2008-10-09T19:35:07.627000 | 2008-10-09T20:26:55.213000 |
188,850 | 188,930 | How to launch multiple Internet Explorer windows/tabs from batch file? | I would like a batch file to launch two separate programs then have the command line window close. Actually, to clarify, I am launching Internet Explorer with two different URLs. So far I have something like this: start "~\iexplore.exe" "url1" start "~\iexplore.exe" "url2" What I get is one instance of Internet Explore... | Try this in your batch file: @echo off start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE www.google.com start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE www.yahoo.com | How to launch multiple Internet Explorer windows/tabs from batch file? I would like a batch file to launch two separate programs then have the command line window close. Actually, to clarify, I am launching Internet Explorer with two different URLs. So far I have something like this: start "~\iexplore.exe" "url1" start... | TITLE:
How to launch multiple Internet Explorer windows/tabs from batch file?
QUESTION:
I would like a batch file to launch two separate programs then have the command line window close. Actually, to clarify, I am launching Internet Explorer with two different URLs. So far I have something like this: start "~\iexplore... | [
"internet-explorer",
"batch-file"
] | 21 | 39 | 250,583 | 9 | 0 | 2008-10-09T19:36:22.147000 | 2008-10-09T19:54:31.080000 |
188,853 | 190,877 | Why isn't IIS executing the PHP code of my site root index.php file? | IIS is literally sending code to the browser rather then executing it. But, only for the root http://domain.com/index.php file. All other.php files in that folder and index.php files in subfolders execute as expected. How can I get my root index.php code to execute? Update: "index.php" is a Default Document of my Web S... | IIS 5.1 does not run PHP properly under root directory, but fine in all other folders Running a WordPress blog in site root using IIS UPDATED: I have found a few possible workarounds for PHP 5 and IIS 7. If those solutions are not working, please provide more details about your index.php, IIS setup, or try to use IIS 6... | Why isn't IIS executing the PHP code of my site root index.php file? IIS is literally sending code to the browser rather then executing it. But, only for the root http://domain.com/index.php file. All other.php files in that folder and index.php files in subfolders execute as expected. How can I get my root index.php c... | TITLE:
Why isn't IIS executing the PHP code of my site root index.php file?
QUESTION:
IIS is literally sending code to the browser rather then executing it. But, only for the root http://domain.com/index.php file. All other.php files in that folder and index.php files in subfolders execute as expected. How can I get m... | [
"php",
"iis"
] | 3 | 3 | 19,433 | 5 | 0 | 2008-10-09T19:36:55.577000 | 2008-10-10T11:18:02.637000 |
188,862 | 188,954 | Software testing for a bare-metal system | I am writing a project in C++ for an embedded system with no OS support; almost no library support. Very bare-metal. Hence, a fair amount of my code is tightly coupled(e.g., software triggered interrupts and the layer directly above them). Part of what I am doing involves changing the serial port configuration, thus dr... | The lack of infrastructure in a bare metal environment is pretty challenging. I'd recommend you focus on debugging tools. Even with great care and excellent methodology, you'll need the ability to debug things. It would behoove you to get gdbagent working. You'll need to implement this yourself, but it is a simple text... | Software testing for a bare-metal system I am writing a project in C++ for an embedded system with no OS support; almost no library support. Very bare-metal. Hence, a fair amount of my code is tightly coupled(e.g., software triggered interrupts and the layer directly above them). Part of what I am doing involves changi... | TITLE:
Software testing for a bare-metal system
QUESTION:
I am writing a project in C++ for an embedded system with no OS support; almost no library support. Very bare-metal. Hence, a fair amount of my code is tightly coupled(e.g., software triggered interrupts and the layer directly above them). Part of what I am doi... | [
"embedded",
"bare-metal",
"tightly-coupled-code"
] | 4 | 2 | 2,485 | 5 | 0 | 2008-10-09T19:39:20.910000 | 2008-10-09T19:58:56.110000 |
188,864 | 188,932 | Should I use default(Foo), Foo.Empty, or null? | So C# now allows you to use default(Foo) to get a recognized "not filled in yet"/empty instance of a class -- I'm not sure if it is exactly the same as new Foo() or not. Many library classes also implement a Foo.Empty property, which returns a similar instance. And of course any reference type can point to null. So rea... | default(Foo) will return null when Foo is a class type, zero where Foo is a value type (such as int), and an instance of Foo with all fields initialized to their respective default() values where Foo is a struct. It was added to the language so that generics could support both value and reference types - more info at M... | Should I use default(Foo), Foo.Empty, or null? So C# now allows you to use default(Foo) to get a recognized "not filled in yet"/empty instance of a class -- I'm not sure if it is exactly the same as new Foo() or not. Many library classes also implement a Foo.Empty property, which returns a similar instance. And of cour... | TITLE:
Should I use default(Foo), Foo.Empty, or null?
QUESTION:
So C# now allows you to use default(Foo) to get a recognized "not filled in yet"/empty instance of a class -- I'm not sure if it is exactly the same as new Foo() or not. Many library classes also implement a Foo.Empty property, which returns a similar ins... | [
"c#",
"constructor",
"conventions"
] | 3 | 16 | 398 | 3 | 0 | 2008-10-09T19:39:25.027000 | 2008-10-09T19:54:38.803000 |
188,884 | 188,922 | Moving from VS Professional to VS Team System | We are looking at moving from Visual Studio 2008 Professional to Visual Studio Team System. I believe I've read that the client Development Edition is a superset of what Professional has/does. I'd like to ease into the transition with the client end first, then get the Team Foundation Server up and running later, and I... | Team System (Developer / Suite ) is a superset of Professional and as such, you only gain features by upgrading. Tester is a slightly different feature set, although it is included in Suite. The most common way of transitioning is to upgrade all of the dev stations at once. There's no reason not to. As far as going wit... | Moving from VS Professional to VS Team System We are looking at moving from Visual Studio 2008 Professional to Visual Studio Team System. I believe I've read that the client Development Edition is a superset of what Professional has/does. I'd like to ease into the transition with the client end first, then get the Team... | TITLE:
Moving from VS Professional to VS Team System
QUESTION:
We are looking at moving from Visual Studio 2008 Professional to Visual Studio Team System. I believe I've read that the client Development Edition is a superset of what Professional has/does. I'd like to ease into the transition with the client end first,... | [
"visual-studio-2008"
] | 3 | 3 | 334 | 1 | 0 | 2008-10-09T19:44:08.200000 | 2008-10-09T19:52:20.680000 |
188,886 | 188,906 | Inject errors into already validated form? | After my form.Form validates the user input values I pass them to a separate (external) process for further processing. This external process can potentially find further errors in the values. Is there a way to inject these errors into the already validated form so they can be displayed via the usual form error display... | Form._errors can be treated like a standard dictionary. It's considered good form to use the ErrorList class, and to append errors to the existing list: from django.forms.utils import ErrorList errors = form._errors.setdefault("myfield", ErrorList()) errors.append(u"My error here") And if you want to add non-field erro... | Inject errors into already validated form? After my form.Form validates the user input values I pass them to a separate (external) process for further processing. This external process can potentially find further errors in the values. Is there a way to inject these errors into the already validated form so they can be... | TITLE:
Inject errors into already validated form?
QUESTION:
After my form.Form validates the user input values I pass them to a separate (external) process for further processing. This external process can potentially find further errors in the values. Is there a way to inject these errors into the already validated f... | [
"django",
"django-forms"
] | 115 | 98 | 47,754 | 4 | 0 | 2008-10-09T19:45:22.690000 | 2008-10-09T19:49:08.800000 |
188,889 | 188,926 | AutoCompleteExtender in ASP.NET additional info | how do I pass additional information to the service method returning the collection of items? I'll attempt to explain what I mean, I have 2 text boxes on a form, I need to fill out names, based of a specific account id in a database. so, I need to pass an integer to the getNamesForDropDown method. I couldn't figure out... | azam has the right idea- but the signature of the autocomplete method can also have a third parameter: public string[] yourmethod(string prefixText, int count, string contextKey ) you can Split up the results of the contextKey string using Azam's method- but this way you do not have to worry about sanatizing the user's... | AutoCompleteExtender in ASP.NET additional info how do I pass additional information to the service method returning the collection of items? I'll attempt to explain what I mean, I have 2 text boxes on a form, I need to fill out names, based of a specific account id in a database. so, I need to pass an integer to the g... | TITLE:
AutoCompleteExtender in ASP.NET additional info
QUESTION:
how do I pass additional information to the service method returning the collection of items? I'll attempt to explain what I mean, I have 2 text boxes on a form, I need to fill out names, based of a specific account id in a database. so, I need to pass a... | [
"asp.net",
"ajaxcontroltoolkit",
"autocompleteextender"
] | 2 | 5 | 5,647 | 4 | 0 | 2008-10-09T19:45:35.593000 | 2008-10-09T19:53:54.187000 |
188,892 | 190,297 | Glob pattern matching in .NET | Is there a built-in mechanism in.NET to match patterns other than regular expressions (regex)? I'd like to match using Unix-style ( glob ) wildcards (* = any number of any character). I'd like to use this for a end-user facing control. I fear that permitting all regex capabilities will be very confusing. | I found the actual code for you: Regex.Escape( wildcardExpression ).Replace( @"\*", ".*" ).Replace( @"\?", "." ); | Glob pattern matching in .NET Is there a built-in mechanism in.NET to match patterns other than regular expressions (regex)? I'd like to match using Unix-style ( glob ) wildcards (* = any number of any character). I'd like to use this for a end-user facing control. I fear that permitting all regex capabilities will be ... | TITLE:
Glob pattern matching in .NET
QUESTION:
Is there a built-in mechanism in.NET to match patterns other than regular expressions (regex)? I'd like to match using Unix-style ( glob ) wildcards (* = any number of any character). I'd like to use this for a end-user facing control. I fear that permitting all regex cap... | [
"c#",
".net",
"glob"
] | 62 | 40 | 35,171 | 15 | 0 | 2008-10-09T19:45:51.130000 | 2008-10-10T06:04:16.467000 |
188,913 | 189,000 | Is there a way in VBA to know about variables that aren't being used? | Is there a tool, method or setting in the standard VBA Editor to warn about variables that have been Dim 'med, but aren't being used? | MZ-Tools will search through your code and tell you what is not being used. The version for VBA can be found here. The specific feature in MZ-Tools that performs what you asking about is Review Source Code: The Review Source Code feature allows you to review the source code to detect some unused declarations (constants... | Is there a way in VBA to know about variables that aren't being used? Is there a tool, method or setting in the standard VBA Editor to warn about variables that have been Dim 'med, but aren't being used? | TITLE:
Is there a way in VBA to know about variables that aren't being used?
QUESTION:
Is there a tool, method or setting in the standard VBA Editor to warn about variables that have been Dim 'med, but aren't being used?
ANSWER:
MZ-Tools will search through your code and tell you what is not being used. The version f... | [
"vba",
"excel",
"variables",
"vbe"
] | 20 | 21 | 11,255 | 2 | 0 | 2008-10-09T19:51:27.157000 | 2008-10-09T20:10:10.160000 |
188,919 | 194,614 | How to document a WCF web-service in a technical spec? | Other than pasting a WDSL in the tech spec, what are the recommended ways to document a WCF web-service before you begin coding? | We recently published a WCF based SOAP interface for third parties to integrate against. For each method we provided the following: Method name Request example (wire format dump) Request parameters explanation Response example (wire format dump) Request parameters explanation Caveats (gotchas) History We also provide t... | How to document a WCF web-service in a technical spec? Other than pasting a WDSL in the tech spec, what are the recommended ways to document a WCF web-service before you begin coding? | TITLE:
How to document a WCF web-service in a technical spec?
QUESTION:
Other than pasting a WDSL in the tech spec, what are the recommended ways to document a WCF web-service before you begin coding?
ANSWER:
We recently published a WCF based SOAP interface for third parties to integrate against. For each method we p... | [
"c#",
"wcf",
"web-services"
] | 4 | 6 | 11,070 | 4 | 0 | 2008-10-09T19:51:56.640000 | 2008-10-11T20:43:37.193000 |
188,934 | 191,181 | What programming language paradigm fits which job? | As far as I know (not much I'll admit), the currently popular programming paradigms are Object Oriented (Java, C#, Ruby) vs functional (F#). As someone who is mostly familiar with the first paradigm, I have several questions: Can a programmer simply stick with one paradigm all of his/her life? Or in other words, can al... | "Or in other words, can all problems be reduced to nails for one hammer?" Yes. Period. Any programming language you are likely to run into will be as complete as all others. There's actually a formal definition of "completeness" for a programming language. "Have people ever needed to learn a new paradigm?" Always. Ther... | What programming language paradigm fits which job? As far as I know (not much I'll admit), the currently popular programming paradigms are Object Oriented (Java, C#, Ruby) vs functional (F#). As someone who is mostly familiar with the first paradigm, I have several questions: Can a programmer simply stick with one para... | TITLE:
What programming language paradigm fits which job?
QUESTION:
As far as I know (not much I'll admit), the currently popular programming paradigms are Object Oriented (Java, C#, Ruby) vs functional (F#). As someone who is mostly familiar with the first paradigm, I have several questions: Can a programmer simply s... | [
"paradigms"
] | 12 | 13 | 2,297 | 8 | 0 | 2008-10-09T19:55:51.563000 | 2008-10-10T13:09:07.830000 |
188,940 | 188,979 | What is the correct LINQtoSQL-ish way to do a table truncate? | I have a project with a formidable data access layer using LinqtoSQL for just about anything touching our databases. I needed to build a helper class that bridges some common crud operations from CLSA objects to LinqToSql ones. Everything has been operating swimmingly until I needed to do a truncate on a table and all ... | This is not possible without doing a custom T-SQL query. Doing a.Delete() and SubmitChanges afterwords would, as you probably already know, result in a DELETE statement. Of course you could create a stored procedure that truncates the table, and then call the procedure from LINQ, but that isn't really what you're looki... | What is the correct LINQtoSQL-ish way to do a table truncate? I have a project with a formidable data access layer using LinqtoSQL for just about anything touching our databases. I needed to build a helper class that bridges some common crud operations from CLSA objects to LinqToSql ones. Everything has been operating ... | TITLE:
What is the correct LINQtoSQL-ish way to do a table truncate?
QUESTION:
I have a project with a formidable data access layer using LinqtoSQL for just about anything touching our databases. I needed to build a helper class that bridges some common crud operations from CLSA objects to LinqToSql ones. Everything h... | [
"linq-to-sql",
"t-sql",
"data-access-layer",
"truncate"
] | 3 | 3 | 1,398 | 2 | 0 | 2008-10-09T19:56:46.740000 | 2008-10-09T20:04:48.440000 |
188,942 | 188,948 | How do you iterate backwards through an STL list? | I'm writing some cross-platform code between Windows and Mac. If list::end() "returns an iterator that addresses the location succeeding the last element in a list" and can be checked when traversing a list forward, what is the best way to traverse the list backwards? This code works on the Mac but not on Windows (can'... | Use reverse_iterator instead of iterator. Use rbegin() & rend() instead of begin() & end(). Another possibility, if you like using the BOOST_FOREACH macro is to use the BOOST_REVERSE_FOREACH macro introduced in Boost 1.36.0. | How do you iterate backwards through an STL list? I'm writing some cross-platform code between Windows and Mac. If list::end() "returns an iterator that addresses the location succeeding the last element in a list" and can be checked when traversing a list forward, what is the best way to traverse the list backwards? T... | TITLE:
How do you iterate backwards through an STL list?
QUESTION:
I'm writing some cross-platform code between Windows and Mac. If list::end() "returns an iterator that addresses the location succeeding the last element in a list" and can be checked when traversing a list forward, what is the best way to traverse the... | [
"c++",
"list",
"stl",
"iterator",
"traversal"
] | 41 | 66 | 61,315 | 5 | 0 | 2008-10-09T19:57:10.343000 | 2008-10-09T19:58:08.233000 |
188,944 | 188,965 | Java/Swing: How to draw a simple bar graph in a custom renderer for a JLabel | I would like to dynamically create a minimal transparent bar graph to display over a canvas. I was thinking of using a custom renderer for a JButton or a JLabel; but how do I draw my bar graph in this renderer? | The standard way would be to create a subclass (possibly an anonymous one, if you prefer) of JLabel or JPanel and overload the paintComponent(Graphics g) method. You can then use the passed Graphics object to draw whatever rectangles (and so forth) that you need. For more information on that part of it, refer to the Ja... | Java/Swing: How to draw a simple bar graph in a custom renderer for a JLabel I would like to dynamically create a minimal transparent bar graph to display over a canvas. I was thinking of using a custom renderer for a JButton or a JLabel; but how do I draw my bar graph in this renderer? | TITLE:
Java/Swing: How to draw a simple bar graph in a custom renderer for a JLabel
QUESTION:
I would like to dynamically create a minimal transparent bar graph to display over a canvas. I was thinking of using a custom renderer for a JButton or a JLabel; but how do I draw my bar graph in this renderer?
ANSWER:
The s... | [
"java",
"swing",
"custom-renderer"
] | 0 | 2 | 4,376 | 1 | 0 | 2008-10-09T19:57:44.147000 | 2008-10-09T20:00:57.683000 |
188,963 | 189,058 | Connecting to SQL Server with Visual Studio Express Editions | I find it odd that in Visual C# 2008 Express edition, when you use the database explorer, your options are: Microsoft Access SQL Server Compact 3.5, and SQL Server Database File. BUT if you use Visual Web Developer 2008 Express, you can connect to a regular SQL Server, Oracle, ODBC, etc. For people developing command-l... | You should be able to choose the SQL Server Database file option to get the right kind of database (the system.data.SqlClient provider), and then manually correct the connection string to point to your db. I think the reasoning behind those db choices probably goes something like this: If you're using the Express Editi... | Connecting to SQL Server with Visual Studio Express Editions I find it odd that in Visual C# 2008 Express edition, when you use the database explorer, your options are: Microsoft Access SQL Server Compact 3.5, and SQL Server Database File. BUT if you use Visual Web Developer 2008 Express, you can connect to a regular S... | TITLE:
Connecting to SQL Server with Visual Studio Express Editions
QUESTION:
I find it odd that in Visual C# 2008 Express edition, when you use the database explorer, your options are: Microsoft Access SQL Server Compact 3.5, and SQL Server Database File. BUT if you use Visual Web Developer 2008 Express, you can conn... | [
"c#",
"visual-studio-2008",
"visual-web-developer"
] | 49 | 21 | 100,560 | 6 | 0 | 2008-10-09T20:00:36.623000 | 2008-10-09T20:24:38.650000 |
188,967 | 189,032 | How do I determine if a column is an identity column in MSSQL 2000? | I want to do this in code, not with ALT+F1. | You can also do it this way: select columnproperty(object_id('mytable'),'mycolumn','IsIdentity') Returns 1 if it's an identity, 0 if not. | How do I determine if a column is an identity column in MSSQL 2000? I want to do this in code, not with ALT+F1. | TITLE:
How do I determine if a column is an identity column in MSSQL 2000?
QUESTION:
I want to do this in code, not with ALT+F1.
ANSWER:
You can also do it this way: select columnproperty(object_id('mytable'),'mycolumn','IsIdentity') Returns 1 if it's an identity, 0 if not. | [
"sql-server",
"t-sql",
"metadata"
] | 47 | 94 | 39,685 | 6 | 0 | 2008-10-09T20:01:36.027000 | 2008-10-09T20:16:59.117000 |
188,968 | 189,010 | SQL Server 2000 constraint involving column on different table | I would like a constraint on a SQL Server 2000 table column that is sort of a combination of a foreign key and a check constraint. The value of my column must exist in the other table, but I am only concerned with values in the other table where one of its columns equal a specified value. The simplified tables are: imp... | You could use an INSTEAD OF INSERT trigger to emulate that behaviour. Check value existence when an insert is about to occur. | SQL Server 2000 constraint involving column on different table I would like a constraint on a SQL Server 2000 table column that is sort of a combination of a foreign key and a check constraint. The value of my column must exist in the other table, but I am only concerned with values in the other table where one of its ... | TITLE:
SQL Server 2000 constraint involving column on different table
QUESTION:
I would like a constraint on a SQL Server 2000 table column that is sort of a combination of a foreign key and a check constraint. The value of my column must exist in the other table, but I am only concerned with values in the other table... | [
"sql-server",
"database",
"constraints"
] | 0 | 1 | 627 | 2 | 0 | 2008-10-09T20:01:51.627000 | 2008-10-09T20:11:32.310000 |
188,977 | 188,993 | catching exceptions from another thread | I have a method running in a seperate thread. The thread is created and started from a form in a windows application. If an exception is thrown from inside the thread, what is the best way to pass it back to the main application. Right now, I'm passing a reference to the main form into the thread, then invoking the met... | So you're using Invoke to marshall back to the UI thread, by the looks of it - which is exactly what you need to do. I'd personally use an Action for simplicity's sake, and possibly BeginInvoke instead of Invoke, but basically you're doing the right thing. | catching exceptions from another thread I have a method running in a seperate thread. The thread is created and started from a form in a windows application. If an exception is thrown from inside the thread, what is the best way to pass it back to the main application. Right now, I'm passing a reference to the main for... | TITLE:
catching exceptions from another thread
QUESTION:
I have a method running in a seperate thread. The thread is created and started from a form in a windows application. If an exception is thrown from inside the thread, what is the best way to pass it back to the main application. Right now, I'm passing a referen... | [
"c#",
".net",
"multithreading",
"exception"
] | 13 | 17 | 21,010 | 5 | 0 | 2008-10-09T20:04:33.290000 | 2008-10-09T20:08:42.237000 |
189,019 | 189,076 | NHibernate DetachedCriteria.SetFirstResult? | I found an example of implementing the repository pattern in NHibernate on the web, and one of the methods uses this code to get the first result of a query: public IEnumerable FindAll(DetachedCriteria criteria, int firstResult, int numberOfResults, params Order[] orders)
{ criteria.SetFirstResult(firstResult).SetMaxR... | It doesn't seem to be available until an ISession is bound. For instance, it's not on DetachedCriteria, but it is available on the ICriteria that is returned from the GetExecutableCriteria method. | NHibernate DetachedCriteria.SetFirstResult? I found an example of implementing the repository pattern in NHibernate on the web, and one of the methods uses this code to get the first result of a query: public IEnumerable FindAll(DetachedCriteria criteria, int firstResult, int numberOfResults, params Order[] orders)
{ ... | TITLE:
NHibernate DetachedCriteria.SetFirstResult?
QUESTION:
I found an example of implementing the repository pattern in NHibernate on the web, and one of the methods uses this code to get the first result of a query: public IEnumerable FindAll(DetachedCriteria criteria, int firstResult, int numberOfResults, params O... | [
"c#",
".net",
"nhibernate"
] | 0 | 0 | 2,886 | 2 | 0 | 2008-10-09T20:14:47.983000 | 2008-10-09T20:29:22.710000 |
189,031 | 189,050 | Set same icon for all my Forms | Is there any way to set the same icon to all my forms without having to change one by one? Something like when you setup GlobalAssemblyInfo for all your projects inside your solution. | One option would be to inherit from a common base-Form that sets the Icon in the constructor (presumably from a resx). Another option might be PostSharp - it seems like it should be possible to do this (set.Icon) via AOP; not trivial, though. Finally, you could use a simple utility method (perhaps an extension method) ... | Set same icon for all my Forms Is there any way to set the same icon to all my forms without having to change one by one? Something like when you setup GlobalAssemblyInfo for all your projects inside your solution. | TITLE:
Set same icon for all my Forms
QUESTION:
Is there any way to set the same icon to all my forms without having to change one by one? Something like when you setup GlobalAssemblyInfo for all your projects inside your solution.
ANSWER:
One option would be to inherit from a common base-Form that sets the Icon in t... | [
"c#",
".net",
"winforms",
"icons"
] | 38 | 26 | 33,737 | 8 | 0 | 2008-10-09T20:16:56.137000 | 2008-10-09T20:21:50.683000 |
189,033 | 189,073 | Having trouble with insertChildBefore and insertChildAfter in AS3 | I have an XML document: var xml:XML = new XML( ); What I'd like to do, is when certain conditions are me, insert another at the beginning of itemList. var newNode:XMLList = new XMLList(" "); I'm able to generate and trace newNode just fine, but whenever I try to add it using insertChildBefore, it always returns undefin... | There are two problems here (I've now tested this code - it should work for you): The variable xml is not the direct parent of the item node you are inserting. You're calling insertChildBefore on the xml node, but your contentNode is not its direct child. The contentNode variable you're trying to insert ahead of is a c... | Having trouble with insertChildBefore and insertChildAfter in AS3 I have an XML document: var xml:XML = new XML( ); What I'd like to do, is when certain conditions are me, insert another at the beginning of itemList. var newNode:XMLList = new XMLList(" "); I'm able to generate and trace newNode just fine, but whenever ... | TITLE:
Having trouble with insertChildBefore and insertChildAfter in AS3
QUESTION:
I have an XML document: var xml:XML = new XML( ); What I'd like to do, is when certain conditions are me, insert another at the beginning of itemList. var newNode:XMLList = new XMLList(" "); I'm able to generate and trace newNode just f... | [
"xml",
"actionscript-3"
] | 3 | 5 | 4,468 | 1 | 0 | 2008-10-09T20:16:59.320000 | 2008-10-09T20:28:48.017000 |
189,055 | 189,077 | Is Iterator initialization inside for loop considered bad style, and why? | Typically you will find STL code like this: for (SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin(); Iter!= m_SomeMemberContainerVar.end(); ++Iter) { } But we actually have the recommendation to write it like this: SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin(); SomeC... | If you wrap your code into lines properly, the inline form would be equally readable. Besides, you should always do the iterEnd = container.end() as an optimization: for (SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin(), IterEnd = m_SomeMemberContainerVar.end(); Iter!= IterEnd; ++Iter) { } Upd... | Is Iterator initialization inside for loop considered bad style, and why? Typically you will find STL code like this: for (SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin(); Iter!= m_SomeMemberContainerVar.end(); ++Iter) { } But we actually have the recommendation to write it like this: SomeCla... | TITLE:
Is Iterator initialization inside for loop considered bad style, and why?
QUESTION:
Typically you will find STL code like this: for (SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin(); Iter!= m_SomeMemberContainerVar.end(); ++Iter) { } But we actually have the recommendation to write it ... | [
"c++",
"stl",
"coding-style",
"iteration",
"iterator"
] | 13 | 15 | 5,673 | 13 | 0 | 2008-10-09T20:23:50.537000 | 2008-10-09T20:29:28.123000 |
189,062 | 189,258 | Does a MasterPage know what page is being displayed? | When I navigate on a website utilizing MasterPages, does the application know what page I am on? If so, does it store it in an object I can access? The reason I am asking is so I can replace this: //masterpage //content page(s) Home FAQ Videos Button 4 Button 5 With a more elegant solution for the navigation, which hig... | I'd concur with Chris: use a control to handle display of this menu and make it aware of what link should be highlighted. Here's a method I use regularly. It may become more complex if you've got multiple pages that would need the same link styled differently, but you get the idea. Dim thisURL As String = Request.Url.S... | Does a MasterPage know what page is being displayed? When I navigate on a website utilizing MasterPages, does the application know what page I am on? If so, does it store it in an object I can access? The reason I am asking is so I can replace this: //masterpage //content page(s) Home FAQ Videos Button 4 Button 5 With ... | TITLE:
Does a MasterPage know what page is being displayed?
QUESTION:
When I navigate on a website utilizing MasterPages, does the application know what page I am on? If so, does it store it in an object I can access? The reason I am asking is so I can replace this: //masterpage //content page(s) Home FAQ Videos Butto... | [
"asp.net",
"navigation",
"master-pages"
] | 9 | 17 | 28,864 | 12 | 0 | 2008-10-09T20:26:58.473000 | 2008-10-09T21:19:43.623000 |
189,079 | 191,268 | jQuery animation | I'm having some minor problems with some animations I'm trying to set up. I have a couple divs stacked on top of each other kind of like this. Stuff... More Stuff... Each of these divs has a drop shadow applied to it via jQuery plugin (jquery.dropshadow.js). The problem occurs when I expand one of the divs using some k... | I would suggest using CSS for your drop shadows, and not JS. I have dealt with this exact problem in the past and I have completely stopped using JS for drop shadows. I have never seen animations with JS shadows look as smooth as pure CSS. Also, using too much JS to alter the page elements can cause performance issues. | jQuery animation I'm having some minor problems with some animations I'm trying to set up. I have a couple divs stacked on top of each other kind of like this. Stuff... More Stuff... Each of these divs has a drop shadow applied to it via jQuery plugin (jquery.dropshadow.js). The problem occurs when I expand one of the ... | TITLE:
jQuery animation
QUESTION:
I'm having some minor problems with some animations I'm trying to set up. I have a couple divs stacked on top of each other kind of like this. Stuff... More Stuff... Each of these divs has a drop shadow applied to it via jQuery plugin (jquery.dropshadow.js). The problem occurs when I ... | [
"javascript",
"jquery",
"animation",
"user-interface"
] | 1 | 2 | 2,383 | 4 | 0 | 2008-10-09T20:29:56.423000 | 2008-10-10T13:27:55.140000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.