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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
51,593 | 56,631 | Apache XML-RPC Exception Handling | What is the easiest way to extract the original exception from an exception returned via Apache's implementation of XML-RPC? | It turns out that getting the cause exception from the Apache exception is the right one. } catch (XmlRpcException rpce) { Throwable cause = rpce.getCause(); if(cause!= null) { if(cause instanceof ExceptionYouCanHandleException) { handler(cause); } else { throw(cause); } } else { throw(rpce); } } | Apache XML-RPC Exception Handling What is the easiest way to extract the original exception from an exception returned via Apache's implementation of XML-RPC? | TITLE:
Apache XML-RPC Exception Handling
QUESTION:
What is the easiest way to extract the original exception from an exception returned via Apache's implementation of XML-RPC?
ANSWER:
It turns out that getting the cause exception from the Apache exception is the right one. } catch (XmlRpcException rpce) { Throwable c... | [
"exception",
"xml-rpc"
] | 3 | 4 | 2,359 | 2 | 0 | 2008-09-09T10:59:41.867000 | 2008-09-11T14:09:05.793000 |
51,619 | 4,015,421 | How to set up Git bare HTTP-available repository on IIS | My server already runs IIS on TCP ports 80 and 443. I want to make a centralized "push/pull" Git repository available to all my team members over the Internet. So I should use HTTP or HTTPS. But I cannot use Apache because of IIS already hooking up listening sockets on ports 80 and 443! Is there any way to publish a Gi... | Bonobo Git Server https://bonobogitserver.com/ GitAspx - By Jeremy Skinner https://github.com/JeremySkinner/git-dot-aspx/ https://github.com/JeremySkinner/git-dot-aspx/downloads Install Instructions https://www.jeremyskinner.co.uk/2010/10/19/gitaspx-0-3-available/ Git Web https://gitweb.codeplex.com/ WebGitNET https://... | How to set up Git bare HTTP-available repository on IIS My server already runs IIS on TCP ports 80 and 443. I want to make a centralized "push/pull" Git repository available to all my team members over the Internet. So I should use HTTP or HTTPS. But I cannot use Apache because of IIS already hooking up listening socke... | TITLE:
How to set up Git bare HTTP-available repository on IIS
QUESTION:
My server already runs IIS on TCP ports 80 and 443. I want to make a centralized "push/pull" Git repository available to all my team members over the Internet. So I should use HTTP or HTTPS. But I cannot use Apache because of IIS already hooking ... | [
"git",
"version-control",
"iis-7",
"dvcs"
] | 30 | 31 | 29,276 | 7 | 0 | 2008-09-09T11:11:45.300000 | 2010-10-25T14:16:06.423000 |
51,624 | 51,659 | Designers and developers working together | The rich presentational capabilities of WPF and Silverlight mean developers like me will be working closely with graphic designers more often these days, as is the case in my next project. Does anyone out there have any tips and experience (from both points of view) on making this go more smoothly? For example, when I ... | I have spent 4 months on a project working extremely closely with a designer and he has still not picked up the basic idea of CVS (which is not my choice of source control system). I'm talking template files, JavaScript and CSS here. He's not stupid, it's just one of these things that makes his job harder so he resists... | Designers and developers working together The rich presentational capabilities of WPF and Silverlight mean developers like me will be working closely with graphic designers more often these days, as is the case in my next project. Does anyone out there have any tips and experience (from both points of view) on making t... | TITLE:
Designers and developers working together
QUESTION:
The rich presentational capabilities of WPF and Silverlight mean developers like me will be working closely with graphic designers more often these days, as is the case in my next project. Does anyone out there have any tips and experience (from both points of... | [
"wpf",
"silverlight",
"communication"
] | 34 | 14 | 2,223 | 12 | 0 | 2008-09-09T11:16:47.253000 | 2008-09-09T11:36:51.013000 |
51,627 | 51,671 | File Descriptor Assignment in C | When sockets are created or files are opened/created in C, is the file descriptor that's assigned to the socket/file guaranteed to be the lowest-valued descriptor available? What does the C spec say about file descriptor assignment in this regard, if anything? | It's not guaranteed to be the lowest, and is implementation dependent (1). In general, however, the routine that assigns open file descriptors uses a method that gives you the first open on. It could be that immediately after several lower ones free, leaving you with a higher descriptor than you might expect though. Th... | File Descriptor Assignment in C When sockets are created or files are opened/created in C, is the file descriptor that's assigned to the socket/file guaranteed to be the lowest-valued descriptor available? What does the C spec say about file descriptor assignment in this regard, if anything? | TITLE:
File Descriptor Assignment in C
QUESTION:
When sockets are created or files are opened/created in C, is the file descriptor that's assigned to the socket/file guaranteed to be the lowest-valued descriptor available? What does the C spec say about file descriptor assignment in this regard, if anything?
ANSWER:
... | [
"c",
"file-descriptor"
] | 4 | 5 | 4,432 | 6 | 0 | 2008-09-09T11:18:58.967000 | 2008-09-09T11:45:42.893000 |
51,645 | 51,672 | How to discover USB storage devices and writable CD/DVD drives (C#) | How can I discover any USB storage devices and/or CD/DVD writers available at a given time (using C#.Net2.0). I would like to present users with a choice of devices onto which a file can be stored for physically removal - i.e. not the hard drive. | using System.IO;
DriveInfo[] allDrives = DriveInfo.GetDrives(); foreach (DriveInfo d in allDrives) { if (d.IsReady && d.DriveType == DriveType.Removable) { // This is the drive you want... } } The DriveInfo class documentation is here: http://msdn.microsoft.com/en-us/library/system.io.driveinfo.aspx | How to discover USB storage devices and writable CD/DVD drives (C#) How can I discover any USB storage devices and/or CD/DVD writers available at a given time (using C#.Net2.0). I would like to present users with a choice of devices onto which a file can be stored for physically removal - i.e. not the hard drive. | TITLE:
How to discover USB storage devices and writable CD/DVD drives (C#)
QUESTION:
How can I discover any USB storage devices and/or CD/DVD writers available at a given time (using C#.Net2.0). I would like to present users with a choice of devices onto which a file can be stored for physically removal - i.e. not the... | [
"c#",
".net-2.0"
] | 5 | 9 | 6,361 | 4 | 0 | 2008-09-09T11:28:30.423000 | 2008-09-09T11:46:05.780000 |
51,649 | 51,776 | How does off-the-shelf software fit in with agile development? | Maybe my understanding of agile development isn't as good as it should be, but I'm curious how an agile developer would potentially use off-the-shelf (OTS) software when the requirements and knowledge of what the final system should be are changing as rapidly as I understand them to (often after each iteration of devel... | Scenario1: This can occur regardless off the OTS nature of the component. Agile does not mean near-sighted.. you'd need to know the big chunks.. the framework bits and spend thinking time on it beforehand. That said, you can only build to what you know.. Delay only till the last responsible moment.Then you need to pick... | How does off-the-shelf software fit in with agile development? Maybe my understanding of agile development isn't as good as it should be, but I'm curious how an agile developer would potentially use off-the-shelf (OTS) software when the requirements and knowledge of what the final system should be are changing as rapid... | TITLE:
How does off-the-shelf software fit in with agile development?
QUESTION:
Maybe my understanding of agile development isn't as good as it should be, but I'm curious how an agile developer would potentially use off-the-shelf (OTS) software when the requirements and knowledge of what the final system should be are... | [
"agile"
] | 3 | 4 | 1,277 | 4 | 0 | 2008-09-09T11:31:03.977000 | 2008-09-09T12:48:37.440000 |
51,654 | 51,934 | (N)Hibernate - is it possible to dynamically map multiple tables to the one class | I have the situation where i use GIS software which stores the information about GIS objects into separate database table for each type/class of GIS object (road, river, building, sea,...) and keeps the metadata table in which it stores info about the class name and its DB table. Those GIS objects of different classes ... | @Brian Chiasson Unfortunately, it's not an option to create all classes of GIS data because classes are created dynamically in the application. Every GIS data of the same type should be a class, but my user has the possibility to get new set of data and put it in the database. I can't know in front which classes my use... | (N)Hibernate - is it possible to dynamically map multiple tables to the one class I have the situation where i use GIS software which stores the information about GIS objects into separate database table for each type/class of GIS object (road, river, building, sea,...) and keeps the metadata table in which it stores i... | TITLE:
(N)Hibernate - is it possible to dynamically map multiple tables to the one class
QUESTION:
I have the situation where i use GIS software which stores the information about GIS objects into separate database table for each type/class of GIS object (road, river, building, sea,...) and keeps the metadata table in... | [
"c#",
"nhibernate",
"hibernate",
"orm",
"gis"
] | 2 | 1 | 3,312 | 6 | 0 | 2008-09-09T11:34:07.510000 | 2008-09-09T13:50:33.017000 |
51,660 | 337,043 | Metamodelling tools | What tools are available for metamodelling? Especially for developing diagram editors, at the moment trying out Eclipse GMF Wondering what other options are out there? Any comparison available? | Your question is simply too broad for a single answer - due to many aspects. First, meta-modelling is not a set term, but rather a very fuzzy thing, including modelling models of models and reaching out to terms like MDA. Second, there are numerous options to developing diagram editors - going the Eclipse way is surely... | Metamodelling tools What tools are available for metamodelling? Especially for developing diagram editors, at the moment trying out Eclipse GMF Wondering what other options are out there? Any comparison available? | TITLE:
Metamodelling tools
QUESTION:
What tools are available for metamodelling? Especially for developing diagram editors, at the moment trying out Eclipse GMF Wondering what other options are out there? Any comparison available?
ANSWER:
Your question is simply too broad for a single answer - due to many aspects. Fi... | [
"model-driven"
] | 5 | 3 | 1,126 | 7 | 0 | 2008-09-09T11:38:54.893000 | 2008-12-03T13:11:40.110000 |
51,680 | 51,860 | Graph (Chart) Algorithm | Does anyone have a decent algorithm for calculating axis minima and maxima? When creating a chart for a given set of data items, I'd like to be able to give the algorithm: the maximum (y) value in the set the minimum (y) value in the set the number of tick marks to appear on the axis an optional value that must appear ... | I've been using the jQuery flot graph library. It's open source and does axis/tick generation quite well. I'd suggest looking at it's code and pinching some ideas from there. | Graph (Chart) Algorithm Does anyone have a decent algorithm for calculating axis minima and maxima? When creating a chart for a given set of data items, I'd like to be able to give the algorithm: the maximum (y) value in the set the minimum (y) value in the set the number of tick marks to appear on the axis an optional... | TITLE:
Graph (Chart) Algorithm
QUESTION:
Does anyone have a decent algorithm for calculating axis minima and maxima? When creating a chart for a given set of data items, I'd like to be able to give the algorithm: the maximum (y) value in the set the minimum (y) value in the set the number of tick marks to appear on th... | [
"algorithm",
"charts",
"graph"
] | 5 | 0 | 5,230 | 3 | 0 | 2008-09-09T11:48:24.057000 | 2008-09-09T13:22:44.347000 |
51,686 | 1,149,048 | Is it possible to deploy a native Delphi application with ClickOnce | Is it possible to deploy a native Delphi application with ClickOnce without a stub C# exe that would be used to launch the Delphi application? The same question applies to VB6, C++ and other native Windows applications. | Personally, I build my own mechanism to kick off self update process when my application timestamp is out of sync with the server. Not too difficult, but it's not a simple task. By the way, for Delphi you can use some thirdparty help: http://www.tmssoftware.com/site/wupdate.asp UPDATED: For my implementation: MyApp.EXE... | Is it possible to deploy a native Delphi application with ClickOnce Is it possible to deploy a native Delphi application with ClickOnce without a stub C# exe that would be used to launch the Delphi application? The same question applies to VB6, C++ and other native Windows applications. | TITLE:
Is it possible to deploy a native Delphi application with ClickOnce
QUESTION:
Is it possible to deploy a native Delphi application with ClickOnce without a stub C# exe that would be used to launch the Delphi application? The same question applies to VB6, C++ and other native Windows applications.
ANSWER:
Perso... | [
"delphi",
"deployment",
"clickonce"
] | 9 | 8 | 4,791 | 3 | 0 | 2008-09-09T11:53:07.353000 | 2009-07-19T01:35:06.913000 |
51,687 | 54,341 | Lightbox style dialogs in MFC App | Has anyone implemented Lightbox style background dimming on a modal dialog box in a MFC/non.net app. I think the procedure would have to be something like: steps: Get dialog parent HWND or CWnd* Get the rect of the parent window and draw an overlay with a translucency over that window allow the dialog to do it's modal ... | Here's what I did* based on Brian's links First create a dialog resource with the properties: border FALSE 3D look FALSE client edge FALSE Popup style static edge FALSE Transparent TRUE Title bar FALSE and you should end up with a dialog window with no frame or anything, just a grey box. override the Create function to... | Lightbox style dialogs in MFC App Has anyone implemented Lightbox style background dimming on a modal dialog box in a MFC/non.net app. I think the procedure would have to be something like: steps: Get dialog parent HWND or CWnd* Get the rect of the parent window and draw an overlay with a translucency over that window ... | TITLE:
Lightbox style dialogs in MFC App
QUESTION:
Has anyone implemented Lightbox style background dimming on a modal dialog box in a MFC/non.net app. I think the procedure would have to be something like: steps: Get dialog parent HWND or CWnd* Get the rect of the parent window and draw an overlay with a translucency... | [
"c++",
"user-interface",
"mfc"
] | 4 | 4 | 2,420 | 2 | 0 | 2008-09-09T11:53:23.360000 | 2008-09-10T15:13:03.387000 |
51,690 | 166,316 | Vista BEX error | Recently I got IE7 crashed on Vista on jar loading (presumably) with the following error: Problem signature: Problem Event Name: BEX Application Name: iexplore.exe Application Version: 7.0.6001.18000 Application Timestamp: 47918f11 Fault Module Name: ntdll.dll Fault Module Version: 6.0.6001.18000 Fault Module Timestamp... | BEX=Buffer overflow exception. See http://technet.microsoft.com/en-us/library/cc738483.aspx for details. However, c000000d is STATUS_INVALID_PARAMETER; the technet article talks primarily about status c0000005 or c0000409 (access violation/DEP) | Vista BEX error Recently I got IE7 crashed on Vista on jar loading (presumably) with the following error: Problem signature: Problem Event Name: BEX Application Name: iexplore.exe Application Version: 7.0.6001.18000 Application Timestamp: 47918f11 Fault Module Name: ntdll.dll Fault Module Version: 6.0.6001.18000 Fault ... | TITLE:
Vista BEX error
QUESTION:
Recently I got IE7 crashed on Vista on jar loading (presumably) with the following error: Problem signature: Problem Event Name: BEX Application Name: iexplore.exe Application Version: 7.0.6001.18000 Application Timestamp: 47918f11 Fault Module Name: ntdll.dll Fault Module Version: 6.0... | [
"winapi",
"windows-vista"
] | 6 | 4 | 25,965 | 5 | 0 | 2008-09-09T11:58:31.133000 | 2008-10-03T10:51:45.090000 |
51,700 | 51,737 | Property default values using Properties.Settings.Default | I am using.Net 2 and the normal way to store my settings. I store my custom object serialized to xml. I am trying to retrieve the default value of the property (but without reseting other properties). I use: ValuationInput valuationInput = (ValuationInput) Settings.Default.Properties["ValuationInput"].DefaultValue; But... | At some point, something, somewhere is going to have to use Xml Deserialization, whether it is you or a wrapper inside the settings class. You could always abstract it away in a method to remove the "ugly" code from your business logic. public static T FromXml (string xml) { XmlSerializer xmlser = new XmlSerializer(typ... | Property default values using Properties.Settings.Default I am using.Net 2 and the normal way to store my settings. I store my custom object serialized to xml. I am trying to retrieve the default value of the property (but without reseting other properties). I use: ValuationInput valuationInput = (ValuationInput) Setti... | TITLE:
Property default values using Properties.Settings.Default
QUESTION:
I am using.Net 2 and the normal way to store my settings. I store my custom object serialized to xml. I am trying to retrieve the default value of the property (but without reseting other properties). I use: ValuationInput valuationInput = (Val... | [
"c#",
".net",
"settings"
] | 0 | 2 | 5,072 | 2 | 0 | 2008-09-09T12:10:27.623000 | 2008-09-09T12:29:14.303000 |
51,701 | 51,730 | Mail Message Link Handling | I have written an AppleScript which when supplied with a Windows network link, will convert it to the correct smb:// equivalent for the server in our office, mount the network drive, and open the requested folder in Finder. I have this built in an application which just takes a pasted network path. Ideally I need this ... | In order to do this I think you'd need to create a Cocoa application that was registered with OS X Launch Services as the default role handler for smb:// links. I've written some stuff about how to do this on another question: How do you set your Cocoa application as the default web browser? If there's a pure AppleScri... | Mail Message Link Handling I have written an AppleScript which when supplied with a Windows network link, will convert it to the correct smb:// equivalent for the server in our office, mount the network drive, and open the requested folder in Finder. I have this built in an application which just takes a pasted network... | TITLE:
Mail Message Link Handling
QUESTION:
I have written an AppleScript which when supplied with a Windows network link, will convert it to the correct smb:// equivalent for the server in our office, mount the network drive, and open the requested folder in Finder. I have this built in an application which just take... | [
"macos",
"applescript"
] | 1 | 1 | 253 | 1 | 0 | 2008-09-09T12:10:44.817000 | 2008-09-09T12:26:54.323000 |
51,741 | 51,867 | Issue reading XML file into C# DataSet | I was given an.xml file that I needed to read into my code as a DataSet (as background, the file was created by creating a DataSet in C# and calling dataSet.WriteXml(file, XmlWriteMode.IgnoreSchema), but this was done by someone else). The.xml file was shaped like this: abcd efg hijk lmn Using C# and.NET 2.0, I read th... | This appears to be correct for your nested Foo tags: abcd efg hijk lmn So this correctly becomes 4 records in your result, with a parent-child key of "Foo-Id-0" Try: abcd efg hijk lmn Which should result in: Bar Foo Rec-Id abcd efg 0 hijk lmn 1 | Issue reading XML file into C# DataSet I was given an.xml file that I needed to read into my code as a DataSet (as background, the file was created by creating a DataSet in C# and calling dataSet.WriteXml(file, XmlWriteMode.IgnoreSchema), but this was done by someone else). The.xml file was shaped like this: abcd efg h... | TITLE:
Issue reading XML file into C# DataSet
QUESTION:
I was given an.xml file that I needed to read into my code as a DataSet (as background, the file was created by creating a DataSet in C# and calling dataSet.WriteXml(file, XmlWriteMode.IgnoreSchema), but this was done by someone else). The.xml file was shaped lik... | [
"c#",
".net",
"xml",
".net-2.0"
] | 6 | 4 | 4,157 | 2 | 0 | 2008-09-09T12:30:32.943000 | 2008-09-09T13:24:06.793000 |
51,751 | 51,778 | HTTP Errors with .Net 3.5 SP1 | I have a ASP.Net website that is failing on AJAX postbacks (both with ASP.Net AJAX and a 3rd part control) in IE. FireFox works fine. If I install the website on another machine without.Net 3.5 SP1, it works as expected. When it fails, Fiddler shows that I'm getting a 405 "Method Not Allowed". The form seems to be post... | SP1 changes the HtmlForm control so that it honors the action attribute, where previous versions ignored it. It sounds like you have something like this on the broken pages: Remove the action, and it should be fine: More info here: http://forums.asp.net/t/1305800.aspx | HTTP Errors with .Net 3.5 SP1 I have a ASP.Net website that is failing on AJAX postbacks (both with ASP.Net AJAX and a 3rd part control) in IE. FireFox works fine. If I install the website on another machine without.Net 3.5 SP1, it works as expected. When it fails, Fiddler shows that I'm getting a 405 "Method Not Allow... | TITLE:
HTTP Errors with .Net 3.5 SP1
QUESTION:
I have a ASP.Net website that is failing on AJAX postbacks (both with ASP.Net AJAX and a 3rd part control) in IE. FireFox works fine. If I install the website on another machine without.Net 3.5 SP1, it works as expected. When it fails, Fiddler shows that I'm getting a 405... | [
"asp.net",
".net-3.5"
] | 2 | 0 | 201 | 2 | 0 | 2008-09-09T12:35:35.943000 | 2008-09-09T12:49:06.423000 |
51,754 | 52,081 | SpecialCells in VSTO | I'm trying to use the SpecialCells method in a VSTO project using c# against the 3.5 framework and Excel2007. Here's my code: Excel.Worksheet myWs = (Excel.Worksheet)ModelWb.Worksheets[1];
Range myRange = myWs.get_Range("A7", "A800");
//Range rAccounts = myRange.SpecialCells(XlCellType.xlCellTypeConstants, XlSpecialC... | I figured it out... the worksheet was protected! myWs.Unprotect(Properties.Settings.Default.PasswordSheet); fixes it...for those playing along at home...don't forget to protect the sheet when you're done. myWs.Protect(Properties.Settings.Default.PasswordSheet, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Typ... | SpecialCells in VSTO I'm trying to use the SpecialCells method in a VSTO project using c# against the 3.5 framework and Excel2007. Here's my code: Excel.Worksheet myWs = (Excel.Worksheet)ModelWb.Worksheets[1];
Range myRange = myWs.get_Range("A7", "A800");
//Range rAccounts = myRange.SpecialCells(XlCellType.xlCellType... | TITLE:
SpecialCells in VSTO
QUESTION:
I'm trying to use the SpecialCells method in a VSTO project using c# against the 3.5 framework and Excel2007. Here's my code: Excel.Worksheet myWs = (Excel.Worksheet)ModelWb.Worksheets[1];
Range myRange = myWs.get_Range("A7", "A800");
//Range rAccounts = myRange.SpecialCells(XlC... | [
"vsto"
] | 3 | 0 | 1,248 | 1 | 0 | 2008-09-09T12:36:49.120000 | 2008-09-09T14:55:20.910000 |
51,768 | 51,803 | Print stack trace information from C# | As part of some error handling in our product, we'd like to dump some stack trace information. However, we experience that many users will simply take a screenshot of the error message dialog instead of sending us a copy of the full report available from the program, and thus I'd like to make some minimal stack trace i... | You should be able to get a StackTrace object instead of a string by saying var trace = new System.Diagnostics.StackTrace(exception); You can then look at the frames yourself without relying on the framework's formatting. See also: StackTrace reference | Print stack trace information from C# As part of some error handling in our product, we'd like to dump some stack trace information. However, we experience that many users will simply take a screenshot of the error message dialog instead of sending us a copy of the full report available from the program, and thus I'd l... | TITLE:
Print stack trace information from C#
QUESTION:
As part of some error handling in our product, we'd like to dump some stack trace information. However, we experience that many users will simply take a screenshot of the error message dialog instead of sending us a copy of the full report available from the progr... | [
"c#",
"parsing",
"error-handling",
"stack-trace"
] | 52 | 72 | 49,581 | 5 | 0 | 2008-09-09T12:45:34.140000 | 2008-09-09T13:01:01.107000 |
51,771 | 51,780 | The best way to validate XML in a unit test? | I have a class with a ToString method that produces XML. I want to unit test it to ensure it is producing valid xml. I have a DTD to validate the XML against. Should I include the DTD as a string within the unit test to avoid a dependency on it, or is there a smarter way to do this? | If your program validates the XML against the DTD during normal execution, then you should just get the DTD from wherever your program will get it. If not and the DTD is extremely short (only a few lines), then storing it as a string in your code is probably okay. Otherwise, I'd put it in an external file and have your... | The best way to validate XML in a unit test? I have a class with a ToString method that produces XML. I want to unit test it to ensure it is producing valid xml. I have a DTD to validate the XML against. Should I include the DTD as a string within the unit test to avoid a dependency on it, or is there a smarter way to ... | TITLE:
The best way to validate XML in a unit test?
QUESTION:
I have a class with a ToString method that produces XML. I want to unit test it to ensure it is producing valid xml. I have a DTD to validate the XML against. Should I include the DTD as a string within the unit test to avoid a dependency on it, or is there... | [
"xml",
"unit-testing",
"language-agnostic",
"dtd"
] | 10 | 6 | 9,400 | 3 | 0 | 2008-09-09T12:46:21.063000 | 2008-09-09T12:49:48.810000 |
51,781 | 51,802 | Haxe iteration on Dynamic | I have a variable of type Dynamic and I know for sure one of its fields, lets call it a, actually is an array. But when I'm writing var d: Dynamic = getDynamic(); for (t in d.a) { } I get a compilation error on line two: You can't iterate on a Dynamic value, please specify Iterator or Iterable How can I make this compi... | Haxe can't iterate over Dynamic variables (as the compiler says). You can make it work in several ways, where this one is probably easiest (depending on your situation): var d: {a:Array } = getDynamic(); for (t in d.a) {... } You could also change Dynamic to the type of the contents of the array. | Haxe iteration on Dynamic I have a variable of type Dynamic and I know for sure one of its fields, lets call it a, actually is an array. But when I'm writing var d: Dynamic = getDynamic(); for (t in d.a) { } I get a compilation error on line two: You can't iterate on a Dynamic value, please specify Iterator or Iterable... | TITLE:
Haxe iteration on Dynamic
QUESTION:
I have a variable of type Dynamic and I know for sure one of its fields, lets call it a, actually is an array. But when I'm writing var d: Dynamic = getDynamic(); for (t in d.a) { } I get a compilation error on line two: You can't iterate on a Dynamic value, please specify It... | [
"arrays",
"for-loop",
"loops",
"haxe",
"iterable"
] | 5 | 6 | 4,985 | 2 | 0 | 2008-09-09T12:51:05.017000 | 2008-09-09T13:00:59.407000 |
51,782 | 51,790 | How do I export the code documentation in C# / VisualStudio 2008? | I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on. Today I actually have to do so, but am having trouble finding out how. Is there something I'm missing? I want to go Menu->Build->Build Code Documentation,... | Actually it's in the project properties. Build tab, Output section, XML documentation file, and enter the filename. It will be built on every build of the project. After that you can build the actual help with Sandcastle. | How do I export the code documentation in C# / VisualStudio 2008? I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on. Today I actually have to do so, but am having trouble finding out how. Is there somethin... | TITLE:
How do I export the code documentation in C# / VisualStudio 2008?
QUESTION:
I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on. Today I actually have to do so, but am having trouble finding out how.... | [
"c#",
".net",
"visual-studio-2008",
"xml-documentation"
] | 21 | 30 | 23,801 | 7 | 0 | 2008-09-09T12:53:47.553000 | 2008-09-09T12:57:06.873000 |
51,783 | 51,816 | How to serialize a graph structure? | Flat files and relational databases give us a mechanism to serialize structured data. XML is superb for serializing un-structured tree-like data. But many problems are best represented by graphs. A thermal simulation program will, for instance, work with temperature nodes connected to each others through resistive edge... | How do you represent your graph in memory? Basically you have two (good) options: an adjacency list representation an adjacency matrix representation in which the adjacency list representation is best used for a sparse graph, and a matrix representation for the dense graphs. If you used suchs representations then you c... | How to serialize a graph structure? Flat files and relational databases give us a mechanism to serialize structured data. XML is superb for serializing un-structured tree-like data. But many problems are best represented by graphs. A thermal simulation program will, for instance, work with temperature nodes connected t... | TITLE:
How to serialize a graph structure?
QUESTION:
Flat files and relational databases give us a mechanism to serialize structured data. XML is superb for serializing un-structured tree-like data. But many problems are best represented by graphs. A thermal simulation program will, for instance, work with temperature... | [
"serialization",
"graph-theory"
] | 33 | 18 | 23,544 | 6 | 0 | 2008-09-09T12:54:05.087000 | 2008-09-09T13:04:14.093000 |
51,808 | 51,813 | Edit control on stack overflow | Is the edit control I'm typing in now, with all its buttons and rules freely available for use? My web project is also.Net based. | It's the WMD Markdown editor which is free and seems to be pretty easy to use. Just include the javascript for it and (in the easiest case), it just attaches to the first textarea it finds. Here's some info about the Perl implementation of Markdown which, according to the site, WMD is 100% compatible with. @Chris Upchu... | Edit control on stack overflow Is the edit control I'm typing in now, with all its buttons and rules freely available for use? My web project is also.Net based. | TITLE:
Edit control on stack overflow
QUESTION:
Is the edit control I'm typing in now, with all its buttons and rules freely available for use? My web project is also.Net based.
ANSWER:
It's the WMD Markdown editor which is free and seems to be pretty easy to use. Just include the javascript for it and (in the easies... | [
".net",
"asp.net",
"text-editor"
] | 4 | 9 | 800 | 3 | 0 | 2008-09-09T13:02:06.067000 | 2008-09-09T13:03:46.857000 |
51,827 | 51,848 | Is there a standard approach to generating sql dynamically? | I want to ask how other programmers are producing Dynamic SQL strings for execution as the CommandText of a SQLCommand object. I am producing parameterized queries containing user-generated WHERE clauses and SELECT fields. Sometimes the queries are complex and I need a lot of control over how the different parts are bu... | I had the need to do this on one of my recent projects. Here is the scheme that I am using for generating the SQL: Each component of the query is represented by an Object (which in my case is a Linq-to-Sql entity that maps to a table in the DB). So I have the following classes: Query, SelectColumn, Join, WhereCondition... | Is there a standard approach to generating sql dynamically? I want to ask how other programmers are producing Dynamic SQL strings for execution as the CommandText of a SQLCommand object. I am producing parameterized queries containing user-generated WHERE clauses and SELECT fields. Sometimes the queries are complex and... | TITLE:
Is there a standard approach to generating sql dynamically?
QUESTION:
I want to ask how other programmers are producing Dynamic SQL strings for execution as the CommandText of a SQLCommand object. I am producing parameterized queries containing user-generated WHERE clauses and SELECT fields. Sometimes the queri... | [
".net",
"sql"
] | 12 | 2 | 1,672 | 8 | 0 | 2008-09-09T13:08:30.730000 | 2008-09-09T13:18:13.173000 |
51,837 | 51,875 | Open one of a series of files using a batch file | I have up to 4 files based on this structure (note the prefixes are dates) 0830filename.txt 0907filename.txt 0914filename.txt 0921filename.txt I want to open the the most recent one (0921filename.txt). how can i do this in a batch file? Thanks. | This method uses the actual file modification date, to figure out which one is the latest file: @echo off for /F %%i in ('dir /B /O:-D *.txt') do ( call:open "%%i" exit /B 0 ):open start "dummy" "%~1" exit /B 0 This method, however, chooses the last file in alphabetic order (or the first one, in reverse-alphabetic orde... | Open one of a series of files using a batch file I have up to 4 files based on this structure (note the prefixes are dates) 0830filename.txt 0907filename.txt 0914filename.txt 0921filename.txt I want to open the the most recent one (0921filename.txt). how can i do this in a batch file? Thanks. | TITLE:
Open one of a series of files using a batch file
QUESTION:
I have up to 4 files based on this structure (note the prefixes are dates) 0830filename.txt 0907filename.txt 0914filename.txt 0921filename.txt I want to open the the most recent one (0921filename.txt). how can i do this in a batch file? Thanks.
ANSWER:... | [
"command-line",
"batch-file",
"dos",
"cmd"
] | 6 | 9 | 10,367 | 5 | 0 | 2008-09-09T13:12:31.313000 | 2008-09-09T13:27:14.617000 |
51,845 | 51,852 | Can MS Visual Studio compile projects using 2 or 4 cores on CPU? | Is it any compilator option of flag? | You can if you setup an external tool pointing to MsBuild to build the solution with the multiple process flag /m. Scott Hanselman wrote a nice post on how to accomplish this, so I won't repeat what he has already done. | Can MS Visual Studio compile projects using 2 or 4 cores on CPU? Is it any compilator option of flag? | TITLE:
Can MS Visual Studio compile projects using 2 or 4 cores on CPU?
QUESTION:
Is it any compilator option of flag?
ANSWER:
You can if you setup an external tool pointing to MsBuild to build the solution with the multiple process flag /m. Scott Hanselman wrote a nice post on how to accomplish this, so I won't repe... | [
"visual-studio"
] | 10 | 6 | 7,775 | 3 | 0 | 2008-09-09T13:17:02.333000 | 2008-09-09T13:19:51.047000 |
51,859 | 51,920 | Using Makefile instead of Solution/Project files under Visual Studio (2005) | Does anyone have experience using makefiles for Visual Studio C++ builds (under VS 2005) as opposed to using the project/solution setup. For us, the way that the project/solutions work is not intuitive and leads to configuruation explosion when you are trying to tweak builds with specific compile time flags. Under Unix... | I've found some benefits to makefiles with large projects, mainly related to unifying the location of the project settings. It's somewhat easier to manage the list of source files, include paths, preprocessor defines and so on, if they're all in a makefile or other build config file. With multiple configurations, addin... | Using Makefile instead of Solution/Project files under Visual Studio (2005) Does anyone have experience using makefiles for Visual Studio C++ builds (under VS 2005) as opposed to using the project/solution setup. For us, the way that the project/solutions work is not intuitive and leads to configuruation explosion when... | TITLE:
Using Makefile instead of Solution/Project files under Visual Studio (2005)
QUESTION:
Does anyone have experience using makefiles for Visual Studio C++ builds (under VS 2005) as opposed to using the project/solution setup. For us, the way that the project/solutions work is not intuitive and leads to configuruat... | [
"c++",
"visual-studio",
"makefile"
] | 11 | 5 | 10,021 | 5 | 0 | 2008-09-09T13:22:29.683000 | 2008-09-09T13:45:36.523000 |
51,870 | 51,878 | How to force my ASP.net 2.0 app to recompile | I have a ASP.net 2.0 app and I have made some changes the the source file ( cs files ). I uploaded the changes with the belief that it would auto-recompile. I also have the compiled dll in MY_APP/bin. I checked it and noticed that it did not recompile. Please understand I am new to this. | my #1 way to do this, add white space to the top of the web config file, after the xml declaration tag. It forces the node to re-cache and recompile. We even have a page deep in the admin called Flush.aspx that does it for us. | How to force my ASP.net 2.0 app to recompile I have a ASP.net 2.0 app and I have made some changes the the source file ( cs files ). I uploaded the changes with the belief that it would auto-recompile. I also have the compiled dll in MY_APP/bin. I checked it and noticed that it did not recompile. Please understand I am... | TITLE:
How to force my ASP.net 2.0 app to recompile
QUESTION:
I have a ASP.net 2.0 app and I have made some changes the the source file ( cs files ). I uploaded the changes with the belief that it would auto-recompile. I also have the compiled dll in MY_APP/bin. I checked it and noticed that it did not recompile. Plea... | [
"asp.net",
".net-2.0"
] | 7 | 10 | 7,287 | 4 | 0 | 2008-09-09T13:25:36.743000 | 2008-09-09T13:28:31.087000 |
51,871 | 51,916 | What is the best Visual Studio Plugin for Printing Code | Some of the features I think it must include are: Print Entire Solution Ability to print line numbers Proper choice of coding font and size to improve readability Nice Header Information Ability to print regions collapsed Couple feature additions: Automatically insert page breaks after methods/classes Keep long lines r... | I use PrettyCode.Print for.NET. It does everything on your list, and more. (I use it for printing code excerpts for copyright registration paperwork, which is similar to your escrow case.) It is a little slow to open a really big solution, but not unbearably so, and the output quality is excellent. | What is the best Visual Studio Plugin for Printing Code Some of the features I think it must include are: Print Entire Solution Ability to print line numbers Proper choice of coding font and size to improve readability Nice Header Information Ability to print regions collapsed Couple feature additions: Automatically in... | TITLE:
What is the best Visual Studio Plugin for Printing Code
QUESTION:
Some of the features I think it must include are: Print Entire Solution Ability to print line numbers Proper choice of coding font and size to improve readability Nice Header Information Ability to print regions collapsed Couple feature additions... | [
"visual-studio",
"visual-studio-extensions"
] | 11 | 13 | 7,132 | 3 | 0 | 2008-09-09T13:26:12.030000 | 2008-09-09T13:43:09.633000 |
51,925 | 51,930 | Recommendations regarding Continuous Integration systems | We are currently evaluating different applications that interface with Visual Studio 2008 (C#) and Subversion to do automated builds of our core libraries. We are hoping to have nightly builds performed and either email the list of changes made to each developer or have the latest versions be pushed to each workstation... | Cruise Control.net (ccnet) does everything you are looking for. Its pretty easy to use, just make sure if you are going to run it as a service, you give it an account and don't make it run as network service, that way you can give it rights on intranet boxes and have it do xcopy deploys. It has all kinds of email modes... | Recommendations regarding Continuous Integration systems We are currently evaluating different applications that interface with Visual Studio 2008 (C#) and Subversion to do automated builds of our core libraries. We are hoping to have nightly builds performed and either email the list of changes made to each developer ... | TITLE:
Recommendations regarding Continuous Integration systems
QUESTION:
We are currently evaluating different applications that interface with Visual Studio 2008 (C#) and Subversion to do automated builds of our core libraries. We are hoping to have nightly builds performed and either email the list of changes made ... | [
"visual-studio",
"svn",
"continuous-integration"
] | 8 | 11 | 1,626 | 9 | 0 | 2008-09-09T13:47:10.060000 | 2008-09-09T13:49:54.517000 |
51,927 | 66,753 | How to check if element in groovy array/hash/collection/list? | How do I figure out if an array contains an element? I thought there might be something like [1, 2, 3].includes(1) which would evaluate as true. | .contains() is the best method for lists, but for maps you will need to use.containsKey() or.containsValue() [a:1,b:2,c:3].containsValue(3) [a:1,b:2,c:3].containsKey('a') | How to check if element in groovy array/hash/collection/list? How do I figure out if an array contains an element? I thought there might be something like [1, 2, 3].includes(1) which would evaluate as true. | TITLE:
How to check if element in groovy array/hash/collection/list?
QUESTION:
How do I figure out if an array contains an element? I thought there might be something like [1, 2, 3].includes(1) which would evaluate as true.
ANSWER:
.contains() is the best method for lists, but for maps you will need to use.containsKe... | [
"arrays",
"list",
"groovy"
] | 158 | 159 | 310,643 | 8 | 0 | 2008-09-09T13:47:51.790000 | 2008-09-15T20:44:19.883000 |
51,941 | 91,978 | How do I create a status dialog box in Excel | I have created a database report generator in Excel. I am trying to create a dialog box that displays status information as the program runs. When I generate the report, although the dialog box appears, I cannot refresh/update the information it displays. Most of the time, the dialog box only partially appears. I have ... | The code below works well when performing actions within Excel (XP or later). For actions that take place outside Excel, for example connecting to a database and retrieving data the best this offers is the opportunity to show dialogs before and after the action (e.g. "Getting data", "Got data" ) Create a form called "f... | How do I create a status dialog box in Excel I have created a database report generator in Excel. I am trying to create a dialog box that displays status information as the program runs. When I generate the report, although the dialog box appears, I cannot refresh/update the information it displays. Most of the time, t... | TITLE:
How do I create a status dialog box in Excel
QUESTION:
I have created a database report generator in Excel. I am trying to create a dialog box that displays status information as the program runs. When I generate the report, although the dialog box appears, I cannot refresh/update the information it displays. M... | [
"excel",
"vba"
] | 3 | 4 | 28,007 | 5 | 0 | 2008-09-09T13:54:58.763000 | 2008-09-18T12:15:56.787000 |
51,949 | 52,009 | How to get file extension from string in C++ | Given a string "filename.conf", how to I verify the extension part? I need a cross platform solution. | You have to make sure you take care of file names with more then one dot. example: c:\.directoryname\file.name.with.too.many.dots.ext would not be handled correctly by strchr or find. My favorite would be the boost filesystem library that have an extension(path) function | How to get file extension from string in C++ Given a string "filename.conf", how to I verify the extension part? I need a cross platform solution. | TITLE:
How to get file extension from string in C++
QUESTION:
Given a string "filename.conf", how to I verify the extension part? I need a cross platform solution.
ANSWER:
You have to make sure you take care of file names with more then one dot. example: c:\.directoryname\file.name.with.too.many.dots.ext would not be... | [
"c++",
"string",
"filenames",
"file-extension"
] | 99 | 35 | 222,221 | 26 | 0 | 2008-09-09T13:57:34.107000 | 2008-09-09T14:27:16.157000 |
51,950 | 51,958 | How do I allow assembly (unit testing one) to access internal properties of another assembly? | I would like my Core assembly to not expose a certain class and I would still like to be able to test it. How can I do that? | InternalsVisibleTo attribute to the rescue! Just add: [assembly:InternalsVisibleToAttribute("UnitTestAssemblyName")] to your Core classes AssemblyInfo.cs file See Friend Assemblies (C# Programming Guide) for best practices. | How do I allow assembly (unit testing one) to access internal properties of another assembly? I would like my Core assembly to not expose a certain class and I would still like to be able to test it. How can I do that? | TITLE:
How do I allow assembly (unit testing one) to access internal properties of another assembly?
QUESTION:
I would like my Core assembly to not expose a certain class and I would still like to be able to test it. How can I do that?
ANSWER:
InternalsVisibleTo attribute to the rescue! Just add: [assembly:InternalsV... | [
".net",
"unit-testing"
] | 83 | 111 | 19,505 | 8 | 0 | 2008-09-09T13:58:03.153000 | 2008-09-09T13:59:55.380000 |
51,964 | 51,995 | How do I remove items from the query string for redirection? | In my base page I need to remove an item from the query string and redirect. I can't use Request.QueryString.Remove("foo") because the collection is read-only. Is there any way to get the query string (except for that one item) without iterating through the collection and re-building it? | You'd have to reconstruct the url and then redirect. Something like this: string url = Request.RawUrl;
NameValueCollection params = Request.QueryString; for (int i=0; i Anyway, I didn't test that or anything, but it should work (or at least get you in thye right direction) | How do I remove items from the query string for redirection? In my base page I need to remove an item from the query string and redirect. I can't use Request.QueryString.Remove("foo") because the collection is read-only. Is there any way to get the query string (except for that one item) without iterating through the c... | TITLE:
How do I remove items from the query string for redirection?
QUESTION:
In my base page I need to remove an item from the query string and redirect. I can't use Request.QueryString.Remove("foo") because the collection is read-only. Is there any way to get the query string (except for that one item) without itera... | [
"c#",
"asp.net",
"webforms"
] | 8 | 8 | 19,192 | 10 | 0 | 2008-09-09T14:03:13.673000 | 2008-09-09T14:21:42.223000 |
51,969 | 51,977 | How to detect READ_COMMITTED_SNAPSHOT is enabled? | In Microsoft SQL Server, is there a way to detect whether a database has had its isolation level set via the T-SQL command ALTER DATABASE SET READ_COMMITTED_SNAPSHOT ON;? I cannot find a simple way to detect this in either T-SQL or via the Management Studio's GUI. | SELECT is_read_committed_snapshot_on FROM sys.databases WHERE name= 'YourDatabase' Return value: 1: READ_COMMITTED_SNAPSHOT option is ON. Read operations under the READ COMMITTED isolation level are based on snapshot scans and do not acquire locks. 0 (default): READ_COMMITTED_SNAPSHOT option is OFF. Read operations und... | How to detect READ_COMMITTED_SNAPSHOT is enabled? In Microsoft SQL Server, is there a way to detect whether a database has had its isolation level set via the T-SQL command ALTER DATABASE SET READ_COMMITTED_SNAPSHOT ON;? I cannot find a simple way to detect this in either T-SQL or via the Management Studio's GUI. | TITLE:
How to detect READ_COMMITTED_SNAPSHOT is enabled?
QUESTION:
In Microsoft SQL Server, is there a way to detect whether a database has had its isolation level set via the T-SQL command ALTER DATABASE SET READ_COMMITTED_SNAPSHOT ON;? I cannot find a simple way to detect this in either T-SQL or via the Management S... | [
"sql-server",
"isolation-level",
"read-committed-snapshot"
] | 147 | 218 | 135,359 | 3 | 0 | 2008-09-09T14:07:11.823000 | 2008-09-09T14:10:50.580000 |
51,988 | 3,448,945 | What work has been done on cross-platform mobile development? | Have any well-documented or open source projects targeted iPhone, Blackberry, and Android? Are there other platforms which are better-suited to such an endeavor? Note that I am particularly asking about client-side software, not web apps, though any information about the difficulties of using web apps across multiple m... | The HTML5 standard has support for releasing stand-alone HTML5 apps. Essentially a HTML5 app is a bundle of HTML5, JavaScript and CSS files that will run stand-alone in the browser of the desktop or device. You can distribute them like any other program, including selling them on the iStore for the iPhone. The support ... | What work has been done on cross-platform mobile development? Have any well-documented or open source projects targeted iPhone, Blackberry, and Android? Are there other platforms which are better-suited to such an endeavor? Note that I am particularly asking about client-side software, not web apps, though any informat... | TITLE:
What work has been done on cross-platform mobile development?
QUESTION:
Have any well-documented or open source projects targeted iPhone, Blackberry, and Android? Are there other platforms which are better-suited to such an endeavor? Note that I am particularly asking about client-side software, not web apps, t... | [
"iphone",
"android",
"blackberry",
"mobile",
"webos"
] | 89 | 46 | 20,222 | 17 | 0 | 2008-09-09T14:18:23.543000 | 2010-08-10T12:35:10.697000 |
52,008 | 267,894 | Options for PivotTables in Excel | I need to design a small project for generating excel reports in.NET, which will be sent to users to use. The excel reports will contain PivotTables. I don't have much experience with them, but I can think of three implementation alternatives: Set a query for it, populate it, send it disconnected. This way the user wil... | Since it's a small project, you can rely on Excel for data storage from the application. It'll be easier to develop and test, and simpler to maintain. | Options for PivotTables in Excel I need to design a small project for generating excel reports in.NET, which will be sent to users to use. The excel reports will contain PivotTables. I don't have much experience with them, but I can think of three implementation alternatives: Set a query for it, populate it, send it di... | TITLE:
Options for PivotTables in Excel
QUESTION:
I need to design a small project for generating excel reports in.NET, which will be sent to users to use. The excel reports will contain PivotTables. I don't have much experience with them, but I can think of three implementation alternatives: Set a query for it, popul... | [
".net",
"excel",
"vsto",
"pivot-table"
] | 0 | 0 | 327 | 5 | 0 | 2008-09-09T14:26:39.310000 | 2008-11-06T07:56:35.063000 |
52,022 | 52,042 | Getting a list of assemblies needed by application | Is there a way of getting all required assemblies (excluding the.net framework) for a.net project into a folder ready to be packaged into an nsis as setup file? I've tried writing a small console app that uses reflection to get a list of dlls but have got stuck with finding a foolproof way of determining if a dll is fr... | In Visual Studio (2005 at least - what I'm using right now), each reference that you have associated to a project has a property called "Copy Local", this can be set to true/false. When true it will copy the dll's for you into the current configuration directory. | Getting a list of assemblies needed by application Is there a way of getting all required assemblies (excluding the.net framework) for a.net project into a folder ready to be packaged into an nsis as setup file? I've tried writing a small console app that uses reflection to get a list of dlls but have got stuck with fi... | TITLE:
Getting a list of assemblies needed by application
QUESTION:
Is there a way of getting all required assemblies (excluding the.net framework) for a.net project into a folder ready to be packaged into an nsis as setup file? I've tried writing a small console app that uses reflection to get a list of dlls but have... | [
".net",
"reflection",
"assemblies",
"dependencies",
"nsis"
] | 1 | 1 | 1,027 | 3 | 0 | 2008-09-09T14:34:29.010000 | 2008-09-09T14:39:24.833000 |
52,046 | 52,056 | Accessing a web service in a Flash CS3 AS3 project | Since CS3 doesn't have a web service component, as previous versions had, is there a good, feature-complete, AS3-only (no Flex dependencies) library for accessing web services with AS3? | You may want to check out http://alducente.wordpress.com/2007/10/27/web-service-in-as3-release-10/ | Accessing a web service in a Flash CS3 AS3 project Since CS3 doesn't have a web service component, as previous versions had, is there a good, feature-complete, AS3-only (no Flex dependencies) library for accessing web services with AS3? | TITLE:
Accessing a web service in a Flash CS3 AS3 project
QUESTION:
Since CS3 doesn't have a web service component, as previous versions had, is there a good, feature-complete, AS3-only (no Flex dependencies) library for accessing web services with AS3?
ANSWER:
You may want to check out http://alducente.wordpress.com... | [
"flash",
"actionscript-3",
"web-services"
] | 2 | 3 | 4,703 | 2 | 0 | 2008-09-09T14:40:34.097000 | 2008-09-09T14:43:52.937000 |
52,059 | 67,025 | What is the best source for information on COM error codes? | I'm at a loss for where to get the best information about the meaning, likely causes, and possible solutions to resolve COM errors when all you have is the HRESULT. Searching Google for terms like '80004027' is just about useless as it sends you to random discussion groups where 90% of the time, the question 'What does... | I always use WinError.h. That has the vast majority of Windows error codes of all sorts. A key indicator to look out for is the Facility part of the code: the second most-significant byte. That is, 0x80nnmmmm, where nn is the Facility. That tells you which component generated the code. Anything with a facility of 7 is ... | What is the best source for information on COM error codes? I'm at a loss for where to get the best information about the meaning, likely causes, and possible solutions to resolve COM errors when all you have is the HRESULT. Searching Google for terms like '80004027' is just about useless as it sends you to random disc... | TITLE:
What is the best source for information on COM error codes?
QUESTION:
I'm at a loss for where to get the best information about the meaning, likely causes, and possible solutions to resolve COM errors when all you have is the HRESULT. Searching Google for terms like '80004027' is just about useless as it sends ... | [
"windows",
"com"
] | 5 | 6 | 3,155 | 4 | 0 | 2008-09-09T14:47:49.417000 | 2008-09-15T21:12:49.860000 |
52,066 | 181,870 | Dynamic regex for date-time formats | Is there an existing solution to create a regular expressions dynamically out of a given date-time format pattern? The supported date-time format pattern does not matter (Joda DateTimeFormat, java.text.SimpleDateTimeFormat or others). As a specific example, for a given date-time format like dd/MM/yyyy hh:mm, it should ... | I guess you have a limited alphabet that your time formats can be constructed of. That means, "HH" would always be "hours" on the 24-hour clock, "dd" always the day with leading zero, and so on. Because of the sequential nature of a time format, you could try to tokenize a format string of "dd/mm/yyyy HH:nn" into an ar... | Dynamic regex for date-time formats Is there an existing solution to create a regular expressions dynamically out of a given date-time format pattern? The supported date-time format pattern does not matter (Joda DateTimeFormat, java.text.SimpleDateTimeFormat or others). As a specific example, for a given date-time form... | TITLE:
Dynamic regex for date-time formats
QUESTION:
Is there an existing solution to create a regular expressions dynamically out of a given date-time format pattern? The supported date-time format pattern does not matter (Joda DateTimeFormat, java.text.SimpleDateTimeFormat or others). As a specific example, for a gi... | [
"regex",
"datetime",
"information-retrieval"
] | 5 | 3 | 8,315 | 4 | 0 | 2008-09-09T14:50:20.580000 | 2008-10-08T08:49:16.447000 |
52,072 | 52,203 | Inversion of Control Container for PHP? | I am trying to code TDD style in PHP and one of my biggest stumbling blocks (other than lack of a decent IDE) is that I have to make my own hacked together IoC container just to inject all my mock objects properly. Has anyone used an Ioc container in PHP? All I've been able to find is PHP IOC on the ever-annoying phpcl... | I played with some DI Frameworks for PHP, but I haven't used one in production. Have some links: http://www.stubbles.net/ which I think is the oldest I tried http://php.xjconf.net/ FLOW3 - I belive this one will become a very nice framework (its beta right now) You mentioned you would use it for TDD - so maybe have a l... | Inversion of Control Container for PHP? I am trying to code TDD style in PHP and one of my biggest stumbling blocks (other than lack of a decent IDE) is that I have to make my own hacked together IoC container just to inject all my mock objects properly. Has anyone used an Ioc container in PHP? All I've been able to fi... | TITLE:
Inversion of Control Container for PHP?
QUESTION:
I am trying to code TDD style in PHP and one of my biggest stumbling blocks (other than lack of a decent IDE) is that I have to make my own hacked together IoC container just to inject all my mock objects properly. Has anyone used an Ioc container in PHP? All I'... | [
"php",
"frameworks"
] | 20 | 8 | 12,080 | 7 | 0 | 2008-09-09T14:51:12.857000 | 2008-09-09T15:41:47.413000 |
52,080 | 52,101 | How do I build a loop in JavaScript? | How can I build a loop in JavaScript? | For loops for (i = startValue; i <= endValue; i++) { // Before the loop: i is set to startValue // After each iteration of the loop: i++ is executed // The loop continues as long as i <= endValue is true } For...in loops for (i in things) { // If things is an array, i will usually contain the array keys *not advised* /... | How do I build a loop in JavaScript? How can I build a loop in JavaScript? | TITLE:
How do I build a loop in JavaScript?
QUESTION:
How can I build a loop in JavaScript?
ANSWER:
For loops for (i = startValue; i <= endValue; i++) { // Before the loop: i is set to startValue // After each iteration of the loop: i++ is executed // The loop continues as long as i <= endValue is true } For...in loo... | [
"javascript",
"loops"
] | 11 | 31 | 20,116 | 4 | 0 | 2008-09-09T14:55:10.413000 | 2008-09-09T15:05:00.387000 |
52,084 | 52,097 | Querying XML columns in SQLServer 2005 | There is a field in my company's "Contacts" table. In that table, there is an XML type column. The column holds misc data about a particular contact. EG. 123456 a piece of custom data The tags below contact can be different for each contact, and I must query these fragments alongside the relational data columns in the ... | I've found the msdn xml best practices helpful for working with xml blob columns, might provide some inspiration... http://msdn.microsoft.com/en-us/library/ms345115.aspx#sql25xmlbp_topic4 | Querying XML columns in SQLServer 2005 There is a field in my company's "Contacts" table. In that table, there is an XML type column. The column holds misc data about a particular contact. EG. 123456 a piece of custom data The tags below contact can be different for each contact, and I must query these fragments alongs... | TITLE:
Querying XML columns in SQLServer 2005
QUESTION:
There is a field in my company's "Contacts" table. In that table, there is an XML type column. The column holds misc data about a particular contact. EG. 123456 a piece of custom data The tags below contact can be different for each contact, and I must query thes... | [
"sql-server",
"xml",
"xquery"
] | 3 | 1 | 9,610 | 5 | 0 | 2008-09-09T14:57:01.657000 | 2008-09-09T15:02:32.750000 |
52,092 | 52,137 | Why the claim that C# people don't get object-oriented programming? (vs class-oriented) | This caught my attention last night. On the latest ALT.NET Podcast Scott Bellware discusses how as opposed to Ruby, languages like C#, Java et al. are not truly object oriented rather opting for the phrase "class-oriented". They talk about this distinction in very vague terms without going into much detail or discussin... | The duck typing comments here are more attributing to the fact that Ruby and Python are more dynamic than C#. It doesn't really have anything to do with it's OO Nature. What (I think) Bellware meant by that is that in Ruby, everything is an object. Even a class. A class definition is an instance of an object. As such, ... | Why the claim that C# people don't get object-oriented programming? (vs class-oriented) This caught my attention last night. On the latest ALT.NET Podcast Scott Bellware discusses how as opposed to Ruby, languages like C#, Java et al. are not truly object oriented rather opting for the phrase "class-oriented". They tal... | TITLE:
Why the claim that C# people don't get object-oriented programming? (vs class-oriented)
QUESTION:
This caught my attention last night. On the latest ALT.NET Podcast Scott Bellware discusses how as opposed to Ruby, languages like C#, Java et al. are not truly object oriented rather opting for the phrase "class-o... | [
"oop",
"programming-languages"
] | 16 | 15 | 3,678 | 14 | 0 | 2008-09-09T15:00:13.253000 | 2008-09-09T15:19:32.663000 |
52,098 | 52,116 | How do you navigate out of a ComboBox on a Windows Mobile Device without a TAB key? | I'm developing an application for Windows Mobile Devices using Visual Studio.NET 2008 whose UI requires the use of a ComboBox control. Unfortunately, for devices with neither a hardware fullsize keyboard nor a touchscreen interface, there is no way to move (tab) from the ComboBox control to another control on the same ... | I believe directionals are only captured on KeyDown and KeyUp, not on KeyPress. Alternatively to using a ComboBox, you could use several RadioButtons if the numer of ListItems is static and relatively small. | How do you navigate out of a ComboBox on a Windows Mobile Device without a TAB key? I'm developing an application for Windows Mobile Devices using Visual Studio.NET 2008 whose UI requires the use of a ComboBox control. Unfortunately, for devices with neither a hardware fullsize keyboard nor a touchscreen interface, the... | TITLE:
How do you navigate out of a ComboBox on a Windows Mobile Device without a TAB key?
QUESTION:
I'm developing an application for Windows Mobile Devices using Visual Studio.NET 2008 whose UI requires the use of a ComboBox control. Unfortunately, for devices with neither a hardware fullsize keyboard nor a touchscr... | [
"windows-mobile",
"mobile"
] | 0 | 1 | 645 | 2 | 0 | 2008-09-09T15:02:51.907000 | 2008-09-09T15:11:17.813000 |
52,103 | 52,106 | Can I use SQL Server Management Studio 2005 for 2008 DB? | I am looking to manage a SQL Server 2008 DB using Management Studio 2005. The reason for this is because our server is a 64-bit machine and we only have the 64-bit version of the software. Is this possible? How about managing a SQL Server 2005 DB using Management Studio 2008? | UPDATE: You can use Cumulative update package 5 for SQL Server 2005 Service Pack 2 to connect to 2008. FIX: 50002151 946127 ( http://support.microsoft.com/kb/946127/ ) FIX: You may experience problems when you use SQL Server Management Studio in SQL Server 2005 to connect to an instance of SQL Server 2008 | Can I use SQL Server Management Studio 2005 for 2008 DB? I am looking to manage a SQL Server 2008 DB using Management Studio 2005. The reason for this is because our server is a 64-bit machine and we only have the 64-bit version of the software. Is this possible? How about managing a SQL Server 2005 DB using Management... | TITLE:
Can I use SQL Server Management Studio 2005 for 2008 DB?
QUESTION:
I am looking to manage a SQL Server 2008 DB using Management Studio 2005. The reason for this is because our server is a 64-bit machine and we only have the 64-bit version of the software. Is this possible? How about managing a SQL Server 2005 D... | [
"sql-server-2008",
"sql-server-2005",
"ssms"
] | 24 | 21 | 64,366 | 4 | 0 | 2008-09-09T15:05:53.210000 | 2008-09-09T15:07:01.443000 |
52,108 | 52,126 | What is the shortcut to open a file within your solution in Visual Studio 2008? | What is the shortcut to open a file within your solution in Visual Studio 2008 (+ Resharper)? | Ctrl + T (ReSharper, Goto, type) will open a class file for you. Looks like Ctrl + Shift + T opens files. | What is the shortcut to open a file within your solution in Visual Studio 2008? What is the shortcut to open a file within your solution in Visual Studio 2008 (+ Resharper)? | TITLE:
What is the shortcut to open a file within your solution in Visual Studio 2008?
QUESTION:
What is the shortcut to open a file within your solution in Visual Studio 2008 (+ Resharper)?
ANSWER:
Ctrl + T (ReSharper, Goto, type) will open a class file for you. Looks like Ctrl + Shift + T opens files. | [
"visual-studio",
"keyboard-shortcuts",
"resharper"
] | 5 | 12 | 3,632 | 5 | 0 | 2008-09-09T15:07:38.713000 | 2008-09-09T15:15:01.800000 |
52,112 | 52,114 | Extracting SVN data with Java | Does anyone know a good Java lib that will hook into SVN so I can extract the data? I want the SVN comments, author, path, etc... Hopefully with this data I can build a better time management tracking system. | You want SVNKit. It's dual-licensed, so you have to pay only if you're doing commercial work with it. | Extracting SVN data with Java Does anyone know a good Java lib that will hook into SVN so I can extract the data? I want the SVN comments, author, path, etc... Hopefully with this data I can build a better time management tracking system. | TITLE:
Extracting SVN data with Java
QUESTION:
Does anyone know a good Java lib that will hook into SVN so I can extract the data? I want the SVN comments, author, path, etc... Hopefully with this data I can build a better time management tracking system.
ANSWER:
You want SVNKit. It's dual-licensed, so you have to pa... | [
"java",
"svn"
] | 5 | 4 | 467 | 2 | 0 | 2008-09-09T15:09:08.087000 | 2008-09-09T15:10:48.923000 |
52,134 | 52,161 | Determining if an assembly is part of the .NET framework | How can I tell from the assembly name, or assembly class (or others like it), whether an assembly is part of the.NET framework (that is, System.windows.Forms )? So far I've considered the PublicKeyToken, and CodeBase properties, but these are not always the same for the whole framework. The reason I want this informati... | I suspect that the method both most reliable and most general is going to be the PublicKeyToken. Yes, there's more than one, but it's going to be a finite list and one that doesn't change very often. For that matter, you could just have a whitelist of assembly names -- that list, too, will be both finite and static bet... | Determining if an assembly is part of the .NET framework How can I tell from the assembly name, or assembly class (or others like it), whether an assembly is part of the.NET framework (that is, System.windows.Forms )? So far I've considered the PublicKeyToken, and CodeBase properties, but these are not always the same ... | TITLE:
Determining if an assembly is part of the .NET framework
QUESTION:
How can I tell from the assembly name, or assembly class (or others like it), whether an assembly is part of the.NET framework (that is, System.windows.Forms )? So far I've considered the PublicKeyToken, and CodeBase properties, but these are no... | [
".net",
"reflection",
"frameworks",
"assemblies"
] | 20 | 3 | 4,329 | 7 | 0 | 2008-09-09T15:18:14.583000 | 2008-09-09T15:30:19.640000 |
52,140 | 52,150 | What are the (technical) pros and cons of Flash vs AJAX/JS? | We provide a web application with a frontend completely developed in Adobe Flash. When we chose Flash 6 years ago, we did so for its large number of features for user interaction, like dragging stuff, opening and closing menus, tree navigation elements, popup dialogs etc. Today it's obvious that AJAX/JS offers roughly ... | Correctly designed AJAX apps are more googleable than Flash Correctly designed AJAX apps are more easily deep linkable than Flash AJAX doesn't require a plugin (Flash is pretty ubiquitous, so it's not really a big deal)* AJAX isn't controlled by a single company the way Flash is Edited to add: * Except for the iPhone, ... | What are the (technical) pros and cons of Flash vs AJAX/JS? We provide a web application with a frontend completely developed in Adobe Flash. When we chose Flash 6 years ago, we did so for its large number of features for user interaction, like dragging stuff, opening and closing menus, tree navigation elements, popup ... | TITLE:
What are the (technical) pros and cons of Flash vs AJAX/JS?
QUESTION:
We provide a web application with a frontend completely developed in Adobe Flash. When we chose Flash 6 years ago, we did so for its large number of features for user interaction, like dragging stuff, opening and closing menus, tree navigatio... | [
"ajax",
"flash",
"ria"
] | 6 | 3 | 1,113 | 11 | 0 | 2008-09-09T15:20:26.153000 | 2008-09-09T15:25:14.583000 |
52,160 | 52,243 | VB6 Runtime Type Retrieval | How can you obtain the Type (the name as a string is sufficient) of an Object in VB6 at runtime? i.e. something like: If Typeof(foobar) = "CommandButton" Then... /EDIT: to clarify, I need to check on Dynamically Typed objects. An example: Dim y As Object
Set y = CreateObject("SomeType")
Debug.Print( y) Where the outp... | I think what you are looking for is TypeName rather than TypeOf. If TypeName(foobar) = "CommandButton" Then DoSomething End If Edit: What do you mean Dynamic Objects? Do you mean objects created with CreateObject(""), cause that should still work. Edit: Private Sub Command1_Click() Dim oObject As Object Set oObject = C... | VB6 Runtime Type Retrieval How can you obtain the Type (the name as a string is sufficient) of an Object in VB6 at runtime? i.e. something like: If Typeof(foobar) = "CommandButton" Then... /EDIT: to clarify, I need to check on Dynamically Typed objects. An example: Dim y As Object
Set y = CreateObject("SomeType")
Deb... | TITLE:
VB6 Runtime Type Retrieval
QUESTION:
How can you obtain the Type (the name as a string is sufficient) of an Object in VB6 at runtime? i.e. something like: If Typeof(foobar) = "CommandButton" Then... /EDIT: to clarify, I need to check on Dynamically Typed objects. An example: Dim y As Object
Set y = CreateObjec... | [
"vb6",
"runtime"
] | 6 | 8 | 3,962 | 4 | 0 | 2008-09-09T15:29:16.507000 | 2008-09-09T16:04:01.043000 |
52,172 | 52,196 | Unmovable Files on Windows XP | When I defragment my XP machine I notice that there is a block of "Unmovable Files". Is there a file attribute I can use to make my own files unmovable? Just to clarify, I want a way to programmatically tell Windows that a file that I create should be unmovable. Is this possible, and if so, how can I do it? Thanks, Ter... | A lot of system files cannot be moved after the system boots, such as the page file and registry database files. This utility runs before Windows boots to defragment those files. I have it set to run at every boot, and it works well for me on several machines. Note that the very first time you boot up with this utility... | Unmovable Files on Windows XP When I defragment my XP machine I notice that there is a block of "Unmovable Files". Is there a file attribute I can use to make my own files unmovable? Just to clarify, I want a way to programmatically tell Windows that a file that I create should be unmovable. Is this possible, and if so... | TITLE:
Unmovable Files on Windows XP
QUESTION:
When I defragment my XP machine I notice that there is a block of "Unmovable Files". Is there a file attribute I can use to make my own files unmovable? Just to clarify, I want a way to programmatically tell Windows that a file that I create should be unmovable. Is this p... | [
"windows",
"filesystems"
] | 3 | 9 | 8,506 | 9 | 0 | 2008-09-09T15:32:44.580000 | 2008-09-09T15:38:59.993000 |
52,187 | 74,517 | Virtual Serial Port for Linux | I need to test a serial port application on Linux, however, my test machine only has one serial port. Is there a way to add a virtual serial port to Linux and test my application by emulating a device through a shell or script? Note: I cannot remap the port, it hard coded on ttys2 and I need to test the application as ... | You can use a pty ("pseudo-teletype", where a serial port is a "real teletype") for this. From one end, open /dev/ptyp5, and then attach your program to /dev/ttyp5; ttyp5 will act just like a serial port, but will send/receive everything it does via /dev/ptyp5. If you really need it to talk to a file called /dev/ttys2,... | Virtual Serial Port for Linux I need to test a serial port application on Linux, however, my test machine only has one serial port. Is there a way to add a virtual serial port to Linux and test my application by emulating a device through a shell or script? Note: I cannot remap the port, it hard coded on ttys2 and I ne... | TITLE:
Virtual Serial Port for Linux
QUESTION:
I need to test a serial port application on Linux, however, my test machine only has one serial port. Is there a way to add a virtual serial port to Linux and test my application by emulating a device through a shell or script? Note: I cannot remap the port, it hard coded... | [
"linux",
"serial-port",
"virtual-serial-port"
] | 190 | 88 | 266,657 | 10 | 0 | 2008-09-09T15:36:19.940000 | 2008-09-16T16:56:55.927000 |
52,234 | 52,242 | Creating a Patch with TFS | Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select Create Patch. But for the life of me, I can't find this functionality in TFS. Is this possible? If not, what's the standard way to submit patches in open source TFS hosted projects (a la CodePlex)? | tf diff /shelveset:shelveset /format:unified Edit: This writes to standard output. You can pipe the output to a file. For more options, see Difference Command. | Creating a Patch with TFS Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select Create Patch. But for the life of me, I can't find this functionality in TFS. Is this possible? If not, what's the standard way to submit patches in open source TFS hosted projects (a la CodePlex)? | TITLE:
Creating a Patch with TFS
QUESTION:
Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select Create Patch. But for the life of me, I can't find this functionality in TFS. Is this possible? If not, what's the standard way to submit patches in open source TFS hosted projects (a la Co... | [
"version-control",
"tfs",
"patch"
] | 62 | 56 | 18,110 | 3 | 0 | 2008-09-09T15:57:38.017000 | 2008-09-09T16:03:42.667000 |
52,239 | 52,244 | How to recover or change Oracle sysdba password | We are working with an oracle database in which the person that set it up is "long gone" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords? | Have you tried logging into Linux as your installed Oracle user then sqlplus "/ as sysdba" When you log in you'll be able to change your password. alter user sys identified by; Good luck:) | How to recover or change Oracle sysdba password We are working with an oracle database in which the person that set it up is "long gone" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords? | TITLE:
How to recover or change Oracle sysdba password
QUESTION:
We are working with an oracle database in which the person that set it up is "long gone" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords?
ANSWE... | [
"linux",
"oracle",
"authentication",
"passwords",
"sysdba"
] | 16 | 29 | 34,148 | 2 | 0 | 2008-09-09T15:58:37.547000 | 2008-09-09T16:05:00.587000 |
52,256 | 52,265 | How to check if a given user is a member of the built-in Administrators group? | I need to check programmatically (in.NET) whether a given user (domain account) is a member of the built-in Administrators group on a current computer (the one where the application gets executed). Is it possible? | I don't know about.Net, but in win32, the easy way is to call IsUserAnAdmin(). If you need more control, you can open the process token and check with CheckTokenMembership for each group you need to check Edit: See pinvoke.net for.NET sample code (Thanks chopeen) | How to check if a given user is a member of the built-in Administrators group? I need to check programmatically (in.NET) whether a given user (domain account) is a member of the built-in Administrators group on a current computer (the one where the application gets executed). Is it possible? | TITLE:
How to check if a given user is a member of the built-in Administrators group?
QUESTION:
I need to check programmatically (in.NET) whether a given user (domain account) is a member of the built-in Administrators group on a current computer (the one where the application gets executed). Is it possible?
ANSWER:
... | [
".net",
"security"
] | 2 | 2 | 1,731 | 4 | 0 | 2008-09-09T16:09:23.043000 | 2008-09-09T16:13:38.867000 |
52,286 | 52,309 | iTunes warning message on quit due to scripting | Wrote the following in PowersHell as a quick iTunes demonstration: $iTunes = New-Object -ComObject iTunes.Application $LibrarySource = $iTunes.LibrarySource foreach ($PList in $LibrarySource.Playlists) { write-host $PList.name } This works well and pulls back a list of playlist names. However on trying to close iTunes ... | Here is one thing that I did on my a Powershell script that adds podcasts to iTunes. I use Juice on a server to download all the podcasts that I listen to. The script uses.Net methods to release the COM objects. When I wrote my iTunes script I had read a couple of articles that stated you should release your COM object... | iTunes warning message on quit due to scripting Wrote the following in PowersHell as a quick iTunes demonstration: $iTunes = New-Object -ComObject iTunes.Application $LibrarySource = $iTunes.LibrarySource foreach ($PList in $LibrarySource.Playlists) { write-host $PList.name } This works well and pulls back a list of pl... | TITLE:
iTunes warning message on quit due to scripting
QUESTION:
Wrote the following in PowersHell as a quick iTunes demonstration: $iTunes = New-Object -ComObject iTunes.Application $LibrarySource = $iTunes.LibrarySource foreach ($PList in $LibrarySource.Playlists) { write-host $PList.name } This works well and pulls... | [
"powershell",
"itunes"
] | 3 | 4 | 5,259 | 2 | 0 | 2008-09-09T16:27:56.070000 | 2008-09-09T16:34:28.537000 |
52,290 | 52,478 | Templates of Technical and Functional Specs | I am looking for good templates for writing both technical and functional specs on a project or work request. What do you use? How deep do you get while writing the specs? What general tips should I be aware of? My company needs these badly. Currently we do not use these documents at all. Edit I have read Joel's take a... | On general tips; We are implementing a process of 1) Business Requirements Statement (BRS) 2) Functional Specification 3) Technical specification The BRS covers what the business problems are, and what the requirements are around solutions, testing, security, reliability and delivery. This defines what would make a suc... | Templates of Technical and Functional Specs I am looking for good templates for writing both technical and functional specs on a project or work request. What do you use? How deep do you get while writing the specs? What general tips should I be aware of? My company needs these badly. Currently we do not use these docu... | TITLE:
Templates of Technical and Functional Specs
QUESTION:
I am looking for good templates for writing both technical and functional specs on a project or work request. What do you use? How deep do you get while writing the specs? What general tips should I be aware of? My company needs these badly. Currently we do ... | [
"project-management",
"specifications",
"specs"
] | 62 | 32 | 88,419 | 8 | 0 | 2008-09-09T16:28:27.520000 | 2008-09-09T18:00:49.780000 |
52,311 | 52,355 | Determine size of page via HttpModule | Here's an easy one for you: I'm currently logging request duration via an HttpModule and I'd like to find out the number of bytes each page is as well. HttpContext.Current.Response.OutputStream.Length throws a NotSupportedException. What's an easy way to do this? | I have an HttpModule that implements a stream rewriter. It derives from the Stream class. In my HttpModule I have the following code: void app_PreRequestHandlerExecute(object sender, EventArgs e) { HttpResponse response = HttpContext.Current.Response; response.Filter = new MyRewriterStream(response.Filter); } In the st... | Determine size of page via HttpModule Here's an easy one for you: I'm currently logging request duration via an HttpModule and I'd like to find out the number of bytes each page is as well. HttpContext.Current.Response.OutputStream.Length throws a NotSupportedException. What's an easy way to do this? | TITLE:
Determine size of page via HttpModule
QUESTION:
Here's an easy one for you: I'm currently logging request duration via an HttpModule and I'd like to find out the number of bytes each page is as well. HttpContext.Current.Response.OutputStream.Length throws a NotSupportedException. What's an easy way to do this?
... | [
"asp.net"
] | 4 | 3 | 934 | 1 | 0 | 2008-09-09T16:35:15.833000 | 2008-09-09T17:07:47.830000 |
52,312 | 52,322 | What is the real overhead of try/catch in C#? | So, I know that try/catch does add some overhead and therefore isn't a good way of controlling process flow, but where does this overhead come from and what is its actual impact? | I'm not an expert in language implementations (so take this with a grain of salt), but I think one of the biggest costs is unwinding the stack and storing it for the stack trace. I suspect this happens only when the exception is thrown (but I don't know), and if so, this would be decently sized hidden cost every time a... | What is the real overhead of try/catch in C#? So, I know that try/catch does add some overhead and therefore isn't a good way of controlling process flow, but where does this overhead come from and what is its actual impact? | TITLE:
What is the real overhead of try/catch in C#?
QUESTION:
So, I know that try/catch does add some overhead and therefore isn't a good way of controlling process flow, but where does this overhead come from and what is its actual impact?
ANSWER:
I'm not an expert in language implementations (so take this with a g... | [
"c#",
".net",
"performance",
"optimization",
"try-catch"
] | 103 | 58 | 28,820 | 12 | 0 | 2008-09-09T16:36:09.327000 | 2008-09-09T16:41:10.657000 |
52,313 | 52,318 | C# switch: case not falling through to other cases limitation | This question is kind of an add-on to this question In C#, a switch case cannot fall through to other cases, this causes a compilation error. In this case I am just adding some number to the month total for the selected month and each subsequent month thereafter. (simple example, not meant to be real) switch (month) { ... | Often times when you see the noise from a huge switch statement or many if statements that might fall into more than one block, you're trying to suppress a bad design. Instead, what if you implemented the Specification pattern to see if something matched, and then act on it? foreach(MonthSpecification spec in this.Mont... | C# switch: case not falling through to other cases limitation This question is kind of an add-on to this question In C#, a switch case cannot fall through to other cases, this causes a compilation error. In this case I am just adding some number to the month total for the selected month and each subsequent month therea... | TITLE:
C# switch: case not falling through to other cases limitation
QUESTION:
This question is kind of an add-on to this question In C#, a switch case cannot fall through to other cases, this causes a compilation error. In this case I am just adding some number to the month total for the selected month and each subse... | [
"c#",
"switch-statement"
] | 5 | 11 | 11,790 | 5 | 0 | 2008-09-09T16:36:18.517000 | 2008-09-09T16:40:09.113000 |
52,315 | 52,327 | T-SQL trim   (and other non-alphanumeric characters) | We have some input data that sometimes appears with characters on the end. The data comes in from the source system as varchar() and our attempts to cast as decimal fail b/c of these characters. Ltrim and Rtrim don't remove the characters, so we're forced to do something like: UPDATE myTable SET myColumn = replace(myCo... | This page has a sample of how you can remove non-alphanumeric chars: -- Put something like this into a user function: DECLARE @cString VARCHAR(32) DECLARE @nPos INTEGER SELECT @cString = '90$%45623 *6%}~:@' SELECT @nPos = PATINDEX('%[^0-9]%', @cString)
WHILE @nPos > 0 BEGIN SELECT @cString = STUFF(@cString, @nPos, 1, ... | T-SQL trim   (and other non-alphanumeric characters) We have some input data that sometimes appears with characters on the end. The data comes in from the source system as varchar() and our attempts to cast as decimal fail b/c of these characters. Ltrim and Rtrim don't remove the characters, so we're forced to do s... | TITLE:
T-SQL trim   (and other non-alphanumeric characters)
QUESTION:
We have some input data that sometimes appears with characters on the end. The data comes in from the source system as varchar() and our attempts to cast as decimal fail b/c of these characters. Ltrim and Rtrim don't remove the characters, so we... | [
"sql",
"sql-server"
] | 7 | 9 | 32,319 | 5 | 0 | 2008-09-09T16:39:17.290000 | 2008-09-09T16:46:56.960000 |
52,319 | 55,841 | Tablet PC SDK (1.7) Merge Module + VS2008 + Windows Vista? | I have a VS2005 deployment & setup project, that makes use of the Tablet PC SDK 1.7 Merge Module, so users of Windows XP can make use of the managed Microsoft.Ink.DLL library. Now that we've moved over to Vista/VS2008, do I still need to install the TPC SDK (to get the merge module) or can I make use of something that ... | As usual, one of the trickiest aspects of Tablet development is deployment: Tablet functionality isn't built into the Home Basic or Starter editions of Vista so if you want your program to work on those, you still need the MSM. You should be ok using merge modules on Tablet-enabled versions of Vista. I mean, it's equiv... | Tablet PC SDK (1.7) Merge Module + VS2008 + Windows Vista? I have a VS2005 deployment & setup project, that makes use of the Tablet PC SDK 1.7 Merge Module, so users of Windows XP can make use of the managed Microsoft.Ink.DLL library. Now that we've moved over to Vista/VS2008, do I still need to install the TPC SDK (to... | TITLE:
Tablet PC SDK (1.7) Merge Module + VS2008 + Windows Vista?
QUESTION:
I have a VS2005 deployment & setup project, that makes use of the Tablet PC SDK 1.7 Merge Module, so users of Windows XP can make use of the managed Microsoft.Ink.DLL library. Now that we've moved over to Vista/VS2008, do I still need to insta... | [
"visual-studio",
"windows-vista",
"windows-xp",
"sdk",
"tablet-pc"
] | 1 | 2 | 1,492 | 1 | 0 | 2008-09-09T16:40:16.697000 | 2008-09-11T05:18:08.597000 |
52,321 | 52,369 | Updating Legacy Code from System.Web.Mail to System.Net.Mail in Visual Studio 2005: Problems sending E-Mail | Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared Sub send(ByVal recipent As String, ByVal from As String, ByVal subject As String, ByVal body As String) Try Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage Message.To = recipent Message.From ... | I've tested your code and my mail is sent successfully. Assuming that you're using the same parameters for the old code, I would suggest that your mail server (MAIL_SERVER) is accepting the message and there's a delay in processing or it considers it spam and discards it. I would suggest sending a message using a third... | Updating Legacy Code from System.Web.Mail to System.Net.Mail in Visual Studio 2005: Problems sending E-Mail Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared Sub send(ByVal recipent As String, ByVal from As String, ByVal subject As String, ByVal body As String) Try Dim ... | TITLE:
Updating Legacy Code from System.Web.Mail to System.Net.Mail in Visual Studio 2005: Problems sending E-Mail
QUESTION:
Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared Sub send(ByVal recipent As String, ByVal from As String, ByVal subject As String, ByVal body A... | [
".net",
"vb.net",
"email",
"visual-studio-2005",
".net-2.0"
] | 5 | 0 | 2,520 | 6 | 0 | 2008-09-09T16:41:00.923000 | 2008-09-09T17:13:46.583000 |
52,326 | 52,332 | How to validate an XML file against a schema using Visual Studio 2005 | Is it possible to validate an xml file against its associated schema using Visual Studio 2005 IDE? I could only see options to create a schema based on the current file, or show the XSLT output | It's done automatically, errors appear as warnings in the "Error List" and are additionally underlined with the blue squiggle in the source file. Not sure if there is another way to validate the file, but this will do for now. | How to validate an XML file against a schema using Visual Studio 2005 Is it possible to validate an xml file against its associated schema using Visual Studio 2005 IDE? I could only see options to create a schema based on the current file, or show the XSLT output | TITLE:
How to validate an XML file against a schema using Visual Studio 2005
QUESTION:
Is it possible to validate an xml file against its associated schema using Visual Studio 2005 IDE? I could only see options to create a schema based on the current file, or show the XSLT output
ANSWER:
It's done automatically, erro... | [
"xml",
"visual-studio",
"xslt",
"visual-studio-2005"
] | 3 | 5 | 6,457 | 2 | 0 | 2008-09-09T16:45:06.810000 | 2008-09-09T16:52:33.233000 |
52,343 | 52,458 | What is causing a JVMTI_ERROR_NULL_POINTER? | I'm getting an error when my application starts. It appears to be after it's initialized its connection to the database. It also may be when it starts to spawn threads, but I haven't been able to cause it to happen on purpose. The entire error message is: FATAL ERROR in native method: JDWP NewGlobalRef, jvmtiError=JVMT... | JVMTI is the debugging and profiling protocol. So, I'm guessint it's something peculiar to the environment you are attempting to run your application in. | What is causing a JVMTI_ERROR_NULL_POINTER? I'm getting an error when my application starts. It appears to be after it's initialized its connection to the database. It also may be when it starts to spawn threads, but I haven't been able to cause it to happen on purpose. The entire error message is: FATAL ERROR in nativ... | TITLE:
What is causing a JVMTI_ERROR_NULL_POINTER?
QUESTION:
I'm getting an error when my application starts. It appears to be after it's initialized its connection to the database. It also may be when it starts to spawn threads, but I haven't been able to cause it to happen on purpose. The entire error message is: FA... | [
"java",
"jvm"
] | 2 | 4 | 7,222 | 2 | 0 | 2008-09-09T17:00:43.607000 | 2008-09-09T17:50:23.173000 |
52,353 | 52,682 | How to determine the size of an object in Java | I have an application that reads a CSV file with piles of data rows. I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryError s. Each row translates into an object. Is there a way to find out the size of that ob... | You can use the java.lang.instrument package. Compile and put this class in a JAR: import java.lang.instrument.Instrumentation;
public class ObjectSizeFetcher { private static Instrumentation instrumentation;
public static void premain(String args, Instrumentation inst) { instrumentation = inst; }
public static long... | How to determine the size of an object in Java I have an application that reads a CSV file with piles of data rows. I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryError s. Each row translates into an object.... | TITLE:
How to determine the size of an object in Java
QUESTION:
I have an application that reads a CSV file with piles of data rows. I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryError s. Each row translat... | [
"java",
"memory"
] | 686 | 491 | 370,455 | 29 | 0 | 2008-09-09T17:07:03.323000 | 2008-09-09T19:24:37.863000 |
52,356 | 52,389 | SQL 2005 copy single column between databases | I'm still fairly new to T-SQL and SQL 2005. I need to import a column of integers from a table in database1 to a identical table (only missing the column I need) in database2. Both are sql 2005 databases. I've tried the built in import command in Server Management Studio but it's forcing me to copy the entire table. Th... | Inserting won't do it since it'll attempt to insert new rows at the end of the table. What it sounds like your trying to do is add a column to the end of existing rows. I'm not sure if the syntax is exactly right but, if I understood you then this will do what you're after. Create the column allowing nulls in database2... | SQL 2005 copy single column between databases I'm still fairly new to T-SQL and SQL 2005. I need to import a column of integers from a table in database1 to a identical table (only missing the column I need) in database2. Both are sql 2005 databases. I've tried the built in import command in Server Management Studio bu... | TITLE:
SQL 2005 copy single column between databases
QUESTION:
I'm still fairly new to T-SQL and SQL 2005. I need to import a column of integers from a table in database1 to a identical table (only missing the column I need) in database2. Both are sql 2005 databases. I've tried the built in import command in Server Ma... | [
"sql-server",
"t-sql",
"copy"
] | 2 | 5 | 4,816 | 6 | 0 | 2008-09-09T17:08:44.600000 | 2008-09-09T17:18:52.877000 |
52,357 | 52,365 | What is the point of clog? | I've been wondering, what is the point of clog? As near as I can tell, clog is the same as cerr but with buffering so it is more efficient. Usually stderr is the same as stdout, so clog is the same as cout. This seems pretty lame to me, so I figure I must be misunderstanding it. If I have log messages going out to the ... | Is it possible to redirect clog, cerr, cout, stdin, stdout, and/or stderr? Yes. You want the rdbuf function. ofstream ofs("logfile"); cout.rdbuf(ofs.rdbuf()); cout << "Goes to file." << endl; Is the only difference between clog and cerr the buffering? As far as I know, yes. | What is the point of clog? I've been wondering, what is the point of clog? As near as I can tell, clog is the same as cerr but with buffering so it is more efficient. Usually stderr is the same as stdout, so clog is the same as cout. This seems pretty lame to me, so I figure I must be misunderstanding it. If I have log... | TITLE:
What is the point of clog?
QUESTION:
I've been wondering, what is the point of clog? As near as I can tell, clog is the same as cerr but with buffering so it is more efficient. Usually stderr is the same as stdout, so clog is the same as cout. This seems pretty lame to me, so I figure I must be misunderstanding... | [
"c++",
"logging",
"log4cpp"
] | 74 | 47 | 37,150 | 6 | 0 | 2008-09-09T17:08:47.987000 | 2008-09-09T17:13:03.497000 |
52,359 | 52,392 | Simple & basic form spam reduction: checking for Javascript? | I'm trying to reduce the form spam on our website. (It's actually pretty recent). I seem to remember reading somewhere that the spammers aren't executing the Javascript on the site. Is that true? And if so, then could you simply check for javascript being disabled and then figure it's likely that it's spam? | There are still a large number of people that run with Javascript turned off. Alternatively, I have had decent success with stopping form spam using CSS. Basically, include an input field and label that is hidden using CSS ( display: none; ) and once submitted, check if anything has been entered in the field. I general... | Simple & basic form spam reduction: checking for Javascript? I'm trying to reduce the form spam on our website. (It's actually pretty recent). I seem to remember reading somewhere that the spammers aren't executing the Javascript on the site. Is that true? And if so, then could you simply check for javascript being dis... | TITLE:
Simple & basic form spam reduction: checking for Javascript?
QUESTION:
I'm trying to reduce the form spam on our website. (It's actually pretty recent). I seem to remember reading somewhere that the spammers aren't executing the Javascript on the site. Is that true? And if so, then could you simply check for ja... | [
"javascript",
"user-input"
] | 5 | 8 | 3,860 | 6 | 0 | 2008-09-09T17:09:17.173000 | 2008-09-09T17:19:42.063000 |
52,360 | 52,366 | How can you determine what version(s) of .NET are running on a system? | What are the different ways (programmatically and otherwise) to determine what versions of.NET are running on a system? | Directly from the source: How to determine which versions and service pack levels of the Microsoft.NET Framework are installed | How can you determine what version(s) of .NET are running on a system? What are the different ways (programmatically and otherwise) to determine what versions of.NET are running on a system? | TITLE:
How can you determine what version(s) of .NET are running on a system?
QUESTION:
What are the different ways (programmatically and otherwise) to determine what versions of.NET are running on a system?
ANSWER:
Directly from the source: How to determine which versions and service pack levels of the Microsoft.NET... | [
".net"
] | 13 | 8 | 18,550 | 6 | 0 | 2008-09-09T17:10:12.273000 | 2008-09-09T17:13:12.653000 |
52,400 | 52,481 | Patterns for the overlap of two objects | I'm sure this has already been asked and answered so I apologize in advance for that but I'm not figuring out the correct keywords to search for. Searching for "Pattern" hits way too many Q & A's to be useful. I'm working on a regression testing app. I'm displaying a form on the screen and according to which user is lo... | Table driven designs can be effective. Steve Maguire had few nice examples in Writing Solid Code. They are also a great way to capture tests, see fit. In your case something like: Field1ReadonlyRules = { 'user class 1': True, 'user class 2': False }
field1.readOnly = Field1ReadonlyRules[ someUser.userClass ] As an asi... | Patterns for the overlap of two objects I'm sure this has already been asked and answered so I apologize in advance for that but I'm not figuring out the correct keywords to search for. Searching for "Pattern" hits way too many Q & A's to be useful. I'm working on a regression testing app. I'm displaying a form on the ... | TITLE:
Patterns for the overlap of two objects
QUESTION:
I'm sure this has already been asked and answered so I apologize in advance for that but I'm not figuring out the correct keywords to search for. Searching for "Pattern" hits way too many Q & A's to be useful. I'm working on a regression testing app. I'm display... | [
"object",
"design-patterns",
"intersection"
] | 4 | 2 | 345 | 2 | 0 | 2008-09-09T17:22:31.680000 | 2008-09-09T18:01:48.340000 |
52,438 | 52,443 | Literal hashes in c#? | I've been doing c# for a long time, and have never come across an easy way to just new up a hash. I've recently become acquainted with the ruby syntax of hashes and wonder, does anyone know of a simple way to declare a hash as a literal, without doing all the add calls. { "whatever" => {i => 1}; "and then something els... | If you're using C# 3.0 (.NET 3.5) then you can use collection initializers. They're not quite as terse as in Ruby but still an improvement. This example is based on the MSDN Example var students = new Dictionary () { { 111, new StudentName {FirstName="Sachin", LastName="Karnik", ID=211}}, { 112, new StudentName {FirstN... | Literal hashes in c#? I've been doing c# for a long time, and have never come across an easy way to just new up a hash. I've recently become acquainted with the ruby syntax of hashes and wonder, does anyone know of a simple way to declare a hash as a literal, without doing all the add calls. { "whatever" => {i => 1}; "... | TITLE:
Literal hashes in c#?
QUESTION:
I've been doing c# for a long time, and have never come across an easy way to just new up a hash. I've recently become acquainted with the ruby syntax of hashes and wonder, does anyone know of a simple way to declare a hash as a literal, without doing all the add calls. { "whatev... | [
"c#",
"ruby",
"hashtable",
"literals"
] | 30 | 34 | 6,124 | 4 | 0 | 2008-09-09T17:39:15.370000 | 2008-09-09T17:44:11.783000 |
52,445 | 152,941 | Are there C library resources similar to C++'s Boost library? | I don't ever recall coming across anything for C that's as extensive as C++'s Boost library. | Depending on what exactly you're trying to do there is APR (The Apache Portable Runtime library) which is what the Apache http daemon is built on http://apr.apache.org/ For GUI, there is wxWidgets (formerly wxWindows) http://www.wxwidgets.org/ | Are there C library resources similar to C++'s Boost library? I don't ever recall coming across anything for C that's as extensive as C++'s Boost library. | TITLE:
Are there C library resources similar to C++'s Boost library?
QUESTION:
I don't ever recall coming across anything for C that's as extensive as C++'s Boost library.
ANSWER:
Depending on what exactly you're trying to do there is APR (The Apache Portable Runtime library) which is what the Apache http daemon is b... | [
"c"
] | 23 | 4 | 9,503 | 6 | 0 | 2008-09-09T17:44:26.993000 | 2008-09-30T13:03:16.287000 |
52,447 | 52,466 | Switching form Visual SourceSafe to CVS: what features are lost in Visual Studio? | My company is using Visual SourceSafe (VSS) and Visual Studio 2005 (soon 2008). They want to switch to CVS, but the developers don't want to lose the integration we get with VSS and Visual Studio. I know there are CVS plugins, but what functionality, if any, is lost with CVS? | Screaming at VSS for lost source code, etc. Seriously though, it is a very different model ( optimistic locking ), so you will probably lose some productivity for the first little while. I would probably look at using TortoiseCVS and "Open Folder In Windows Explorer" right-click or the Visual Studio Explorer plug-in ra... | Switching form Visual SourceSafe to CVS: what features are lost in Visual Studio? My company is using Visual SourceSafe (VSS) and Visual Studio 2005 (soon 2008). They want to switch to CVS, but the developers don't want to lose the integration we get with VSS and Visual Studio. I know there are CVS plugins, but what fu... | TITLE:
Switching form Visual SourceSafe to CVS: what features are lost in Visual Studio?
QUESTION:
My company is using Visual SourceSafe (VSS) and Visual Studio 2005 (soon 2008). They want to switch to CVS, but the developers don't want to lose the integration we get with VSS and Visual Studio. I know there are CVS pl... | [
"visual-studio",
"cvs",
"visual-sourcesafe"
] | 2 | 6 | 2,600 | 5 | 0 | 2008-09-09T17:45:32.313000 | 2008-09-09T17:53:28.127000 |
52,460 | 66,896 | How do I find and decouple entities from a certificate when upgrading MS-SQLServer editions? | While in the final throws of upgrading MS-SQL Server 2005 Express Edition to MS-SQL Server 2005 Enterprise Edition, I came across this error: The certificate cannot be dropped because one or more entities are either signed or encrypted using it. To continue, correct the problem... So, how do I find and decouple the ent... | The Microsoft forum has the following code snipit to delete the certificates: use msdb BEGIN TRANSACTION declare @sp sysname declare @exec_str nvarchar(1024) declare ms_crs_sps cursor global for select object_name(crypts.major_id) from sys.crypt_properties crypts, sys.certificates certs where crypts.thumbprint = certs.... | How do I find and decouple entities from a certificate when upgrading MS-SQLServer editions? While in the final throws of upgrading MS-SQL Server 2005 Express Edition to MS-SQL Server 2005 Enterprise Edition, I came across this error: The certificate cannot be dropped because one or more entities are either signed or e... | TITLE:
How do I find and decouple entities from a certificate when upgrading MS-SQLServer editions?
QUESTION:
While in the final throws of upgrading MS-SQL Server 2005 Express Edition to MS-SQL Server 2005 Enterprise Edition, I came across this error: The certificate cannot be dropped because one or more entities are ... | [
"sql-server"
] | 1 | 2 | 4,760 | 1 | 0 | 2008-09-09T17:51:36.900000 | 2008-09-15T20:58:30.707000 |
52,469 | 52,477 | Visual Web Developer Express and .NET, et al | I'm coming from the open source world, and interested in giving ASP.NET a spin. But I'm having a little trouble separating the tools from the platform itself in regards to the licensing. I've downloaded Visual Web Developer 2008 Express, but not sure how different this is from one of the full-featured Visual Studio lic... | All of.net is available in the.net SDK, so in theory you will not need Visual Studio at all. Now, there are some things that Express will not do. For example, the Database Designer is not very comprehensive and adding different remote databases is not or only very hardly possible. Still, in code you can connect to ever... | Visual Web Developer Express and .NET, et al I'm coming from the open source world, and interested in giving ASP.NET a spin. But I'm having a little trouble separating the tools from the platform itself in regards to the licensing. I've downloaded Visual Web Developer 2008 Express, but not sure how different this is fr... | TITLE:
Visual Web Developer Express and .NET, et al
QUESTION:
I'm coming from the open source world, and interested in giving ASP.NET a spin. But I'm having a little trouble separating the tools from the platform itself in regards to the licensing. I've downloaded Visual Web Developer 2008 Express, but not sure how di... | [
"asp.net",
"visual-studio"
] | 1 | 2 | 712 | 5 | 0 | 2008-09-09T17:55:39.137000 | 2008-09-09T18:00:45.660000 |
52,485 | 52,513 | ASP.NET ObjectDataSource Binding Automatically to Repeater - Possible? | I have a Question class: class Question { public int QuestionNumber { get; set; } public string Question { get; set; } public string Answer { get; set; } } Now I make an ICollection of these available through an ObjectDataSource, and display them using a Repeater bound to the DataSource. I use <%#Eval("Question")%> to ... | You have to handle the postback event (button click or whatever) then enumerate the repeater items like this: foreach(RepeaterItem item in rptQuestions.Items) { //pull out question var question = (Question)item.DataItem; question.Answer = ((TextBox)item.FindControl("txtAnswer")).Text;
question.Save()? <--- not sure wh... | ASP.NET ObjectDataSource Binding Automatically to Repeater - Possible? I have a Question class: class Question { public int QuestionNumber { get; set; } public string Question { get; set; } public string Answer { get; set; } } Now I make an ICollection of these available through an ObjectDataSource, and display them us... | TITLE:
ASP.NET ObjectDataSource Binding Automatically to Repeater - Possible?
QUESTION:
I have a Question class: class Question { public int QuestionNumber { get; set; } public string Question { get; set; } public string Answer { get; set; } } Now I make an ICollection of these available through an ObjectDataSource, a... | [
"asp.net",
"repeater",
"bind",
"objectdatasource"
] | 2 | 1 | 4,591 | 4 | 0 | 2008-09-09T18:04:24.730000 | 2008-09-09T18:16:42.237000 |
52,492 | 52,504 | What is the best way to avoid getting "Emacs Pinky"? | I just started using GNU Emacs as my text editor and I am concerned about getting afflicted with " Emacs Pinky " by having to constantly press the control key with my pinky finger as is required when using Emacs. How can I avoid potentially getting this type of repetitive strain injury? | Making caps lock another control key is a good place to start. Invest in an ergonomic keyboard. Some emacs users even go as far as to get foot pedal things for control and meta... | What is the best way to avoid getting "Emacs Pinky"? I just started using GNU Emacs as my text editor and I am concerned about getting afflicted with " Emacs Pinky " by having to constantly press the control key with my pinky finger as is required when using Emacs. How can I avoid potentially getting this type of repet... | TITLE:
What is the best way to avoid getting "Emacs Pinky"?
QUESTION:
I just started using GNU Emacs as my text editor and I am concerned about getting afflicted with " Emacs Pinky " by having to constantly press the control key with my pinky finger as is required when using Emacs. How can I avoid potentially getting ... | [
"emacs",
"keyboard"
] | 40 | 53 | 35,458 | 33 | 0 | 2008-09-09T18:08:44.363000 | 2008-09-09T18:12:08.347000 |
52,506 | 52,617 | C++ Template Ambiguity | A friend and I were discussing C++ templates. He asked me what this should do: #include template struct A { A(bool) { std::cout << "bool\n"; } A(void*) { std::cout << "void*\n"; } };
int main() { A *d = 0; const int b = 2; const int c = 1; new A< b > (c) > (d); } The last line in main has two reasonable parses. Is 'b'... | AFAIK it would be compiled as new A (c) > d. This is the only reasonable way to parse it IMHO. If the parser can't assume under normal circumstances a > end a template argument, that would result it much more ambiguity. If you want it the other way, you should have written: new A<(b > c)>(d); | C++ Template Ambiguity A friend and I were discussing C++ templates. He asked me what this should do: #include template struct A { A(bool) { std::cout << "bool\n"; } A(void*) { std::cout << "void*\n"; } };
int main() { A *d = 0; const int b = 2; const int c = 1; new A< b > (c) > (d); } The last line in main has two re... | TITLE:
C++ Template Ambiguity
QUESTION:
A friend and I were discussing C++ templates. He asked me what this should do: #include template struct A { A(bool) { std::cout << "bool\n"; } A(void*) { std::cout << "void*\n"; } };
int main() { A *d = 0; const int b = 2; const int c = 1; new A< b > (c) > (d); } The last line ... | [
"c++",
"templates",
"grammar"
] | 9 | 7 | 2,915 | 4 | 0 | 2008-09-09T18:13:55.473000 | 2008-09-09T18:57:00.283000 |
52,520 | 52,556 | Are off-the-cloud desktop applications dead? | Although somewhat related to this question, I have what I think is a different take on it. Is a desktop app that has no connections to the "cloud" dead? I believe that some things are going to continue to be on the machine (operating systems obviously, browsers, some light-weight applications), but more and more things... | 10 years or more ago this would have been, "Are non-internet applications dead?" There's things the cloud does better than desktop applications, and in those places I'm sure non-cloud applications will become increasingly rare. But there's plenty of applications where you might not want to use the cloud, the benefits d... | Are off-the-cloud desktop applications dead? Although somewhat related to this question, I have what I think is a different take on it. Is a desktop app that has no connections to the "cloud" dead? I believe that some things are going to continue to be on the machine (operating systems obviously, browsers, some light-w... | TITLE:
Are off-the-cloud desktop applications dead?
QUESTION:
Although somewhat related to this question, I have what I think is a different take on it. Is a desktop app that has no connections to the "cloud" dead? I believe that some things are going to continue to be on the machine (operating systems obviously, brow... | [
"desktop-application",
"cloud"
] | 3 | 7 | 1,906 | 9 | 0 | 2008-09-09T18:21:12.460000 | 2008-09-09T18:35:59.600000 |
52,550 | 52,558 | What does the comma operator , do? | What does the, operator do in C? | The expression: (expression1, expression2) First expression1 is evaluated, then expression2 is evaluated, and the value of expression2 is returned for the whole expression. | What does the comma operator , do? What does the, operator do in C? | TITLE:
What does the comma operator , do?
QUESTION:
What does the, operator do in C?
ANSWER:
The expression: (expression1, expression2) First expression1 is evaluated, then expression2 is evaluated, and the value of expression2 is returned for the whole expression. | [
"c",
"operators",
"comma-operator"
] | 216 | 183 | 58,547 | 9 | 0 | 2008-09-09T18:34:09.777000 | 2008-09-09T18:37:07.133000 |
52,557 | 57,553 | profile-guided optimization (C) | Anyone know this compiler feature? It seems GCC support that. How does it work? What is the potential gain? In which case it's good? Inner loops? (this question is specific, not about optimization in general, thanks) | It works by placing extra code to count the number of times each codepath is taken. When you compile a second time the compiler uses the knowledge gained about execution of your program that it could only guess at before. There are a couple things PGO can work toward: Deciding which functions should be inlined or not d... | profile-guided optimization (C) Anyone know this compiler feature? It seems GCC support that. How does it work? What is the potential gain? In which case it's good? Inner loops? (this question is specific, not about optimization in general, thanks) | TITLE:
profile-guided optimization (C)
QUESTION:
Anyone know this compiler feature? It seems GCC support that. How does it work? What is the potential gain? In which case it's good? Inner loops? (this question is specific, not about optimization in general, thanks)
ANSWER:
It works by placing extra code to count the ... | [
"c++",
"c",
"optimization",
"gcc",
"pgo"
] | 13 | 12 | 5,055 | 4 | 0 | 2008-09-09T18:36:49.833000 | 2008-09-11T20:34:45.913000 |
52,561 | 52,570 | iPhone browser tag and optimized web site | What is iPhone's browser tag and how iPhone optimized web site is different from a usual mobile web site? Thanks! | Nettuts has a great introduction to web-developement for iPhone. You find it here This is the specific code you asked for (taken from that article): | iPhone browser tag and optimized web site What is iPhone's browser tag and how iPhone optimized web site is different from a usual mobile web site? Thanks! | TITLE:
iPhone browser tag and optimized web site
QUESTION:
What is iPhone's browser tag and how iPhone optimized web site is different from a usual mobile web site? Thanks!
ANSWER:
Nettuts has a great introduction to web-developement for iPhone. You find it here This is the specific code you asked for (taken from tha... | [
"iphone",
"html",
"mobile",
"mobile-website"
] | 3 | 1 | 1,797 | 4 | 0 | 2008-09-09T18:40:02.837000 | 2008-09-09T18:43:06.167000 |
52,563 | 5,405,832 | Input type=text to fill parent container | I'm trying to let an (henceforth referred to as “textbox”) fill a parent container by settings its width to 100%. This works until I give the textbox a padding. This is then added to the content width and the input field overflows. Notice that in Firefox this only happens when rendering the content as standards complia... | With CSS3 you can use the box-sizing property on your inputs to standardise their box models. Something like this would enable you to add padding and have 100% width: input[type="text"] { -webkit-box-sizing: border-box; // Safari/Chrome, other WebKit -moz-box-sizing: border-box; // Firefox, other Gecko box-sizing: bord... | Input type=text to fill parent container I'm trying to let an (henceforth referred to as “textbox”) fill a parent container by settings its width to 100%. This works until I give the textbox a padding. This is then added to the content width and the input field overflows. Notice that in Firefox this only happens when r... | TITLE:
Input type=text to fill parent container
QUESTION:
I'm trying to let an (henceforth referred to as “textbox”) fill a parent container by settings its width to 100%. This works until I give the textbox a padding. This is then added to the content width and the input field overflows. Notice that in Firefox this o... | [
"html",
"css"
] | 36 | 27 | 56,139 | 11 | 0 | 2008-09-09T18:40:46.190000 | 2011-03-23T13:19:56.877000 |
52,591 | 52,737 | ASP.Net word count with a custom validator | A requirement for an ASP.Net 2.0 project I'm working on limits a certain field to a max of 10 words (not characters). I'm currently using a CustomValidator control with the following ServerValidate method: Protected Sub TenWordsTextBoxValidator_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebContr... | This regex seems to be working great: "^(\b\S+\b\s*){0,10}$" Update: the above had a few flaws so I ended up using this RegEx: [\s\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\xBF]+ I split() the string on that regex and use the length of the resulting array to get the correct word count. | ASP.Net word count with a custom validator A requirement for an ASP.Net 2.0 project I'm working on limits a certain field to a max of 10 words (not characters). I'm currently using a CustomValidator control with the following ServerValidate method: Protected Sub TenWordsTextBoxValidator_ServerValidate(ByVal source As O... | TITLE:
ASP.Net word count with a custom validator
QUESTION:
A requirement for an ASP.Net 2.0 project I'm working on limits a certain field to a max of 10 words (not characters). I'm currently using a CustomValidator control with the following ServerValidate method: Protected Sub TenWordsTextBoxValidator_ServerValidate... | [
"asp.net",
"vb.net",
".net-2.0",
"validation"
] | 3 | 1 | 2,784 | 3 | 0 | 2008-09-09T18:50:45.260000 | 2008-09-09T19:48:51.360000 |
52,600 | 53,095 | What does the PDB get me while debugging and how do I know it's working? | I have to use a third-party component without source code. I have the release DLL and release PDB file. Let's call it 'CorporateComponent.dll'. My own code creates objects from this DLL and calls methods on these objects. CorpObject o = new CorpObject(); Int32 result = o.DoSomethingLousy(); While debugging, the method ... | To confirm if you're using the provided PDB, CorporateComponent.pdb, during debugging within the Visual Studio IDE review the output window and locate the line indicating that the CorporateComponent.dll is loaded and followed by the string Symbols loaded. To illustrate from a project of mine: The thread 0x6a0 has exite... | What does the PDB get me while debugging and how do I know it's working? I have to use a third-party component without source code. I have the release DLL and release PDB file. Let's call it 'CorporateComponent.dll'. My own code creates objects from this DLL and calls methods on these objects. CorpObject o = new CorpOb... | TITLE:
What does the PDB get me while debugging and how do I know it's working?
QUESTION:
I have to use a third-party component without source code. I have the release DLL and release PDB file. Let's call it 'CorporateComponent.dll'. My own code creates objects from this DLL and calls methods on these objects. CorpObj... | [
".net",
"debugging",
"pdb-files"
] | 8 | 7 | 4,790 | 4 | 0 | 2008-09-09T18:52:52.073000 | 2008-09-09T22:59:51.417000 |
52,621 | 52,641 | Using Windows XP as a SQL Server | I was wondering if anyone knew of any limitations to using Windows XP as a File and SQL server. I am asking because one of the applications we sell, requires the customer to setup a server for filesharing and as a SQL Server. We already allow them to use SQL Express, but we wanted to see if we can suggest Windows XP as... | There is a limit of 10 inbound connections on XP professional, and 5 on XP Home. So it would only be practicable for a very small company. | Using Windows XP as a SQL Server I was wondering if anyone knew of any limitations to using Windows XP as a File and SQL server. I am asking because one of the applications we sell, requires the customer to setup a server for filesharing and as a SQL Server. We already allow them to use SQL Express, but we wanted to se... | TITLE:
Using Windows XP as a SQL Server
QUESTION:
I was wondering if anyone knew of any limitations to using Windows XP as a File and SQL server. I am asking because one of the applications we sell, requires the customer to setup a server for filesharing and as a SQL Server. We already allow them to use SQL Express, b... | [
"sql-server",
"windows-xp",
"sql-server-express"
] | 4 | 9 | 7,523 | 9 | 0 | 2008-09-09T18:58:36.333000 | 2008-09-09T19:07:11.273000 |
52,626 | 52,677 | Automating DB Object Migrations from Source Control | I'm looking for some "Best Practices" for automating the deployment of Stored Procedures/Views/Functions/Table changes from source control. I'm using StarTeam & ANT so the labeling is taken care of; what I am looking for is how some of you have approached automating the pull of these objects from source - not necessari... | We use SQL Compare from redgate ( http://www.red-gate.com/ ). We have a production database, a development database and each developer has their own database. The development database is synchronised with the changes a developer has made to their database when they check in their changes. The developer also checks in a... | Automating DB Object Migrations from Source Control I'm looking for some "Best Practices" for automating the deployment of Stored Procedures/Views/Functions/Table changes from source control. I'm using StarTeam & ANT so the labeling is taken care of; what I am looking for is how some of you have approached automating t... | TITLE:
Automating DB Object Migrations from Source Control
QUESTION:
I'm looking for some "Best Practices" for automating the deployment of Stored Procedures/Views/Functions/Table changes from source control. I'm using StarTeam & ANT so the labeling is taken care of; what I am looking for is how some of you have appro... | [
"sql-server",
"version-control",
"build-automation",
"starteam"
] | 2 | 4 | 270 | 2 | 0 | 2008-09-09T18:59:57.017000 | 2008-09-09T19:23:19.177000 |
52,634 | 52,858 | GridView will not update underlying data source | So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do with the LinqDataSource, so I added a SqlDataSource and the same t... | It turns out that we had a DataBind() call in the Page_Load of the master page of the aspx file that was probably causing the state of the GridView to get tossed out on every page load. As a note - update parameters for a LINQ query are not required unless you want to set them some non-null default. | GridView will not update underlying data source So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do with the LinqDataS... | TITLE:
GridView will not update underlying data source
QUESTION:
So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do ... | [
"asp.net",
"linq-to-sql",
"data-binding"
] | 1 | 1 | 3,779 | 3 | 0 | 2008-09-09T19:02:14.983000 | 2008-09-09T20:41:02.047000 |
52,646 | 52,768 | Best Practice: Legitimate Cross-Site Scripting | While cross-site scripting is generally regarded as negative, I've run into several situations where it's necessary. I was recently working within the confines of a very limiting content management system. I needed to include database code within the page, but the hosting server didn't have anything usable available. I... | You've got three choices: Create a server side proxy script. Create a remote script to read in remote dynamic HTML. Use a library like jQuery to make this easier. You can use the load function to inject HTML where needed. EDIT What I originally meant for example # 2 was utilizing JSONP, which requires the server side s... | Best Practice: Legitimate Cross-Site Scripting While cross-site scripting is generally regarded as negative, I've run into several situations where it's necessary. I was recently working within the confines of a very limiting content management system. I needed to include database code within the page, but the hosting ... | TITLE:
Best Practice: Legitimate Cross-Site Scripting
QUESTION:
While cross-site scripting is generally regarded as negative, I've run into several situations where it's necessary. I was recently working within the confines of a very limiting content management system. I needed to include database code within the page... | [
"php",
"javascript",
"xss"
] | 20 | 14 | 3,713 | 5 | 0 | 2008-09-09T19:09:56.603000 | 2008-09-09T20:01:19.863000 |
52,657 | 125,571 | How are people unit testing code that uses Linq to SQL | How are people unit testing code that uses Linq to SQL? | Update: Fredrik has put an example solution on how to do unit test linq2sql applications over at his blog. You can download it at: http://web.archive.org/web/20120415022448/http://iridescence.no/post/DataContext-Repository-Pattern-Example-Code.aspx Not only do I think its great that he posted an example solution, he al... | How are people unit testing code that uses Linq to SQL How are people unit testing code that uses Linq to SQL? | TITLE:
How are people unit testing code that uses Linq to SQL
QUESTION:
How are people unit testing code that uses Linq to SQL?
ANSWER:
Update: Fredrik has put an example solution on how to do unit test linq2sql applications over at his blog. You can download it at: http://web.archive.org/web/20120415022448/http://ir... | [
"linq",
"unit-testing",
"linq-to-sql"
] | 58 | 14 | 18,117 | 7 | 0 | 2008-09-09T19:13:59.947000 | 2008-09-24T05:32:03.767000 |
52,668 | 52,675 | ASP.NET MVC quick start - a one-stop tutorial? | There are many ASP.MVC blog post bits and pieces scattered over different web sites, as well as couple of resource questions here - ASP.NET Model-view-controller (MVC) - where do I start from? and MVC Learning Resources I wonder if there was a one-stop tutorial posted yet on getting started with ASP.NET MVC? Thank you!... | Have you looked at MVC Samples on CodePlex? Rob Conery has some screencasts that go along with the creation of the site at http://blog.wekeroad.com/mvc-storefront/. | ASP.NET MVC quick start - a one-stop tutorial? There are many ASP.MVC blog post bits and pieces scattered over different web sites, as well as couple of resource questions here - ASP.NET Model-view-controller (MVC) - where do I start from? and MVC Learning Resources I wonder if there was a one-stop tutorial posted yet ... | TITLE:
ASP.NET MVC quick start - a one-stop tutorial?
QUESTION:
There are many ASP.MVC blog post bits and pieces scattered over different web sites, as well as couple of resource questions here - ASP.NET Model-view-controller (MVC) - where do I start from? and MVC Learning Resources I wonder if there was a one-stop tu... | [
"asp.net-mvc"
] | 29 | 14 | 22,829 | 8 | 0 | 2008-09-09T19:18:40.730000 | 2008-09-09T19:22:09.413000 |
52,674 | 786,530 | Simplest way to reverse the order of strings in a make variable | Let's say you have a variable in a makefile fragment like the following: MY_LIST=a b c d How do I then reverse the order of that list? I need: $(warning MY_LIST=${MY_LIST}) to show MY_LIST=d c b a Edit: the real problem is that ld -r some_object.o ${MY_LIST} produces an a.out with undefined symbols because the items in... | A solution in pure GNU make: default: all foo = please reverse me reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1)) all: @echo $(call reverse,$(foo)) Gives: $ make me reverse please | Simplest way to reverse the order of strings in a make variable Let's say you have a variable in a makefile fragment like the following: MY_LIST=a b c d How do I then reverse the order of that list? I need: $(warning MY_LIST=${MY_LIST}) to show MY_LIST=d c b a Edit: the real problem is that ld -r some_object.o ${MY_LIS... | TITLE:
Simplest way to reverse the order of strings in a make variable
QUESTION:
Let's say you have a variable in a makefile fragment like the following: MY_LIST=a b c d How do I then reverse the order of that list? I need: $(warning MY_LIST=${MY_LIST}) to show MY_LIST=d c b a Edit: the real problem is that ld -r some... | [
"makefile"
] | 16 | 24 | 5,703 | 6 | 0 | 2008-09-09T19:21:23.127000 | 2009-04-24T16:07:43.810000 |
52,676 | 52,851 | Favorite Windows keyboard shortcuts | I'm a keyboard junkie. I love having a key sequence to do everything. What are your favorite keyboard shortcuts? I'll start by naming a couple of mine: 1 - Alt - Space to access the windows menu for the current window 2 - F2 to rename a file in Windows Explorer | Win + 1.. 9 -- Start quick launch shortcut at that index (Windows Vista). Ctrl + Scroll Lock, Scroll Lock -- Crash your computer: Windows feature lets you generate a memory dump file by using the keyboard @gabr -- Win + D is show desktop, Win + M minimizes all windows. Hitting Win + D twice brings everything back as it... | Favorite Windows keyboard shortcuts I'm a keyboard junkie. I love having a key sequence to do everything. What are your favorite keyboard shortcuts? I'll start by naming a couple of mine: 1 - Alt - Space to access the windows menu for the current window 2 - F2 to rename a file in Windows Explorer | TITLE:
Favorite Windows keyboard shortcuts
QUESTION:
I'm a keyboard junkie. I love having a key sequence to do everything. What are your favorite keyboard shortcuts? I'll start by naming a couple of mine: 1 - Alt - Space to access the windows menu for the current window 2 - F2 to rename a file in Windows Explorer
ANS... | [
"windows",
"keyboard-shortcuts"
] | 34 | 26 | 31,069 | 40 | 0 | 2008-09-09T19:22:18.460000 | 2008-09-09T20:37:27.220000 |
52,698 | 127,024 | BlackBerry development using IntelliJ IDEA 7.0? | I know RIM has their own IDE ( BlackBerry JDE ) for building BlackBerry apps, but does anyone know how to configure IntelliJ IDEA to build/debug BlackBerry apps? | RE: Chris' question about what is different... Blackberry applications can be standard MIDP apps or CLDC apps that make use of the Blackberry specific APIs. Most developers tend to take the latter approach, and then using Blackberry's tools is required - especially if you are using some of their secured APIs and have t... | BlackBerry development using IntelliJ IDEA 7.0? I know RIM has their own IDE ( BlackBerry JDE ) for building BlackBerry apps, but does anyone know how to configure IntelliJ IDEA to build/debug BlackBerry apps? | TITLE:
BlackBerry development using IntelliJ IDEA 7.0?
QUESTION:
I know RIM has their own IDE ( BlackBerry JDE ) for building BlackBerry apps, but does anyone know how to configure IntelliJ IDEA to build/debug BlackBerry apps?
ANSWER:
RE: Chris' question about what is different... Blackberry applications can be stand... | [
"ide",
"blackberry",
"intellij-idea"
] | 5 | 2 | 3,050 | 6 | 0 | 2008-09-09T19:29:06.790000 | 2008-09-24T13:10:20.123000 |
52,703 | 52,716 | php is_dir returns true for non-existent folder | Has anyone encountered this oddity? I'm checking for the existence of a number of directories in one of my unit tests. is_dir is reporting true (1) in spite of the folder not existing at the time it is called. The code looks like this (with a few extraneous intermediate vars to ease debugging): foreach($userfolders as ... | I don't think this would cause your problem, but $path does have the trailing slash, correct? | php is_dir returns true for non-existent folder Has anyone encountered this oddity? I'm checking for the existence of a number of directories in one of my unit tests. is_dir is reporting true (1) in spite of the folder not existing at the time it is called. The code looks like this (with a few extraneous intermediate v... | TITLE:
php is_dir returns true for non-existent folder
QUESTION:
Has anyone encountered this oddity? I'm checking for the existence of a number of directories in one of my unit tests. is_dir is reporting true (1) in spite of the folder not existing at the time it is called. The code looks like this (with a few extrane... | [
"php"
] | 2 | 4 | 3,332 | 3 | 0 | 2008-09-09T19:32:54.130000 | 2008-09-09T19:38:10.810000 |
52,704 | 52,719 | How do I discard unstaged changes in Git? | How do I discard changes in my working copy that are not in the index? | Another quicker way is: git stash save --keep-index --include-untracked You don't need to include --include-untracked if you don't want to be thorough about it. After that, you can drop that stash with a git stash drop command if you like. | How do I discard unstaged changes in Git? How do I discard changes in my working copy that are not in the index? | TITLE:
How do I discard unstaged changes in Git?
QUESTION:
How do I discard changes in my working copy that are not in the index?
ANSWER:
Another quicker way is: git stash save --keep-index --include-untracked You don't need to include --include-untracked if you don't want to be thorough about it. After that, you can... | [
"git",
"version-control"
] | 6,275 | 3,148 | 4,106,435 | 40 | 0 | 2008-09-09T19:33:59.133000 | 2008-09-09T19:39:24.970000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.