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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
57,406 | 178,662 | Indexed Views in OLTPs? | I'm familiar with SQL Server Indexed Views (or Oracle Materialized Views), we use them in our OLAP applications. They have the really cool feature of being able to usurp an execution plan and remap it to the indexed view w/out having to change existing code. IE. Let's say I had a SPROC that was a really expensive join.... | Materialized views can be useful for reporting against OLTP, especially is large numbers of rows are aggregated to get the results. The space requirements are completely dependent on how much data you are saving. Think of it as a cache. The tricky balance is between how recent the data needs to be for the reports, and ... | Indexed Views in OLTPs? I'm familiar with SQL Server Indexed Views (or Oracle Materialized Views), we use them in our OLAP applications. They have the really cool feature of being able to usurp an execution plan and remap it to the indexed view w/out having to change existing code. IE. Let's say I had a SPROC that was ... | TITLE:
Indexed Views in OLTPs?
QUESTION:
I'm familiar with SQL Server Indexed Views (or Oracle Materialized Views), we use them in our OLAP applications. They have the really cool feature of being able to usurp an execution plan and remap it to the indexed view w/out having to change existing code. IE. Let's say I had... | [
"sql-server",
"database",
"view",
"indexed",
"materialized"
] | 2 | 5 | 1,318 | 2 | 0 | 2008-09-11T19:28:28.460000 | 2008-10-07T14:20:04.360000 |
57,409 | 57,418 | I don't get the concept of Visual Studio Projects and Solutions | In Eclipse, I have a workspace that contains all of my projects. Each project builds and compiles separately. A project does not interact with another project. How does this relate to Visual Studio and Projects/Solutions there? | A VS project is it's own entity. It will build and compile by itself. A Solution is just a way to contain multiple projects. The projects don't necessarily need the other projects to compile (though, they can depend on the other projects). This just lets you conceptually group projects together into one Big Project. Fo... | I don't get the concept of Visual Studio Projects and Solutions In Eclipse, I have a workspace that contains all of my projects. Each project builds and compiles separately. A project does not interact with another project. How does this relate to Visual Studio and Projects/Solutions there? | TITLE:
I don't get the concept of Visual Studio Projects and Solutions
QUESTION:
In Eclipse, I have a workspace that contains all of my projects. Each project builds and compiles separately. A project does not interact with another project. How does this relate to Visual Studio and Projects/Solutions there?
ANSWER:
A... | [
"visual-studio",
"eclipse"
] | 9 | 23 | 2,517 | 8 | 0 | 2008-09-11T19:29:42.153000 | 2008-09-11T19:36:30 |
57,421 | 57,435 | Ajax and a restricted uri | I would like to make an ajax call to a different server (same domain and box, just a different port.) e.g. My page is http://localhost/index.html I would like to make a ajax get request to: http://localhost:7076/?word=foo I am getting this error: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI) I know that you ca... | Have a certain page on your port 80 server proxy requests to the other port. For example: http://localhost/proxy?port=7076&url=%2f%3fword%3dfoo Note the url encoding on the last query string argument value. | Ajax and a restricted uri I would like to make an ajax call to a different server (same domain and box, just a different port.) e.g. My page is http://localhost/index.html I would like to make a ajax get request to: http://localhost:7076/?word=foo I am getting this error: Access to restricted URI denied (NS_ERROR_DOM_B... | TITLE:
Ajax and a restricted uri
QUESTION:
I would like to make an ajax call to a different server (same domain and box, just a different port.) e.g. My page is http://localhost/index.html I would like to make a ajax get request to: http://localhost:7076/?word=foo I am getting this error: Access to restricted URI deni... | [
"ajax",
"xmlhttprequest"
] | 2 | 4 | 3,942 | 4 | 0 | 2008-09-11T19:37:12.307000 | 2008-09-11T19:41:31.690000 |
57,424 | 57,461 | Sample code for using mac camera in a program? | I'd like to use the camera in my Macbook in a program. I'm fairly language agnostic - C, Java, Python etc are all fine. Could anyone suggest the best place to look for documents or "Hello world" type code? | The ImageKit framework in Leopard has an IKPictureTaker class that will let you run the standard picture-taking sheet or panel that you seen in iChat and other applications. If you don't want to use the standard picture-taker panel/sheet interface, you an use the QTKit Capture functionality to get an image from the iSi... | Sample code for using mac camera in a program? I'd like to use the camera in my Macbook in a program. I'm fairly language agnostic - C, Java, Python etc are all fine. Could anyone suggest the best place to look for documents or "Hello world" type code? | TITLE:
Sample code for using mac camera in a program?
QUESTION:
I'd like to use the camera in my Macbook in a program. I'm fairly language agnostic - C, Java, Python etc are all fine. Could anyone suggest the best place to look for documents or "Hello world" type code?
ANSWER:
The ImageKit framework in Leopard has an... | [
"cocoa",
"language-agnostic",
"macos",
"camera"
] | 13 | 7 | 12,425 | 6 | 0 | 2008-09-11T19:37:26.567000 | 2008-09-11T19:53:24.250000 |
57,439 | 57,450 | Activator.CreateInstance(string) and Activator.CreateInstance<T>() difference | No, this is not a question about generics. I have a Factory pattern with several classes with internal constructors (I don't want them being instantiated if not through the factory). My problem is that CreateInstance fails with a "No parameterless constructor defined for this object" error unless I pass "true" on the n... | To get around this, couldnt you just alter your usage as such: public class GenericFactory where T: MyAbstractType { public static T GetInstance() { return Activator.CreateInstance(typeof(T), true); } } Your factory method will still be generic, but the call to the activator will not use the generic overload. But you s... | Activator.CreateInstance(string) and Activator.CreateInstance<T>() difference No, this is not a question about generics. I have a Factory pattern with several classes with internal constructors (I don't want them being instantiated if not through the factory). My problem is that CreateInstance fails with a "No paramete... | TITLE:
Activator.CreateInstance(string) and Activator.CreateInstance<T>() difference
QUESTION:
No, this is not a question about generics. I have a Factory pattern with several classes with internal constructors (I don't want them being instantiated if not through the factory). My problem is that CreateInstance fails w... | [
"c#",
"generics",
"design-patterns"
] | 11 | 21 | 22,066 | 3 | 0 | 2008-09-11T19:42:33.747000 | 2008-09-11T19:48:43.373000 |
57,458 | 57,480 | What are some gotchas when retargeting .net 2.0 to 3.5? | I am currently working on a project that is moving from.NET 2.0 to 3.5 across the board. I am well aware that 3.5 is basically a set of added functionality (libraries, if you will) on top of what 2.0 offers. Are there any gotchas that I might hit by simply re-targeting the compiler to 3.5? | This isn't a gotcha, it's more of a heads up..NET v3.0 and v3.5 are not new CLRs but simply an added set up assemblies, compilers, resources etc... Both.NET v3.0 AND v3.5 use the v2.0 CLR. Because of this you won't be able to say set an IIS App Pool to use a v3.5 CLR...cause it doesn't exist. Discussed in a little more... | What are some gotchas when retargeting .net 2.0 to 3.5? I am currently working on a project that is moving from.NET 2.0 to 3.5 across the board. I am well aware that 3.5 is basically a set of added functionality (libraries, if you will) on top of what 2.0 offers. Are there any gotchas that I might hit by simply re-targ... | TITLE:
What are some gotchas when retargeting .net 2.0 to 3.5?
QUESTION:
I am currently working on a project that is moving from.NET 2.0 to 3.5 across the board. I am well aware that 3.5 is basically a set of added functionality (libraries, if you will) on top of what 2.0 offers. Are there any gotchas that I might hit... | [
".net"
] | 3 | 6 | 331 | 5 | 0 | 2008-09-11T19:52:23.380000 | 2008-09-11T20:01:07.727000 |
57,467 | 57,538 | Equivalent of svn's blame for Perforce | Is there an equivalent of svn's blame for Perforce on the command line? p4 annotate doesn't display usernames -- only changeset numbers (without ancestor history!). I currently have to track code back through ancestors and compare against the filelog, and there just has to be an easier way -- maybe a F/OSS utility? | Try taking a look at a couple of tools that I think could get you most of what you need: 1) p4pr Perl script by Bob Sidebotham and Jonathan Kamens. 2) Emacs Perforce interface has a command 'p4-print-with-rev-history' (bound to `C-x p V'). | Equivalent of svn's blame for Perforce Is there an equivalent of svn's blame for Perforce on the command line? p4 annotate doesn't display usernames -- only changeset numbers (without ancestor history!). I currently have to track code back through ancestors and compare against the filelog, and there just has to be an e... | TITLE:
Equivalent of svn's blame for Perforce
QUESTION:
Is there an equivalent of svn's blame for Perforce on the command line? p4 annotate doesn't display usernames -- only changeset numbers (without ancestor history!). I currently have to track code back through ancestors and compare against the filelog, and there j... | [
"svn",
"version-control",
"perforce"
] | 52 | 11 | 26,292 | 6 | 0 | 2008-09-11T19:55:27.303000 | 2008-09-11T20:30:03.803000 |
57,479 | 57,905 | AJAX dropdowns (HTML Select) in Firefox with jQuery | Help! I am using jQuery to make an AJAX call to fill in a drop-down dynamically given the user's previous input (from another drop-down, that is filled server-side). In all other browsers aside from Firefox (IE6/7, Opera, Safari), my append call actually appends the information below my existing option - "Select An ". ... | Can you just change your success function to reset the selected item to the first option? $("#Products").append(result).selectedIndex = 0; or to set it to the previous selection? var tmpIdx = $("#Products").selectedIndex; $("#Products").append(result).selectedIndex = tmpIdx; If the onChange event should not fire then y... | AJAX dropdowns (HTML Select) in Firefox with jQuery Help! I am using jQuery to make an AJAX call to fill in a drop-down dynamically given the user's previous input (from another drop-down, that is filled server-side). In all other browsers aside from Firefox (IE6/7, Opera, Safari), my append call actually appends the i... | TITLE:
AJAX dropdowns (HTML Select) in Firefox with jQuery
QUESTION:
Help! I am using jQuery to make an AJAX call to fill in a drop-down dynamically given the user's previous input (from another drop-down, that is filled server-side). In all other browsers aside from Firefox (IE6/7, Opera, Safari), my append call actu... | [
"jquery",
"ajax",
"html-select"
] | 1 | 2 | 14,567 | 3 | 0 | 2008-09-11T20:01:07.710000 | 2008-09-11T23:31:03.337000 |
57,484 | 57,526 | How do you "OR" criteria together when using a criteria query with hibernate? | I'm trying to do a basic "OR" on three fields using a hibernate criteria query. Example class Whatever{ string name; string address; string phoneNumber; } I'd like to build a criteria query where my search string could match "name" or "address" or "phoneNumber". | You want to use Restrictions.disjuntion(). Like so session.createCriteria(Whatever.class).add(Restrictions.disjunction().add(Restrictions.eq("name", queryString)).add(Restrictions.eq("address", queryString)).add(Restrictions.eq("phoneNumber", queryString)) ); See the Hibernate doc here. | How do you "OR" criteria together when using a criteria query with hibernate? I'm trying to do a basic "OR" on three fields using a hibernate criteria query. Example class Whatever{ string name; string address; string phoneNumber; } I'd like to build a criteria query where my search string could match "name" or "addres... | TITLE:
How do you "OR" criteria together when using a criteria query with hibernate?
QUESTION:
I'm trying to do a basic "OR" on three fields using a hibernate criteria query. Example class Whatever{ string name; string address; string phoneNumber; } I'd like to build a criteria query where my search string could match... | [
"java",
"hibernate"
] | 79 | 137 | 110,652 | 8 | 0 | 2008-09-11T20:04:17.563000 | 2008-09-11T20:23:55.940000 |
57,488 | 59,626 | .NET Date Const (with Globalization) | Does anyone know of a way to declare a date constant that is compatible with international dates? I've tried: ' not international compatible public const ADate as Date = #12/31/04#
' breaking change if you have an optional parameter that defaults to this value ' because it isnt constant. public shared readonly ADate A... | If you look at the IL generated by the statement public const ADate as Date = #12/31/04# You'll see this:.field public static initonly valuetype [mscorlib]System.DateTime ADate.custom instance void [mscorlib]System.Runtime.CompilerServices.DateTimeConstantAttribute::.ctor(int64) = ( 01 00 00 C0 2F CE E2 BC C6 08 00 00 ... | .NET Date Const (with Globalization) Does anyone know of a way to declare a date constant that is compatible with international dates? I've tried: ' not international compatible public const ADate as Date = #12/31/04#
' breaking change if you have an optional parameter that defaults to this value ' because it isnt con... | TITLE:
.NET Date Const (with Globalization)
QUESTION:
Does anyone know of a way to declare a date constant that is compatible with international dates? I've tried: ' not international compatible public const ADate as Date = #12/31/04#
' breaking change if you have an optional parameter that defaults to this value ' b... | [
"vb.net",
"datetime"
] | 5 | 6 | 14,246 | 5 | 0 | 2008-09-11T20:06:51.520000 | 2008-09-12T17:56:53.523000 |
57,493 | 58,443 | WPF Databind Before Saving | In my WPF application, I have a number of databound TextBoxes. The UpdateSourceTrigger for these bindings is LostFocus. The object is saved using the File menu. The problem I have is that it is possible to enter a new value into a TextBox, select Save from the File menu, and never persist the new value (the one visible... | Suppose you have a TextBox in a window, and a ToolBar with a Save button in it. Assume the TextBox’s Text property is bound to a property on a business object, and the binding’s UpdateSourceTrigger property is set to the default value of LostFocus, meaning that the bound value is pushed back to the business object prop... | WPF Databind Before Saving In my WPF application, I have a number of databound TextBoxes. The UpdateSourceTrigger for these bindings is LostFocus. The object is saved using the File menu. The problem I have is that it is possible to enter a new value into a TextBox, select Save from the File menu, and never persist the... | TITLE:
WPF Databind Before Saving
QUESTION:
In my WPF application, I have a number of databound TextBoxes. The UpdateSourceTrigger for these bindings is LostFocus. The object is saved using the File menu. The problem I have is that it is possible to enter a new value into a TextBox, select Save from the File menu, and... | [
"wpf",
"data-binding"
] | 41 | 6 | 12,842 | 12 | 0 | 2008-09-11T20:08:29.923000 | 2008-09-12T07:22:48.540000 |
57,494 | 57,516 | Recommendation on Tools to migrate from Clearcase to SVN? | I'm on the lookout for tools to migrate from ClearCase to SVN. Ideally would like to get all history information, or as much as can be acquired. Incremental merges would be very beneficial but isn't required. | This looks about the best. Polarion's business is SVN, so I guess they have a vested interest in making as many people as possible use it... Oh, back up all your data before hand, do it on a test repository first, etc, etc. | Recommendation on Tools to migrate from Clearcase to SVN? I'm on the lookout for tools to migrate from ClearCase to SVN. Ideally would like to get all history information, or as much as can be acquired. Incremental merges would be very beneficial but isn't required. | TITLE:
Recommendation on Tools to migrate from Clearcase to SVN?
QUESTION:
I'm on the lookout for tools to migrate from ClearCase to SVN. Ideally would like to get all history information, or as much as can be acquired. Incremental merges would be very beneficial but isn't required.
ANSWER:
This looks about the best.... | [
"svn",
"migration",
"clearcase"
] | 6 | 2 | 6,887 | 5 | 0 | 2008-09-11T20:08:32.187000 | 2008-09-11T20:19:01.613000 |
57,518 | 57,532 | Is it possible for SelectNodes on an XmlDocument to return null? | Is it possible for SelectNodes() called on an XmlDocument to return null? My predicament is that I am trying to reach 100% unit test code coverage; ReSharper tells me that I need to guard against a null return from the SelectNodes() method, but I can see no way that an XmlDocument can return null (and therefore, no way... | Is it necessary to reach 100% code coverage? Indeed, is it even possible under normal (i.e. controllable, testable) circumstances? We often find that using "syntactic sugar" constructions like the using {} block, there are "hidden" code paths created (most likely finally {} or catch {} blocks) that can't be exercised u... | Is it possible for SelectNodes on an XmlDocument to return null? Is it possible for SelectNodes() called on an XmlDocument to return null? My predicament is that I am trying to reach 100% unit test code coverage; ReSharper tells me that I need to guard against a null return from the SelectNodes() method, but I can see ... | TITLE:
Is it possible for SelectNodes on an XmlDocument to return null?
QUESTION:
Is it possible for SelectNodes() called on an XmlDocument to return null? My predicament is that I am trying to reach 100% unit test code coverage; ReSharper tells me that I need to guard against a null return from the SelectNodes() meth... | [
".net",
"xml",
"unit-testing",
"resharper"
] | 9 | 2 | 3,815 | 3 | 0 | 2008-09-11T20:20:29.317000 | 2008-09-11T20:27:05.993000 |
57,522 | 57,531 | Javascript array with a mix of literals and arrays | I can create the following and reference it using area[0].states[0] area[0].cities[0]
var area = [ { "State": "Texas", "Cities": ['Austin','Dallas','San Antonio'] }, { "State":"Arkansas", "Cities": ['Little Rock','Texarkana','Hot Springs'] } ]; How could I restructure "area" so that if I know the name of the state, I ... | If you want to just create it that way to begin with, just say area = { "Texas": ['Austin','Dallas','San Antonio'] } and so on. If you're asking how to take an existing object and convert it into this, just say states = {} for(var j=0; j After running the above code, you could say states["Texas"] which would return ['A... | Javascript array with a mix of literals and arrays I can create the following and reference it using area[0].states[0] area[0].cities[0]
var area = [ { "State": "Texas", "Cities": ['Austin','Dallas','San Antonio'] }, { "State":"Arkansas", "Cities": ['Little Rock','Texarkana','Hot Springs'] } ]; How could I restructure... | TITLE:
Javascript array with a mix of literals and arrays
QUESTION:
I can create the following and reference it using area[0].states[0] area[0].cities[0]
var area = [ { "State": "Texas", "Cities": ['Austin','Dallas','San Antonio'] }, { "State":"Arkansas", "Cities": ['Little Rock','Texarkana','Hot Springs'] } ]; How c... | [
"javascript",
"jquery"
] | 3 | 1 | 5,218 | 4 | 0 | 2008-09-11T20:22:31.123000 | 2008-09-11T20:26:52.610000 |
57,528 | 57,693 | parametrization in VBScript/ASP Classic and ADO | I'm a bit confused here. Microsoft as far as I can tell claims that parametrization is the best way to protect your database from SQL injection attacks. But I find two conflicting sources of information here: This page says to use the ADO command object. But this page says that the command object isn't safe for scripti... | I could be wrong here, but I think this just means that someone could use the Command object to do bad things. I.e. it's not to be trusted if someone else is scripting it. See safe for scripting in this article. Every instance that talks about this phrase online, references it as if you are marking an ActiveX control s... | parametrization in VBScript/ASP Classic and ADO I'm a bit confused here. Microsoft as far as I can tell claims that parametrization is the best way to protect your database from SQL injection attacks. But I find two conflicting sources of information here: This page says to use the ADO command object. But this page say... | TITLE:
parametrization in VBScript/ASP Classic and ADO
QUESTION:
I'm a bit confused here. Microsoft as far as I can tell claims that parametrization is the best way to protect your database from SQL injection attacks. But I find two conflicting sources of information here: This page says to use the ADO command object.... | [
"sql-server",
"asp-classic",
"vbscript",
"ado"
] | 4 | 4 | 1,392 | 2 | 0 | 2008-09-11T20:26:20.740000 | 2008-09-11T21:21:19.937000 |
57,530 | 1,821,631 | Any tool to migrate repo from Vault to Subversion? | Are there any tools to facilitate a migration from Sourcegear's Vault to Subversion? I'd really prefer an existing tool or project (I'll buy!). Requirements: One-time migration only Full history with comments Optional: Some support for labels/branches/tags Relatively speedy. It can take hours but not days. Cost if avai... | We are thinking about migrating from vault to git. I wrote vault2git converter that takes care of history and removes vault bindings from *.sln, *.csproj files. Once you have git repo, there is git2svn. I know it sounds like going rounds, but it might be faster than writing vault2svn from scratch. | Any tool to migrate repo from Vault to Subversion? Are there any tools to facilitate a migration from Sourcegear's Vault to Subversion? I'd really prefer an existing tool or project (I'll buy!). Requirements: One-time migration only Full history with comments Optional: Some support for labels/branches/tags Relatively s... | TITLE:
Any tool to migrate repo from Vault to Subversion?
QUESTION:
Are there any tools to facilitate a migration from Sourcegear's Vault to Subversion? I'd really prefer an existing tool or project (I'll buy!). Requirements: One-time migration only Full history with comments Optional: Some support for labels/branches... | [
"svn",
"version-control",
"sourcegear-vault",
"version-control-migration"
] | 16 | 19 | 4,353 | 5 | 0 | 2008-09-11T20:26:49.973000 | 2009-11-30T18:45:14.853000 |
57,537 | 57,595 | Accessing Tomcat Context Path from Servlet | In my Servlet I would like to access the root of the context so that I can do some JavaScript minifying. It would be possible to do the minify as part of the install process but I would like to do it on Servlet startup to reduce the implementation cost. Does anyone know of a method for getting the context directory so ... | This should give you the real path that you can use to extract / edit files. Javadoc Link We're doing something similar in a context listener. public class MyServlet extends HttpServlet {
public void init(final ServletConfig config) { final String context = config.getServletContext().getRealPath("/");... }... } | Accessing Tomcat Context Path from Servlet In my Servlet I would like to access the root of the context so that I can do some JavaScript minifying. It would be possible to do the minify as part of the install process but I would like to do it on Servlet startup to reduce the implementation cost. Does anyone know of a m... | TITLE:
Accessing Tomcat Context Path from Servlet
QUESTION:
In my Servlet I would like to access the root of the context so that I can do some JavaScript minifying. It would be possible to do the minify as part of the install process but I would like to do it on Servlet startup to reduce the implementation cost. Does ... | [
"java",
"tomcat",
"servlets"
] | 6 | 14 | 24,290 | 4 | 0 | 2008-09-11T20:28:31.887000 | 2008-09-11T20:49:26.253000 |
57,547 | 57,582 | IMAP forwarder | I'm wondering what is the quickest and most reliable way to forward mail from an IMAP account. My university does not allow our student-mailbox to forward to a private e-mail account (everybody uses either Gmail or Hotmail here). It's a political thing, not technical. We do have IMAP access to the mailbox. I would like... | You might want to look at Fetchmail, as this sounds like the problem it was designed to solve. Fetchmail retrieves mail from POP/IMAP/etc servers and forwards it to SMTP/LMTP/etc servers. Fetchmail has the advantage of a few years and lots of users ironing out problems with various IMAP servers. | IMAP forwarder I'm wondering what is the quickest and most reliable way to forward mail from an IMAP account. My university does not allow our student-mailbox to forward to a private e-mail account (everybody uses either Gmail or Hotmail here). It's a political thing, not technical. We do have IMAP access to the mailbo... | TITLE:
IMAP forwarder
QUESTION:
I'm wondering what is the quickest and most reliable way to forward mail from an IMAP account. My university does not allow our student-mailbox to forward to a private e-mail account (everybody uses either Gmail or Hotmail here). It's a political thing, not technical. We do have IMAP ac... | [
"web-services",
"email",
"web-applications",
"imap",
"forwarding"
] | 9 | 5 | 5,519 | 3 | 0 | 2008-09-11T20:32:41.643000 | 2008-09-11T20:45:33.157000 |
57,549 | 57,636 | GPS and Embedded Development - Where to find resources? | I'm just starting to design some embedded devices, and am looking for resources. What I want to be able to do is to connect a GPS receiver to a lightweight SBC or mini-ITX, x86-based computer, and track a remote-controlled vehicle's location/progress. Ideally, this could morph into building some hobby, semi-autonomous ... | OpenEmbedded is a good place to go to get started. A lot of embedded products use ARM and other processors, so cross-compiling is a big deal. Buildroot is another resource for building custom linux kernels for small systems. You can also find lots of manufacturers with Single Board Computers (SBCs) that have tools to d... | GPS and Embedded Development - Where to find resources? I'm just starting to design some embedded devices, and am looking for resources. What I want to be able to do is to connect a GPS receiver to a lightweight SBC or mini-ITX, x86-based computer, and track a remote-controlled vehicle's location/progress. Ideally, thi... | TITLE:
GPS and Embedded Development - Where to find resources?
QUESTION:
I'm just starting to design some embedded devices, and am looking for resources. What I want to be able to do is to connect a GPS receiver to a lightweight SBC or mini-ITX, x86-based computer, and track a remote-controlled vehicle's location/prog... | [
"gps",
"embedded"
] | 3 | 5 | 3,859 | 8 | 0 | 2008-09-11T20:34:16.447000 | 2008-09-11T21:01:16.507000 |
57,552 | 59,210 | AJAX Dropdown Extender Question | Ok, so I got my extender working on a default.aspx page on my website and it looks good. I basically copied and pasted the code for it into a user control control.ascx page. When I do this I completely loose the functionality (just shows the target control label and no dropdown, even upon hover). Is there any reason wh... | I don't know if this helps, but I had the same problem with the autocomplete extender and determined that the server-side function could not be in the user control, but needed to be on the page (or in a webservice, I guess). Once I moved the function, it worked fine. | AJAX Dropdown Extender Question Ok, so I got my extender working on a default.aspx page on my website and it looks good. I basically copied and pasted the code for it into a user control control.ascx page. When I do this I completely loose the functionality (just shows the target control label and no dropdown, even upo... | TITLE:
AJAX Dropdown Extender Question
QUESTION:
Ok, so I got my extender working on a default.aspx page on my website and it looks good. I basically copied and pasted the code for it into a user control control.ascx page. When I do this I completely loose the functionality (just shows the target control label and no ... | [
"asp.net",
"asp.net-ajax",
"dropdownextender"
] | 2 | 0 | 1,968 | 5 | 0 | 2008-09-11T20:34:43.760000 | 2008-09-12T15:04:14.657000 |
57,560 | 205,258 | How do I check that a Windows QFE/patch has been installed from c#? | What's the best way in c# to determine is a given QFE/patch has been installed? | Use WMI and inspect the Win32_QuickFixEngineering enumeration. From TechNet: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colQuickFixes = objWMIService.ExecQuery _ ("Select * from Win32_QuickFixEngineering") For Each objQuickFix... | How do I check that a Windows QFE/patch has been installed from c#? What's the best way in c# to determine is a given QFE/patch has been installed? | TITLE:
How do I check that a Windows QFE/patch has been installed from c#?
QUESTION:
What's the best way in c# to determine is a given QFE/patch has been installed?
ANSWER:
Use WMI and inspect the Win32_QuickFixEngineering enumeration. From TechNet: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{im... | [
"c#",
"windows",
"qfe"
] | 2 | 2 | 4,171 | 2 | 0 | 2008-09-11T20:38:31.427000 | 2008-10-15T15:47:52.547000 |
57,567 | 57,650 | Handles vs. AddHandler | Is there an advantage to dynamically attaching/detaching event handlers? Would manually detaching handlers help ensure that there isn't a reference remaining to a disposed object? | It's not a question of using AddHandler versus Handles. If you are concerned about the reference to your event handler interfering with garbage collection, you should use RemoveHandler, regardless of how the handler was attached. In the form or control's Dispose method, remove any handlers. I have had situations in Win... | Handles vs. AddHandler Is there an advantage to dynamically attaching/detaching event handlers? Would manually detaching handlers help ensure that there isn't a reference remaining to a disposed object? | TITLE:
Handles vs. AddHandler
QUESTION:
Is there an advantage to dynamically attaching/detaching event handlers? Would manually detaching handlers help ensure that there isn't a reference remaining to a disposed object?
ANSWER:
It's not a question of using AddHandler versus Handles. If you are concerned about the ref... | [
"vb.net",
".net-3.5",
"garbage-collection"
] | 2 | 2 | 3,797 | 7 | 0 | 2008-09-11T20:40:57.117000 | 2008-09-11T21:04:42.253000 |
57,577 | 57,593 | How do I merge XML from distinct DomDocuments | What is the easiest way to merge XML from two distinct DOM Documents? Is there a way other than using the Canonical DataReader approach and then messing with the outputted DOM. What I basically want is to AppendChild to XmlElements without getting: The node to be inserted is from a different document context. Here is C... | You can use the XmlDocument.ImportNode method to copy a node from a XmlDocument to another. | How do I merge XML from distinct DomDocuments What is the easiest way to merge XML from two distinct DOM Documents? Is there a way other than using the Canonical DataReader approach and then messing with the outputted DOM. What I basically want is to AppendChild to XmlElements without getting: The node to be inserted i... | TITLE:
How do I merge XML from distinct DomDocuments
QUESTION:
What is the easiest way to merge XML from two distinct DOM Documents? Is there a way other than using the Canonical DataReader approach and then messing with the outputted DOM. What I basically want is to AppendChild to XmlElements without getting: The nod... | [
".net",
"xml"
] | 2 | 5 | 2,690 | 2 | 0 | 2008-09-11T20:43:26.690000 | 2008-09-11T20:49:08.047000 |
57,584 | 58,102 | How can I make a ListView's columns auto-resize programmatically? | I've found some examples using the Win32 api or simulating the ^+ button combination ( ctrl - + ) using SendKeys, but at least with the SendKeys method the listview grabs the cursor and sets it to an hourglass until I hit the start button on my keyboard. What is the cleanest way to do this? | Looks like a call to myListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent) will do what you want. I would think, just call it after adding an item. More info here | How can I make a ListView's columns auto-resize programmatically? I've found some examples using the Win32 api or simulating the ^+ button combination ( ctrl - + ) using SendKeys, but at least with the SendKeys method the listview grabs the cursor and sets it to an hourglass until I hit the start button on my keyboard.... | TITLE:
How can I make a ListView's columns auto-resize programmatically?
QUESTION:
I've found some examples using the Win32 api or simulating the ^+ button combination ( ctrl - + ) using SendKeys, but at least with the SendKeys method the listview grabs the cursor and sets it to an hourglass until I hit the start butt... | [
".net",
"windows",
"user-interface",
"controls"
] | 5 | 20 | 33,893 | 4 | 0 | 2008-09-11T20:46:12.627000 | 2008-09-12T01:25:25.590000 |
57,586 | 59,480 | ASP.Net UpdatePanel ImageButton causes "this._postbackSettings.async is null or not an object" | I get this error on an update panel within a popupControlExtender which is within a dragPanelExtender. I see that a lot of other people have this issue and have various fixes none of which have worked for me. I would love to hear a logical explanation for why this is occurring and a foolproof way to avoid such issues i... | My best guess is that the UpdatePanel is not able to write out the custom "async" property to the postback request properly. This is likely due to blocking from one of the controls wrapping it (my gut feeling is that it's the popupControlExtender - it tends to have odd behavior with updatepanels, as it is intended to m... | ASP.Net UpdatePanel ImageButton causes "this._postbackSettings.async is null or not an object" I get this error on an update panel within a popupControlExtender which is within a dragPanelExtender. I see that a lot of other people have this issue and have various fixes none of which have worked for me. I would love to ... | TITLE:
ASP.Net UpdatePanel ImageButton causes "this._postbackSettings.async is null or not an object"
QUESTION:
I get this error on an update panel within a popupControlExtender which is within a dragPanelExtender. I see that a lot of other people have this issue and have various fixes none of which have worked for me... | [
"asp.net",
"asp.net-ajax",
"updatepanel"
] | 3 | 1 | 7,066 | 3 | 0 | 2008-09-11T20:46:31.423000 | 2008-09-12T16:44:49.017000 |
57,599 | 57,720 | How to calculate age in T-SQL with years, months, and days | What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)? The datediff function doesn't handle year boundaries well, plus getting the months and days separate will be a bear. I know I can do it on the client side relatively easily, but I'd like to have it done in my st... | Here is some T-SQL that gives you the number of years, months, and days since the day specified in @date. It takes into account the fact that DATEDIFF() computes the difference without considering what month or day it is (so the month diff between 8/31 and 9/1 is 1 month) and handles that with a case statement that dec... | How to calculate age in T-SQL with years, months, and days What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)? The datediff function doesn't handle year boundaries well, plus getting the months and days separate will be a bear. I know I can do it on the client si... | TITLE:
How to calculate age in T-SQL with years, months, and days
QUESTION:
What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)? The datediff function doesn't handle year boundaries well, plus getting the months and days separate will be a bear. I know I can do i... | [
"t-sql",
"datediff"
] | 56 | 79 | 172,018 | 27 | 0 | 2008-09-11T20:50:49.883000 | 2008-09-11T21:34:02.573000 |
57,600 | 57,611 | Continue Considered Harmful? | Should developers avoid using continue in C# or its equivalent in other languages to force the next iteration of a loop? Would arguments for or against overlap with arguments about Goto? | I think there should be more use of continue! Too often I come across code like: for (...) { if (!cond1) { if (!cond2) {... highly indented lines... } } } instead of for (...) { if (cond1 || cond2) { continue; }... } Use it to make the code more readable! | Continue Considered Harmful? Should developers avoid using continue in C# or its equivalent in other languages to force the next iteration of a loop? Would arguments for or against overlap with arguments about Goto? | TITLE:
Continue Considered Harmful?
QUESTION:
Should developers avoid using continue in C# or its equivalent in other languages to force the next iteration of a loop? Would arguments for or against overlap with arguments about Goto?
ANSWER:
I think there should be more use of continue! Too often I come across code li... | [
"language-agnostic",
"loops",
"goto",
"continue"
] | 22 | 81 | 3,402 | 17 | 0 | 2008-09-11T20:50:57.623000 | 2008-09-11T20:54:55.477000 |
57,609 | 57,965 | Save registry values in WinCE using a C# app | I'm working on a WinCE 6.0 system with a touchscreen that stores its calibration data (x-y location, offset, etc.) in the system registry (HKLM\HARDWARE\TOUCH). Right now, I'm placing the cal values into registry keys that get put into the OS image at build time. That works fine for the monitor that I get the original ... | I think what you're probably looking for is the Flush function of the RegistryKey class. This is normally not necessary (the registry is lazily-flushed by default), but if the power is turned off on the device before the system has a chance to do this, changes will be discarded: http://msdn.microsoft.com/en-us/library/... | Save registry values in WinCE using a C# app I'm working on a WinCE 6.0 system with a touchscreen that stores its calibration data (x-y location, offset, etc.) in the system registry (HKLM\HARDWARE\TOUCH). Right now, I'm placing the cal values into registry keys that get put into the OS image at build time. That works ... | TITLE:
Save registry values in WinCE using a C# app
QUESTION:
I'm working on a WinCE 6.0 system with a touchscreen that stores its calibration data (x-y location, offset, etc.) in the system registry (HKLM\HARDWARE\TOUCH). Right now, I'm placing the cal values into registry keys that get put into the OS image at build... | [
"c#",
"registry",
"windows-ce"
] | 3 | 3 | 11,406 | 3 | 0 | 2008-09-11T20:54:07.770000 | 2008-09-11T23:55:48.863000 |
57,622 | 57,697 | PHP Object Oriented or not? | I have a start of a webapp that I wrote without using the Object Oriented features of PHP. I don't really know if it is worth it to go back and rewrite the parts I have finished. Is object oriented PHP worth rewriting all or part of a decent working app? | Given that you have an incomplete app I would say that reworking it into an Object based app will probably be helpful. One thing to consider is the expected size of the end application. Below a certain complexity Object based may be overkill except for the learning experience. I started out avoiding Objects like the pl... | PHP Object Oriented or not? I have a start of a webapp that I wrote without using the Object Oriented features of PHP. I don't really know if it is worth it to go back and rewrite the parts I have finished. Is object oriented PHP worth rewriting all or part of a decent working app? | TITLE:
PHP Object Oriented or not?
QUESTION:
I have a start of a webapp that I wrote without using the Object Oriented features of PHP. I don't really know if it is worth it to go back and rewrite the parts I have finished. Is object oriented PHP worth rewriting all or part of a decent working app?
ANSWER:
Given that... | [
"php",
"oop",
"web-applications"
] | 10 | 20 | 5,330 | 10 | 0 | 2008-09-11T20:57:20.040000 | 2008-09-11T21:24:43.860000 |
57,625 | 57,664 | How do you lock tables in SQL Server 2005, and should I even do it? | This one will take some explaining. What I've done is create a specific custom message queue in SQL Server 2005. I have a table with messages that contain timestamps for both acknowledgment and completion. The stored procedure that callers execute to obtain the next message in their queue also acknowledges the message.... | Something like this --Grab the next message id begin tran declare @MessageId uniqueidentifier select top 1 @MessageId = ActionMessageId from UnacknowledgedDemands with(holdlock, updlock);
--Acknowledge the message update ActionMessages set AcknowledgedTime = getdate() where ActionMessageId = @MessageId
-- some error ... | How do you lock tables in SQL Server 2005, and should I even do it? This one will take some explaining. What I've done is create a specific custom message queue in SQL Server 2005. I have a table with messages that contain timestamps for both acknowledgment and completion. The stored procedure that callers execute to o... | TITLE:
How do you lock tables in SQL Server 2005, and should I even do it?
QUESTION:
This one will take some explaining. What I've done is create a specific custom message queue in SQL Server 2005. I have a table with messages that contain timestamps for both acknowledgment and completion. The stored procedure that ca... | [
"sql-server",
"t-sql"
] | 13 | 7 | 29,325 | 7 | 0 | 2008-09-11T20:57:48.933000 | 2008-09-11T21:09:57 |
57,665 | 245,486 | How do I expose data in a JSON format through a web service using Rails? | Is there an easy way to return data to web service clients in JSON using Rails? | Rails resource gives a RESTful interface for your model. Let's see. Model class Contact < ActiveRecord::Base... end Routes map.resources:contacts Controller class ContactsController < ApplicationController... def show @contact = Contact.find(params[:id]
respond_to do |format| format.html format.xml {render:xml => @con... | How do I expose data in a JSON format through a web service using Rails? Is there an easy way to return data to web service clients in JSON using Rails? | TITLE:
How do I expose data in a JSON format through a web service using Rails?
QUESTION:
Is there an easy way to return data to web service clients in JSON using Rails?
ANSWER:
Rails resource gives a RESTful interface for your model. Let's see. Model class Contact < ActiveRecord::Base... end Routes map.resources:con... | [
"ruby-on-rails",
"web-services",
"json"
] | 6 | 11 | 4,713 | 5 | 0 | 2008-09-11T21:09:58.373000 | 2008-10-29T01:26:16.420000 |
57,679 | 57,997 | How can I determine why a jQuery ajax $.post request wasn't successful? | I'm trying to determine, based on the result of this call, if it was successful. The successFunction doesn't get called, so I'm assuming it was not. How do I know what went wrong? xmlRequest = $.post("/url/file/", { 'id': object.id }, successFunction, 'json'); Do I use the xmlRequest object? | You can use: $.ajax({ url:"/url/file/", dataType:"json" data:{ 'id': object.id } error:function(request){alert(request.statusText)} success:successFunction }) | How can I determine why a jQuery ajax $.post request wasn't successful? I'm trying to determine, based on the result of this call, if it was successful. The successFunction doesn't get called, so I'm assuming it was not. How do I know what went wrong? xmlRequest = $.post("/url/file/", { 'id': object.id }, successFuncti... | TITLE:
How can I determine why a jQuery ajax $.post request wasn't successful?
QUESTION:
I'm trying to determine, based on the result of this call, if it was successful. The successFunction doesn't get called, so I'm assuming it was not. How do I know what went wrong? xmlRequest = $.post("/url/file/", { 'id': object.i... | [
"jquery",
"ajax",
"post"
] | 4 | 9 | 3,272 | 2 | 0 | 2008-09-11T21:13:53.260000 | 2008-09-12T00:22:10.453000 |
57,683 | 130,417 | SSRS - Sub Totals Customization - Moving Column to beginning of line | I Have a request for the TOTAL's and subtotals column to be moved to the top/left of columns it represents, and by default SSRS does it on the bottom or right hand side of the columns being totaled. Is there a way to this? | I found my own solution, when you right click on the tiny green triangle, in the top right hand corner of the sub total column. Then select properties, and you can adjust the "Layout" property.. it has 2 options, Before and After. | SSRS - Sub Totals Customization - Moving Column to beginning of line I Have a request for the TOTAL's and subtotals column to be moved to the top/left of columns it represents, and by default SSRS does it on the bottom or right hand side of the columns being totaled. Is there a way to this? | TITLE:
SSRS - Sub Totals Customization - Moving Column to beginning of line
QUESTION:
I Have a request for the TOTAL's and subtotals column to be moved to the top/left of columns it represents, and by default SSRS does it on the bottom or right hand side of the columns being totaled. Is there a way to this?
ANSWER:
I... | [
"sql-server",
"reporting-services",
"ssrs-2008"
] | 0 | 2 | 2,954 | 2 | 0 | 2008-09-11T21:14:59.063000 | 2008-09-24T22:48:29.967000 |
57,689 | 58,124 | How do I expose data in a JSON format through a web service using Java? | Is there an easy way to return data to web service clients in JSON using java? I'm fine with servlets, spring, etc. | To me, the best Java <-> JSON parser is XStream (yes, I'm really talking about json, not about xml). XStream already deals with circular dependencies and has a simple and powerful api where you could write yours drivers, converters and so on. Kind Regards | How do I expose data in a JSON format through a web service using Java? Is there an easy way to return data to web service clients in JSON using java? I'm fine with servlets, spring, etc. | TITLE:
How do I expose data in a JSON format through a web service using Java?
QUESTION:
Is there an easy way to return data to web service clients in JSON using java? I'm fine with servlets, spring, etc.
ANSWER:
To me, the best Java <-> JSON parser is XStream (yes, I'm really talking about json, not about xml). XStr... | [
"java",
"web-services",
"json"
] | 22 | 5 | 29,965 | 9 | 0 | 2008-09-11T21:19:30.643000 | 2008-09-12T01:40:11.513000 |
57,701 | 57,828 | What are the performance characteristics of 'is' reflection in C#? | It's shown that 'as' casting is much faster than prefix casting, but what about 'is' reflection? How bad is it? As you can imagine, searching for 'is' on Google isn't terribly effective. | There are a few options: The classic cast: Foo foo = (Foo)bar The as cast operator: Foo foo = bar as Foo The is test: bool is = bar is Foo The classic cast needs to check if bar can be safely cast to Foo (quick), and then actually do it (slower), or throw an exception (really slow). The as operator needs to check if ba... | What are the performance characteristics of 'is' reflection in C#? It's shown that 'as' casting is much faster than prefix casting, but what about 'is' reflection? How bad is it? As you can imagine, searching for 'is' on Google isn't terribly effective. | TITLE:
What are the performance characteristics of 'is' reflection in C#?
QUESTION:
It's shown that 'as' casting is much faster than prefix casting, but what about 'is' reflection? How bad is it? As you can imagine, searching for 'is' on Google isn't terribly effective.
ANSWER:
There are a few options: The classic ca... | [
"c#",
"reflection"
] | 21 | 20 | 4,717 | 4 | 0 | 2008-09-11T21:25:23.030000 | 2008-09-11T22:39:58 |
57,712 | 57,738 | ASP.NET MVC and IIS 5 | What is the best way to get hosting of an ASP.NET MVC application to work on IIS 5 (6 or 7). When I tried to publish my ASP.NET MVC application, all I seemed to get is 404 errors. I've done a bit of googleing and have found a couple of solutions, but neither seem super elegant, and I worry if they will be unusable once... | Answer is here If *.mvc extension is not registered to the hosting, it will give 404 exception. The working way of hosting MVC apps in that case is to modify global.asax routing caluse in the following way. routes.Add(new Route("{controller}.mvc.aspx/{action}", new MvcRouteHandler()) { Defaults = new RouteValueDictiona... | ASP.NET MVC and IIS 5 What is the best way to get hosting of an ASP.NET MVC application to work on IIS 5 (6 or 7). When I tried to publish my ASP.NET MVC application, all I seemed to get is 404 errors. I've done a bit of googleing and have found a couple of solutions, but neither seem super elegant, and I worry if they... | TITLE:
ASP.NET MVC and IIS 5
QUESTION:
What is the best way to get hosting of an ASP.NET MVC application to work on IIS 5 (6 or 7). When I tried to publish my ASP.NET MVC application, all I seemed to get is 404 errors. I've done a bit of googleing and have found a couple of solutions, but neither seem super elegant, a... | [
"asp.net-mvc",
"iis",
"shared-hosting"
] | 24 | 13 | 21,274 | 5 | 0 | 2008-09-11T21:30:50.740000 | 2008-09-11T21:45:41.470000 |
57,718 | 58,137 | Anyone using the Entity Framework *Well*? | Has anyone actually shipped an Entity Framework project that does O/R mapping into conceptual classes that are quite different from the tables in the datastore? I mean collapse junction (M:M) tables into other entities to form Conceptual classes that exist in the business domain but are organized as multiple tables in ... | I attempted to use the Entity Framework on an existing project (~60 tables, 3 with inheritance) just to see what it was all about. My experience boiled down to: The designer surface is kludgy. The mapping isn’t intuitive and someone must have thought that having several tool windows open at the same time is acceptable.... | Anyone using the Entity Framework *Well*? Has anyone actually shipped an Entity Framework project that does O/R mapping into conceptual classes that are quite different from the tables in the datastore? I mean collapse junction (M:M) tables into other entities to form Conceptual classes that exist in the business domai... | TITLE:
Anyone using the Entity Framework *Well*?
QUESTION:
Has anyone actually shipped an Entity Framework project that does O/R mapping into conceptual classes that are quite different from the tables in the datastore? I mean collapse junction (M:M) tables into other entities to form Conceptual classes that exist in ... | [
".net",
"entity-framework",
"orm",
"ado.net"
] | 12 | 5 | 1,886 | 3 | 0 | 2008-09-11T21:32:50.393000 | 2008-09-12T01:49:31.587000 |
57,725 | 57,729 | How can I display just a portion of an image in HTML/CSS? | Let's say I want a way to display just the the center 50x50px of an image that's 250x250px in HTML. How can I do that. Also, is there a way to do this for css:url() references? I'm aware of clip in CSS, but that seems to only work when used with absolute positioning. | One way to do it is to set the image you want to display as a background in a container (td, div, span etc) and then adjust background-position to get the sprite you want. | How can I display just a portion of an image in HTML/CSS? Let's say I want a way to display just the the center 50x50px of an image that's 250x250px in HTML. How can I do that. Also, is there a way to do this for css:url() references? I'm aware of clip in CSS, but that seems to only work when used with absolute positio... | TITLE:
How can I display just a portion of an image in HTML/CSS?
QUESTION:
Let's say I want a way to display just the the center 50x50px of an image that's 250x250px in HTML. How can I do that. Also, is there a way to do this for css:url() references? I'm aware of clip in CSS, but that seems to only work when used wit... | [
"html",
"css",
"image"
] | 181 | 130 | 322,717 | 6 | 0 | 2008-09-11T21:35:44.567000 | 2008-09-11T21:37:29.007000 |
57,730 | 58,038 | Best build process solution to manage build versions | I run a rather complex project with several independent applications. These use however a couple of shared components. So I have a source tree looking something like the below. My Project Application A Shared1 Shared2 Application B Application C All applications have their own MSBuild script that builds the project and... | Your scheme is sound and achievable in VSS (although I would suggest you consider an alternative, VSS is really an outdated product). For your "CI" Build - you would do the Versioning take a look at MSBuild Community Tasks Project which has a "Version" tasks. Typically you will have a "Version.txt" in your source tree ... | Best build process solution to manage build versions I run a rather complex project with several independent applications. These use however a couple of shared components. So I have a source tree looking something like the below. My Project Application A Shared1 Shared2 Application B Application C All applications have... | TITLE:
Best build process solution to manage build versions
QUESTION:
I run a rather complex project with several independent applications. These use however a couple of shared components. So I have a source tree looking something like the below. My Project Application A Shared1 Shared2 Application B Application C All... | [
"version-control",
"msbuild",
"build-process",
"cruisecontrol.net"
] | 4 | 8 | 1,967 | 4 | 0 | 2008-09-11T21:40:05.383000 | 2008-09-12T00:47:55.197000 |
57,739 | 57,756 | What is the best workaround for the ASP.NET forms authentication timeout when using wildcard mapping? | My team is working on a crappy old website and most of the pages are still ASP classic. However, we've recently migrated to forms authentication using ASP.NET and wildcard mapping. Everything works surprisingly well except for one thing: logged in users are timing out too quickly. After looking in the logs it appears p... | Create a perpetual session. Essentially you end up emitting some JavaScript and an image tag in your master page or navigation users controls (whatever you're using for consistent navigation). This JavaScript on some interval changes the source of the image tag to an http handler endpoint (some.aspx,.ashx) which return... | What is the best workaround for the ASP.NET forms authentication timeout when using wildcard mapping? My team is working on a crappy old website and most of the pages are still ASP classic. However, we've recently migrated to forms authentication using ASP.NET and wildcard mapping. Everything works surprisingly well ex... | TITLE:
What is the best workaround for the ASP.NET forms authentication timeout when using wildcard mapping?
QUESTION:
My team is working on a crappy old website and most of the pages are still ASP classic. However, we've recently migrated to forms authentication using ASP.NET and wildcard mapping. Everything works su... | [
"asp.net",
"forms-authentication",
"wildcard-mapping"
] | 2 | 2 | 1,057 | 2 | 0 | 2008-09-11T21:45:51.047000 | 2008-09-11T21:56:27.747000 |
57,747 | 69,981 | Setting up Team foundation server | I have to setup team foundation server for a company, something that I don't have any experience in. The company will have about 5 or so developers that will be using it. Is this a big task or something that is fairly easy to do (with instructions)? Any helpful tutorials that you can recommend? Any recommendations on s... | Your first step should be to download the latest TFS Installation Guide (TFSInstall.chm) from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=FF12844F-398C-4FE9-8B0D-9E84181D9923&displaylang=en You should use TFS 2008 SP1, since it is the latest release and includes many new features and performance impr... | Setting up Team foundation server I have to setup team foundation server for a company, something that I don't have any experience in. The company will have about 5 or so developers that will be using it. Is this a big task or something that is fairly easy to do (with instructions)? Any helpful tutorials that you can r... | TITLE:
Setting up Team foundation server
QUESTION:
I have to setup team foundation server for a company, something that I don't have any experience in. The company will have about 5 or so developers that will be using it. Is this a big task or something that is fairly easy to do (with instructions)? Any helpful tutori... | [
"tfs"
] | 25 | 20 | 26,967 | 5 | 0 | 2008-09-11T21:53:51.807000 | 2008-09-16T07:08:04.953000 |
57,751 | 57,794 | Emacs query-replace with textual transformation | I want to find any text in a file that matches a regexp of the form t [A-Z] u (i.e., a match t followed by a capital letter and another match u, and transform the matched text so that the capital letter is lowercase. For example, for the regexp x[A-Z]y xAy becomes xay and xZy becomes xzy Emacs' query-replace function a... | It looks like Steve Yegge actually already posted the answer to this a few years back: "Shiny and New: Emacs 22." Scroll down to "Changing Case in Replacement Strings" and you'll see his example code using the replace-regexp function. The general answer is that you use "\," to call any lisp expression as part of the re... | Emacs query-replace with textual transformation I want to find any text in a file that matches a regexp of the form t [A-Z] u (i.e., a match t followed by a capital letter and another match u, and transform the matched text so that the capital letter is lowercase. For example, for the regexp x[A-Z]y xAy becomes xay and... | TITLE:
Emacs query-replace with textual transformation
QUESTION:
I want to find any text in a file that matches a regexp of the form t [A-Z] u (i.e., a match t followed by a capital letter and another match u, and transform the matched text so that the capital letter is lowercase. For example, for the regexp x[A-Z]y x... | [
"regex",
"emacs"
] | 10 | 14 | 2,995 | 3 | 0 | 2008-09-11T21:54:47.377000 | 2008-09-11T22:19:19.673000 |
57,759 | 58,297 | Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? | I'm working on an installer (using Wise Installer, older version from like 1999). I'm creating a shortcut in the Programs group to an EXE. I'm also creating a shortcut on the Desktop. If the install is run from an Admin account, then I create the shortcut on the Common Desktop and Common Program Group (i.e., read from ... | Vista does some nifty transparent redirection to provide backwards compatibility with non-vista applications. Try installing to the All Users location as a non-admin, and Vista should transparently put your shortcuts somewhere unique to that user. | Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? I'm working on an installer (using Wise Installer, older version from like 1999). I'm creating a shortcut in the Programs group to an EXE. I'm also creating a shortcut on the Desktop. ... | TITLE:
Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account?
QUESTION:
I'm working on an installer (using Wise Installer, older version from like 1999). I'm creating a shortcut in the Programs group to an EXE. I'm also creating a shortcu... | [
"windows",
"windows-vista",
"installation"
] | 1 | 1 | 1,571 | 2 | 0 | 2008-09-11T21:59:21.390000 | 2008-09-12T04:24:15.863000 |
57,762 | 59,307 | Step-By-Step ASP.NET Automated Build/Deploy | Seems like there are so many different ways of automating one's build/deployment that it becomes difficult to parse through all the different scenarios that people support in tutorials on the web. So I wanted to present the question to the stackoverflow crowd... what would be the best way to set up an automated build a... | I recently spent a few days working on automating deployments at my company. We use a combination of CruiseControl, NAnt, MSBuild to generate a release version of the app. Then a separate script uses MSDeploy and XCopy to backup the live site and transfer the new files over. Our solution is briefly described in an answ... | Step-By-Step ASP.NET Automated Build/Deploy Seems like there are so many different ways of automating one's build/deployment that it becomes difficult to parse through all the different scenarios that people support in tutorials on the web. So I wanted to present the question to the stackoverflow crowd... what would be... | TITLE:
Step-By-Step ASP.NET Automated Build/Deploy
QUESTION:
Seems like there are so many different ways of automating one's build/deployment that it becomes difficult to parse through all the different scenarios that people support in tutorials on the web. So I wanted to present the question to the stackoverflow crow... | [
"asp.net",
"iis",
"deployment"
] | 30 | 15 | 27,342 | 7 | 0 | 2008-09-11T22:01:09.827000 | 2008-09-12T15:29:35.657000 |
57,766 | 58,132 | BufferedGraphicsContext Error | I am getting the below error and call stack at the same time everyday after several hours of application use. Can anyone shed some light on what is happening? System.InvalidOperationException: BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress.
at System.Drawing.BufferedG... | There is a very long MSDN forums discussion of this error here. In most cases the error is apparently associated with either: An underlying OutOfMemory problem, which manifests as the BufferedGraphicsContext exception, possibly due to a framework bug. A GDI object leak (creating GDI objects and not disposing them). I r... | BufferedGraphicsContext Error I am getting the below error and call stack at the same time everyday after several hours of application use. Can anyone shed some light on what is happening? System.InvalidOperationException: BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress... | TITLE:
BufferedGraphicsContext Error
QUESTION:
I am getting the below error and call stack at the same time everyday after several hours of application use. Can anyone shed some light on what is happening? System.InvalidOperationException: BufferedGraphicsContext cannot be disposed of because a buffer operation is cur... | [
"winforms",
"multithreading",
"exception",
"gdi+"
] | 2 | 3 | 1,915 | 3 | 0 | 2008-09-11T22:03:14.827000 | 2008-09-12T01:44:15.063000 |
57,768 | 57,984 | How should you go about learning ASP.NET after life as a ColdFusion developer? | As someone who has spent around 10 years programming web applications with Adobe's ColdFusion, I have decided to add ASP.NET as a string to my bow. For someone who has spent so long with CF and the underlying Java, ASP.NET seems a little alien to me. How should I go about getting up to speed with ASP.NET so that I can ... | I'm only maybe six months down the same path, but here are some thoughts from my experience so far: The C# language shouldn't give you much problem if you have very much experience with Java at all (or even CFScript). As a reference, though, when I was starting, I found csharp-station a good primer for language basics.... | How should you go about learning ASP.NET after life as a ColdFusion developer? As someone who has spent around 10 years programming web applications with Adobe's ColdFusion, I have decided to add ASP.NET as a string to my bow. For someone who has spent so long with CF and the underlying Java, ASP.NET seems a little ali... | TITLE:
How should you go about learning ASP.NET after life as a ColdFusion developer?
QUESTION:
As someone who has spent around 10 years programming web applications with Adobe's ColdFusion, I have decided to add ASP.NET as a string to my bow. For someone who has spent so long with CF and the underlying Java, ASP.NET ... | [
"asp.net",
"coldfusion"
] | 4 | 4 | 917 | 3 | 0 | 2008-09-11T22:04:46.713000 | 2008-09-12T00:08:55.697000 |
57,776 | 57,778 | How do I "Add Existing Item" an entire directory structure in Visual Studio? | I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure. I want to add them in that format to a different directory in an ASP.NET web application I am working on; while retaining the same structure. So, I copied the folder into the target loc... | Drag the files / folders from Windows Explorer into the Solution Explorer. It will add them all. Note this doesn't work if Visual Studio is in Administrator Mode, because Windows Explorer is a User Mode process. | How do I "Add Existing Item" an entire directory structure in Visual Studio? I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure. I want to add them in that format to a different directory in an ASP.NET web application I am working on; wh... | TITLE:
How do I "Add Existing Item" an entire directory structure in Visual Studio?
QUESTION:
I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure. I want to add them in that format to a different directory in an ASP.NET web application I... | [
"visual-studio",
"ide"
] | 793 | 751 | 264,150 | 18 | 0 | 2008-09-11T22:09:48.743000 | 2008-09-11T22:10:14.500000 |
57,790 | 57,796 | Visual Studio 2008 / Web site problem | I am using VS 2008 with SP1 and the IE 8 beta 2. Whenever I start a new Web site or when I double-click an ASPX in the solution explorer, VS insists on attempting to the display the ASPX page in a free-standing IE browser instance. The address is the local file path to the ASPX it's trying to load and an error that say... | Right click on the file, select 'Open With' and choose "Web Form Editor" and click "Set as Default". | Visual Studio 2008 / Web site problem I am using VS 2008 with SP1 and the IE 8 beta 2. Whenever I start a new Web site or when I double-click an ASPX in the solution explorer, VS insists on attempting to the display the ASPX page in a free-standing IE browser instance. The address is the local file path to the ASPX it'... | TITLE:
Visual Studio 2008 / Web site problem
QUESTION:
I am using VS 2008 with SP1 and the IE 8 beta 2. Whenever I start a new Web site or when I double-click an ASPX in the solution explorer, VS insists on attempting to the display the ASPX page in a free-standing IE browser instance. The address is the local file pa... | [
"visual-studio-2008",
"internet-explorer-8",
"visual-studio-2008-sp1"
] | 2 | 3 | 443 | 1 | 0 | 2008-09-11T22:15:51.177000 | 2008-09-11T22:20:48 |
57,791 | 57,827 | Can I override onbeforeunload for a particular element? | I have a page which does quite a bit of work and I don't want the user to be able to navigate away from that page (close browser, hit back button, etc.) without getting a warning. I found that the onbeforeunload event (which I think is IE-specific, which works fine for me as the project uses lots of ActiveX) works grea... | Let me guess: the help "icon" is actually a link with a javascript: url? Change it to a real button, a real link, or at least put the functionality in an onclick event handler (that prevents the default behavior). Problem solved. blah1 blah2 | Can I override onbeforeunload for a particular element? I have a page which does quite a bit of work and I don't want the user to be able to navigate away from that page (close browser, hit back button, etc.) without getting a warning. I found that the onbeforeunload event (which I think is IE-specific, which works fin... | TITLE:
Can I override onbeforeunload for a particular element?
QUESTION:
I have a page which does quite a bit of work and I don't want the user to be able to navigate away from that page (close browser, hit back button, etc.) without getting a warning. I found that the onbeforeunload event (which I think is IE-specifi... | [
"javascript",
"events"
] | 4 | 8 | 8,048 | 4 | 0 | 2008-09-11T22:16:24.937000 | 2008-09-11T22:39:50.763000 |
57,800 | 58,330 | What's the bare minimum permission set for Sql Server 2005 services? | Best practices recommend not installing Sql Server to run as SYSTEM. What is the bare minumum you need to give the user account you create for it? | By default, SQL Server 2005 installation will create a security group called SQLServer2005MSSQLUser$ComputerName$MSSQLSERVER with the correct rights. You just need to create a domain user or local user and make it a member of that group. More details are available in the SQL Server Books Online: Reviewing Windows NT Ri... | What's the bare minimum permission set for Sql Server 2005 services? Best practices recommend not installing Sql Server to run as SYSTEM. What is the bare minumum you need to give the user account you create for it? | TITLE:
What's the bare minimum permission set for Sql Server 2005 services?
QUESTION:
Best practices recommend not installing Sql Server to run as SYSTEM. What is the bare minumum you need to give the user account you create for it?
ANSWER:
By default, SQL Server 2005 installation will create a security group called ... | [
"sql-server-2005",
"security",
"system-administration"
] | 3 | 3 | 1,725 | 2 | 0 | 2008-09-11T22:23:17.243000 | 2008-09-12T05:01:42.310000 |
57,803 | 57,805 | How to convert decimal to hexadecimal in JavaScript | How do you convert decimal values to their hexadecimal equivalent in JavaScript? | Convert a number to a hexadecimal string with: hexString = yourNumber.toString(16); And reverse the process with: yourNumber = parseInt(hexString, 16); | How to convert decimal to hexadecimal in JavaScript How do you convert decimal values to their hexadecimal equivalent in JavaScript? | TITLE:
How to convert decimal to hexadecimal in JavaScript
QUESTION:
How do you convert decimal values to their hexadecimal equivalent in JavaScript?
ANSWER:
Convert a number to a hexadecimal string with: hexString = yourNumber.toString(16); And reverse the process with: yourNumber = parseInt(hexString, 16); | [
"javascript",
"hex",
"number-formatting",
"radix"
] | 1,931 | 3,204 | 1,450,959 | 30 | 0 | 2008-09-11T22:26:58.453000 | 2008-09-11T22:28:34.610000 |
57,804 | 57,995 | NHibernate.MappingException: No persister for: XYZ | Now, before you say it: I did Google and my hbm.xml file is an Embedded Resource. Here is the code I am calling: ISession session = GetCurrentSession(); var returnObject = session.Get (Id); Here is my mapping file for the class: Has anyone run to this issue before? Here is the full error message: MappingException: No p... | Sounds like you forgot to add a mapping assembly to the session factory configuration.. If you're using app.config..... true true 1, false 0, yes 'Y', no 'N'.. | NHibernate.MappingException: No persister for: XYZ Now, before you say it: I did Google and my hbm.xml file is an Embedded Resource. Here is the code I am calling: ISession session = GetCurrentSession(); var returnObject = session.Get (Id); Here is my mapping file for the class: Has anyone run to this issue before? Her... | TITLE:
NHibernate.MappingException: No persister for: XYZ
QUESTION:
Now, before you say it: I did Google and my hbm.xml file is an Embedded Resource. Here is the code I am calling: ISession session = GetCurrentSession(); var returnObject = session.Get (Id); Here is my mapping file for the class: Has anyone run to this... | [
"c#",
".net",
"nhibernate"
] | 137 | 101 | 146,657 | 18 | 0 | 2008-09-11T22:27:05.597000 | 2008-09-12T00:20:28.460000 |
57,812 | 58,533 | Remove all classes that begin with a certain string | I have a div with id="a" that may have any number of classes attached to it, from several groups. Each group has a specific prefix. In the javascript, I don't know which class from the group is on the div. I want to be able to clear all classes with a given prefix and then add a new one. If I want to remove all of the ... | With jQuery, the actual DOM element is at index zero, this should work $('#a')[0].className = $('#a')[0].className.replace(/\bbg.*?\b/g, ''); | Remove all classes that begin with a certain string I have a div with id="a" that may have any number of classes attached to it, from several groups. Each group has a specific prefix. In the javascript, I don't know which class from the group is on the div. I want to be able to clear all classes with a given prefix and... | TITLE:
Remove all classes that begin with a certain string
QUESTION:
I have a div with id="a" that may have any number of classes attached to it, from several groups. Each group has a specific prefix. In the javascript, I don't know which class from the group is on the div. I want to be able to clear all classes with ... | [
"javascript",
"jquery",
"css"
] | 117 | 63 | 116,369 | 17 | 0 | 2008-09-11T22:32:28.143000 | 2008-09-12T09:05:21.787000 |
57,839 | 57,892 | Crash Instantiating System.Xml.Serialization.XmlSerializer in C# | We're seeing a crash when instantiating an instance of the System.Xml.Serialization.XmlSerializer class in a C# library. The crash occurs in the constructor, when it tries to add a duplicate key to a dictionary. I've included a stack trace below. This crash is only occurring on one machine, and repairing our installati... | Found this link, which explains the issue: http://social.msdn.microsoft.com/forums/en-US/asmxandxml/thread/4476f044-bab9-492d-bb94-4e0960bd2d26 A quick summary: When serializing, the object makes a dictionary out of all environment variables, but appears to run a ToLower() on all entries. So, if you have two environmen... | Crash Instantiating System.Xml.Serialization.XmlSerializer in C# We're seeing a crash when instantiating an instance of the System.Xml.Serialization.XmlSerializer class in a C# library. The crash occurs in the constructor, when it tries to add a duplicate key to a dictionary. I've included a stack trace below. This cra... | TITLE:
Crash Instantiating System.Xml.Serialization.XmlSerializer in C#
QUESTION:
We're seeing a crash when instantiating an instance of the System.Xml.Serialization.XmlSerializer class in a C# library. The crash occurs in the constructor, when it tries to add a duplicate key to a dictionary. I've included a stack tra... | [
"c#",
".net",
"serialization"
] | 2 | 5 | 4,185 | 1 | 0 | 2008-09-11T22:44:49.877000 | 2008-09-11T23:20:55.623000 |
57,840 | 57,862 | How to attach debugger to step into native (C++) code from a managed (C#) wrapper? | I have a wrapper around a C++ function call which I call from C# code. How do I attach a debugger in Visual Studio to step into the native C++ code? This is the wrapper that I have which calls GetData() defined in a C++ file: [DllImport("Unmanaged.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint = "GetData",... | Check the Debug tab on your project's properties page. There should be an "Enable unmanaged code debugging" checkbox. This worked for me when we developed a new.NET UI for our old c++ DLLs. If your unmanaged DLL is being built from another project (for a while ours were being built using VS6) just make sure you have th... | How to attach debugger to step into native (C++) code from a managed (C#) wrapper? I have a wrapper around a C++ function call which I call from C# code. How do I attach a debugger in Visual Studio to step into the native C++ code? This is the wrapper that I have which calls GetData() defined in a C++ file: [DllImport(... | TITLE:
How to attach debugger to step into native (C++) code from a managed (C#) wrapper?
QUESTION:
I have a wrapper around a C++ function call which I call from C# code. How do I attach a debugger in Visual Studio to step into the native C++ code? This is the wrapper that I have which calls GetData() defined in a C++... | [
"c#",
"c++",
"visual-studio",
"debugging"
] | 19 | 23 | 15,930 | 4 | 0 | 2008-09-11T22:45:29.470000 | 2008-09-11T23:02:02.393000 |
57,845 | 57,858 | BackgroundWorker thread in ASP.NET | Is it possible to use BackGroundWorker thread in ASP.NET 2.0 for the following scenario, so that the user at the browser's end does not have to wait for long time? Scenario The browser requests a page, say SendEmails.aspx SendEmails.aspx page creates a BackgroundWorker thread, and supplies the thread with enough contex... | If you don't want to use the AJAX libraries, or the e-mail processing is REALLY long and would timeout a standard AJAX request, you can use an AsynchronousPostBack method that was the "old hack" in the.net 1.1 days. Essentially what you do is have your submit button begin the e-mail processing in an asynchronous state,... | BackgroundWorker thread in ASP.NET Is it possible to use BackGroundWorker thread in ASP.NET 2.0 for the following scenario, so that the user at the browser's end does not have to wait for long time? Scenario The browser requests a page, say SendEmails.aspx SendEmails.aspx page creates a BackgroundWorker thread, and sup... | TITLE:
BackgroundWorker thread in ASP.NET
QUESTION:
Is it possible to use BackGroundWorker thread in ASP.NET 2.0 for the following scenario, so that the user at the browser's end does not have to wait for long time? Scenario The browser requests a page, say SendEmails.aspx SendEmails.aspx page creates a BackgroundWork... | [
"asp.net",
"multithreading"
] | 20 | 13 | 23,561 | 7 | 0 | 2008-09-11T22:49:34.187000 | 2008-09-11T23:00:23.770000 |
57,855 | 57,871 | Registry key that contains the folder for the local user's Programs folder on Vista | I'm troubleshooting a problem with creating Vista shortcuts. I want to make sure that our Installer is reading the Programs folder from the right registry key. It's reading it from: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Programs And it's showing this directory for Programs: ... | use windows installer properties. will probably be easier. http://msdn.microsoft.com/en-us/library/aa370905(VS.85).aspx#system_folder_properties | Registry key that contains the folder for the local user's Programs folder on Vista I'm troubleshooting a problem with creating Vista shortcuts. I want to make sure that our Installer is reading the Programs folder from the right registry key. It's reading it from: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVe... | TITLE:
Registry key that contains the folder for the local user's Programs folder on Vista
QUESTION:
I'm troubleshooting a problem with creating Vista shortcuts. I want to make sure that our Installer is reading the Programs folder from the right registry key. It's reading it from: HKEY_CURRENT_USER\Software\Microsoft... | [
"windows-vista",
"registry"
] | 0 | 1 | 4,109 | 6 | 0 | 2008-09-11T23:00:04.037000 | 2008-09-11T23:05:35.223000 |
57,859 | 82,540 | Is there a standard ReSharper code style definition that matches all the StyleCop requirements? | The ReSharper reformat code feature is very handy and flexible, particularly with the new code layout templating flexibility JetBrains have added in version 3.0. Is there a standard set of code style settings for ReSharper which match the rules enforced by Microsoft StyleCop, so that StyleCop compliance can be as easy ... | Try the ReSharper StyleCop plugin at: http://www.codeplex.com/StyleCopForReSharper | Is there a standard ReSharper code style definition that matches all the StyleCop requirements? The ReSharper reformat code feature is very handy and flexible, particularly with the new code layout templating flexibility JetBrains have added in version 3.0. Is there a standard set of code style settings for ReSharper w... | TITLE:
Is there a standard ReSharper code style definition that matches all the StyleCop requirements?
QUESTION:
The ReSharper reformat code feature is very handy and flexible, particularly with the new code layout templating flexibility JetBrains have added in version 3.0. Is there a standard set of code style settin... | [
"resharper",
"stylecop"
] | 20 | 10 | 5,558 | 2 | 0 | 2008-09-11T23:00:55.860000 | 2008-09-17T12:25:01.907000 |
57,867 | 58,044 | Is there a Windows Registry "dictionary" that explains the whole (or most of) the Windows Registry? | I'd like to be able to see what registry keys are used for. A book on the registry would be fine as well. Info on Windows Vista changes would be great! | Oh, how I wish there was a single site where the registry was collectively documented by all who write values there! Keep in mind, any app can create its own set of registry keys and values, so it's not just MS who would be necessary to such an effort. Though they would be a key player! In the meantime, there are two M... | Is there a Windows Registry "dictionary" that explains the whole (or most of) the Windows Registry? I'd like to be able to see what registry keys are used for. A book on the registry would be fine as well. Info on Windows Vista changes would be great! | TITLE:
Is there a Windows Registry "dictionary" that explains the whole (or most of) the Windows Registry?
QUESTION:
I'd like to be able to see what registry keys are used for. A book on the registry would be fine as well. Info on Windows Vista changes would be great!
ANSWER:
Oh, how I wish there was a single site wh... | [
"windows",
"registry"
] | 22 | 4 | 12,668 | 4 | 0 | 2008-09-11T23:04:01.763000 | 2008-09-12T00:50:29.793000 |
57,878 | 66,581 | SQL/Oracle: when indexes on multiple columns can be used | If I create an index on columns (A, B, C), in that order, my understanding is that the database will be able to use it even if I search only on (A), or (A and B), or (A and B and C), but not if I search only on (B), or (C), or (B and C). Is this correct? | There are actually three index-based access methods that Oracle can use when a predicate is placed on a non-leading column of an index. i) Index skip-scan: http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm#PFGRF10105 ii) Fast full index scan: http://download.oracle.com/docs/cd/B19306_01/server... | SQL/Oracle: when indexes on multiple columns can be used If I create an index on columns (A, B, C), in that order, my understanding is that the database will be able to use it even if I search only on (A), or (A and B), or (A and B and C), but not if I search only on (B), or (C), or (B and C). Is this correct? | TITLE:
SQL/Oracle: when indexes on multiple columns can be used
QUESTION:
If I create an index on columns (A, B, C), in that order, my understanding is that the database will be able to use it even if I search only on (A), or (A and B), or (A and B and C), but not if I search only on (B), or (C), or (B and C). Is this... | [
"oracle",
"indexing"
] | 20 | 14 | 38,352 | 3 | 0 | 2008-09-11T23:09:47.303000 | 2008-09-15T20:25:04.670000 |
57,902 | 58,863 | What is your experience with Sun CoolThreads technology? | My project has some money to spend before the end of the fiscal year and we are considering replacing a Sun-Fire-V490 server we've had for a few years. One option we are looking at is the CoolThreads technology. All I know is the Sun marketing, which may not be 100% unbiased. Has anyone actually played with one of thes... | Disclosure: I work for Sun (but as an engineer in client software). You don't necesarily need multithreaded code to make use of these machines. Having multiple processes will make use of multiple hardware threads on multiple cores. The old T1 processors (T1000 and T2000 boxes) did have only a single FPU, and weren't re... | What is your experience with Sun CoolThreads technology? My project has some money to spend before the end of the fiscal year and we are considering replacing a Sun-Fire-V490 server we've had for a few years. One option we are looking at is the CoolThreads technology. All I know is the Sun marketing, which may not be 1... | TITLE:
What is your experience with Sun CoolThreads technology?
QUESTION:
My project has some money to spend before the end of the fiscal year and we are considering replacing a Sun-Fire-V490 server we've had for a few years. One option we are looking at is the CoolThreads technology. All I know is the Sun marketing, ... | [
"solaris"
] | 4 | 3 | 1,188 | 7 | 0 | 2008-09-11T23:29:43.233000 | 2008-09-12T12:51:37.860000 |
57,909 | 75,387 | When creating a new GUI, is WPF the preferred choice over Windows Forms? | Most restrictions and tricks with windows forms are common to most programmers. But since.NET 3.0 there is also WPF available, the Windows Presentation Foundation. It is said that you can make "sexy applications" more easy with it and with.NET 3.5 SP1 it got a good speed boost on execution. But on the other side a lot ... | WPF enables you to do some amazing things, and I LOVE it... but I always feel obligated to qualify my recommendations, whenever developers ask me whether I think they should be moving to the new technology. Are your developers willing (preferrably, EAGER) to spend the time it takes to learn to use WPF effectively? I ne... | When creating a new GUI, is WPF the preferred choice over Windows Forms? Most restrictions and tricks with windows forms are common to most programmers. But since.NET 3.0 there is also WPF available, the Windows Presentation Foundation. It is said that you can make "sexy applications" more easy with it and with.NET 3.5... | TITLE:
When creating a new GUI, is WPF the preferred choice over Windows Forms?
QUESTION:
Most restrictions and tricks with windows forms are common to most programmers. But since.NET 3.0 there is also WPF available, the Windows Presentation Foundation. It is said that you can make "sexy applications" more easy with i... | [
".net",
"wpf",
"winforms",
".net-3.5",
".net-3.0"
] | 47 | 72 | 51,151 | 34 | 0 | 2008-09-11T23:33:59.913000 | 2008-09-16T18:22:01.510000 |
57,910 | 62,075 | How do I increase the number of default rows per page? | Grails scaffolding defaults to 10 rows per page. I would like to increase that number without generating the views and changing the 10 in every file. Where do I change the default? | You have to install scaffold templates with: grails install-templates Now, edit in src/templates/scaffolding Controller.groovy and increase the value params.max as you want | How do I increase the number of default rows per page? Grails scaffolding defaults to 10 rows per page. I would like to increase that number without generating the views and changing the 10 in every file. Where do I change the default? | TITLE:
How do I increase the number of default rows per page?
QUESTION:
Grails scaffolding defaults to 10 rows per page. I would like to increase that number without generating the views and changing the 10 in every file. Where do I change the default?
ANSWER:
You have to install scaffold templates with: grails insta... | [
"grails"
] | 2 | 3 | 1,609 | 4 | 0 | 2008-09-11T23:34:13.470000 | 2008-09-15T10:03:44.680000 |
57,912 | 58,188 | Update schema and rows in one transaction, SQL Server 2005 | I'm currently updating a legacy system which allows users to dictate part of the schema of one of its tables. Users can create and remove columns from the table through this interface. This legacy system is using ADO 2.8, and is using SQL Server 2005 as its database (you don't even WANT to know what database it was usi... | The code is using a server-side cursor, that's what those calls are for. The first set of calls is preparing/opening the cursor. Then fetching rows from the cursor. Finally closing the cursor. Those sprocs are analogous to the OPEN CURSOR, FETCH NEXT, CLOSE CURSOR T-SQL statements. I'd have to take a closer look (which... | Update schema and rows in one transaction, SQL Server 2005 I'm currently updating a legacy system which allows users to dictate part of the schema of one of its tables. Users can create and remove columns from the table through this interface. This legacy system is using ADO 2.8, and is using SQL Server 2005 as its dat... | TITLE:
Update schema and rows in one transaction, SQL Server 2005
QUESTION:
I'm currently updating a legacy system which allows users to dictate part of the schema of one of its tables. Users can create and remove columns from the table through this interface. This legacy system is using ADO 2.8, and is using SQL Serv... | [
"sql",
"sql-server",
"sql-server-2005",
"transactions",
"ado"
] | 2 | 1 | 2,321 | 2 | 0 | 2008-09-11T23:34:31.973000 | 2008-09-12T02:26:27.287000 |
57,915 | 58,413 | What are some good examples of a WS-Eventing client in Java? | There are a few web service frameworks available for Java: Axis2, CXF, JBossWS, and Metro. Does anyone have some good examples of a WS-Eventing client with these frameworks? | Check out Apache Savan. It's was a publisher/subscriber implementation for Axis2 that supported WS-Eventing (see sample.eventing.Client for an example client) but was retired in 2014. JBossWS has some information about setting up a service here, but I didn't see any example for a client. Regarding CXF is includes suppo... | What are some good examples of a WS-Eventing client in Java? There are a few web service frameworks available for Java: Axis2, CXF, JBossWS, and Metro. Does anyone have some good examples of a WS-Eventing client with these frameworks? | TITLE:
What are some good examples of a WS-Eventing client in Java?
QUESTION:
There are a few web service frameworks available for Java: Axis2, CXF, JBossWS, and Metro. Does anyone have some good examples of a WS-Eventing client with these frameworks?
ANSWER:
Check out Apache Savan. It's was a publisher/subscriber im... | [
"java",
"web-services",
"ws-eventing"
] | 2 | 2 | 2,741 | 1 | 0 | 2008-09-11T23:35:21.267000 | 2008-09-12T06:45:21.220000 |
57,918 | 57,930 | When should you use full-text indexing? | We have a whole bunch of queries that "search" for clients, customers, etc. You can search by first name, email, etc. We're using LIKE statements in the following manner: SELECT * FROM customer WHERE fname LIKE '%someName%' Does full-text indexing help in the scenario? We're using SQL Server 2005. | It will depend upon your DBMS. I believe that most systems will not take advantage of the full-text index unless you use the full-text functions. (e.g. MATCH/AGAINST in mySQL or FREETEXT/CONTAINS in MS SQL) Here is two good articles on when, why, and how to use full-text indexing in SQL Server: How To Use SQL Server Fu... | When should you use full-text indexing? We have a whole bunch of queries that "search" for clients, customers, etc. You can search by first name, email, etc. We're using LIKE statements in the following manner: SELECT * FROM customer WHERE fname LIKE '%someName%' Does full-text indexing help in the scenario? We're usin... | TITLE:
When should you use full-text indexing?
QUESTION:
We have a whole bunch of queries that "search" for clients, customers, etc. You can search by first name, email, etc. We're using LIKE statements in the following manner: SELECT * FROM customer WHERE fname LIKE '%someName%' Does full-text indexing help in the sc... | [
"sql",
"sql-server",
"t-sql",
"indexing",
"full-text-search"
] | 53 | 32 | 52,915 | 4 | 0 | 2008-09-11T23:37:56.380000 | 2008-09-11T23:42:08.867000 |
57,919 | 57,935 | Best way to send an email from a .NET application? | I'm working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arise. I'd like the exception handler to be able to prompt the user to click a Send Error Report button, which would then cause the app to send an email to my FogBugz email addres... | You'll want to use the SmtpClient class as outlined here. There are no gotchas - sending email is about as easy as it gets. | Best way to send an email from a .NET application? I'm working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arise. I'd like the exception handler to be able to prompt the user to click a Send Error Report button, which would then cause ... | TITLE:
Best way to send an email from a .NET application?
QUESTION:
I'm working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arise. I'd like the exception handler to be able to prompt the user to click a Send Error Report button, which... | [
".net",
"vb.net",
"email"
] | 7 | 3 | 4,798 | 6 | 0 | 2008-09-11T23:38:00.013000 | 2008-09-11T23:43:27.910000 |
57,923 | 57,945 | What exactly is "managed" code? | I've been writing C / C++ code for almost twenty years, and I know Perl, Python, PHP, and some Java as well, and I'm teaching myself JavaScript. But I've never done any.NET, VB, or C# stuff. What exactly does managed code mean? Wikipedia describes it simply as Code that executes under the management of a virtual machin... | When you compile C# code to a.exe, it is compiled to Common Intermediate Language(CIL) bytecode. Whenever you run a CIL executable it is executed on Microsofts Common Language Runtime(CLR) virtual machine. So no, it is not possible to include the VM withing your.NET executable file. You must have the.NET runtime instal... | What exactly is "managed" code? I've been writing C / C++ code for almost twenty years, and I know Perl, Python, PHP, and some Java as well, and I'm teaching myself JavaScript. But I've never done any.NET, VB, or C# stuff. What exactly does managed code mean? Wikipedia describes it simply as Code that executes under th... | TITLE:
What exactly is "managed" code?
QUESTION:
I've been writing C / C++ code for almost twenty years, and I know Perl, Python, PHP, and some Java as well, and I'm teaching myself JavaScript. But I've never done any.NET, VB, or C# stuff. What exactly does managed code mean? Wikipedia describes it simply as Code that... | [
"c#",
".net",
"vb.net",
"managed-code"
] | 57 | 38 | 25,908 | 15 | 0 | 2008-09-11T23:38:58.157000 | 2008-09-11T23:47:32.517000 |
57,927 | 60,187 | Top ten ordering in Excel based on complex team rules | I have an excel spreadsheet in a format similar to the following... | NAME | CLUB | STATUS | SCORE | | Fred | a | Gent | 145 | | Bert | a | Gent | 150 | | Harry | a | Gent | 195 | | Jim | a | Gent | 150 | | Clare | a | Lady | 99 | | Simon | a | Junior | 130 | | John | b | Junior | 130 |:: | Henry | z | Gent | 200 | I n... | Public Function TopTen(Club As String, Scores As Range)
Dim i As Long Dim vaScores As Variant Dim bLady As Boolean Dim lCnt As Long Dim lTotal As Long
vaScores = FilterOnClub(Scores.Value, Club) vaScores = SortOnScore(vaScores)
For i = LBound(vaScores, 2) To UBound(vaScores, 2) If lCnt = 3 And Not bLady Then If vaSc... | Top ten ordering in Excel based on complex team rules I have an excel spreadsheet in a format similar to the following... | NAME | CLUB | STATUS | SCORE | | Fred | a | Gent | 145 | | Bert | a | Gent | 150 | | Harry | a | Gent | 195 | | Jim | a | Gent | 150 | | Clare | a | Lady | 99 | | Simon | a | Junior | 130 | | John... | TITLE:
Top ten ordering in Excel based on complex team rules
QUESTION:
I have an excel spreadsheet in a format similar to the following... | NAME | CLUB | STATUS | SCORE | | Fred | a | Gent | 145 | | Bert | a | Gent | 150 | | Harry | a | Gent | 195 | | Jim | a | Gent | 150 | | Clare | a | Lady | 99 | | Simon | a | Jun... | [
"excel",
"spreadsheet",
"vba"
] | 3 | 2 | 4,961 | 6 | 0 | 2008-09-11T23:41:16.417000 | 2008-09-13T00:11:22.047000 |
57,947 | 58,206 | Understanding .Net Configuration Options | I'm really confused by the various configuration options for.Net configuration of dll's, ASP.net websites etc in.Net v2 - especially when considering the impact of a config file at the UI / end-user end of the chain. So, for example, some of the applications I work with use settings which we access with: string blah = ... | Nij, our difference in thinking comes from our different perspectives. I'm thinking about developing enterprise apps that predominantly use WinForms clients. In this instance the business logic is contained on an application server. Each client would need to know the phone number to dial, but placing it in the App.conf... | Understanding .Net Configuration Options I'm really confused by the various configuration options for.Net configuration of dll's, ASP.net websites etc in.Net v2 - especially when considering the impact of a config file at the UI / end-user end of the chain. So, for example, some of the applications I work with use sett... | TITLE:
Understanding .Net Configuration Options
QUESTION:
I'm really confused by the various configuration options for.Net configuration of dll's, ASP.net websites etc in.Net v2 - especially when considering the impact of a config file at the UI / end-user end of the chain. So, for example, some of the applications I ... | [
"c#",
".net",
"configuration"
] | 5 | 2 | 889 | 5 | 0 | 2008-09-11T23:47:50.740000 | 2008-09-12T02:37:10.723000 |
57,958 | 57,986 | When to use HtmlControls vs WebControls | I like HtmlControls because there is no HTML magic going on... the asp source looks similar to what the client sees. I can't argue with the utility of GridView, Repeater, CheckBoxLists, etc, so I use them when I need that functionality. Also, it looks weird to have code that mixes and matches: (The above case in the ev... | It might be useful to think of HTML controls as an option when you want more control over the mark up that ends up getting emitted by your page. More control in the sense that you want EVERY browser to see exactly the same markup. If you create System.Web.UI.HtmlControls like: Then you know what kind of code is going t... | When to use HtmlControls vs WebControls I like HtmlControls because there is no HTML magic going on... the asp source looks similar to what the client sees. I can't argue with the utility of GridView, Repeater, CheckBoxLists, etc, so I use them when I need that functionality. Also, it looks weird to have code that mixe... | TITLE:
When to use HtmlControls vs WebControls
QUESTION:
I like HtmlControls because there is no HTML magic going on... the asp source looks similar to what the client sees. I can't argue with the utility of GridView, Repeater, CheckBoxLists, etc, so I use them when I need that functionality. Also, it looks weird to h... | [
"asp.net"
] | 5 | 5 | 4,831 | 4 | 0 | 2008-09-11T23:53:28.247000 | 2008-09-12T00:09:15.743000 |
57,987 | 184,213 | Writing into excel file with OLEDB | Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following: OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results = dbCmd.ExecuteNonQuery(); But I get an OleDbException thrown with message: "Cannot modify the design ... | You need to add ReadOnly=False; to your connection string Provider=Microsoft.Jet.OLEDB.4.0;Data Source=fifa_ng_db.xls;Mode=ReadWrite;ReadOnly=false;Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\"; | Writing into excel file with OLEDB Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following: OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results = dbCmd.ExecuteNonQuery(); But I get an OleDbException thrown with ... | TITLE:
Writing into excel file with OLEDB
QUESTION:
Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following: OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results = dbCmd.ExecuteNonQuery(); But I get an OleDbExce... | [
"c#",
"excel",
"oledb"
] | 8 | 8 | 49,396 | 7 | 0 | 2008-09-12T00:10:25.380000 | 2008-10-08T18:38:27.583000 |
57,999 | 58,026 | What is the difference between dllexport and dllimport? | I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here. | __declspec(dllexport) tells the linker that you want this object to be made available for other DLL's to import. It is used when creating a DLL that others can link to. __declspec(dllimport) imports the implementation from a DLL so your application can use it. I'm only a novice C/C++ developer, so perhaps someone's got... | What is the difference between dllexport and dllimport? I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here. | TITLE:
What is the difference between dllexport and dllimport?
QUESTION:
I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here.
ANSWER:
__declspec(dllexport) tells the linker that you want this object to be made available for other ... | [
"visual-c++",
"dll",
"import",
"export"
] | 74 | 65 | 41,073 | 4 | 0 | 2008-09-12T00:23:23.400000 | 2008-09-12T00:41:42.747000 |
58,024 | 58,033 | Open a URL from Windows Forms | I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser. What is the best way to open a URL in the user's default browser from a Windows Forms application? | ProcessStartInfo sInfo = new ProcessStartInfo("http://example.com/"); Process.Start(sInfo); | Open a URL from Windows Forms I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser. What is the best way to open a URL in the user's default browser from a Windows Forms application? | TITLE:
Open a URL from Windows Forms
QUESTION:
I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser. What is the best way to open a URL in the user's default browser from a Windows Forms application?
ANSWER:
ProcessStartInfo ... | [
".net",
"winforms"
] | 86 | 142 | 106,194 | 6 | 0 | 2008-09-12T00:40:55.807000 | 2008-09-12T00:44:25.563000 |
58,035 | 58,964 | Loading different versions of the same assembly | Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? I need to do some data migration from the old version of the app to the new version. Please let me know if this is possible or should I use 2 separate processes. | UPDATE: I thought I will post my findings as an answer. Reflection proved too complex in terms of development effort, tracking run time errors etc. I remember doing a different approach using 2 different processes when faced with a similar situation long time back (Thank you Brandon). This is the plan: Nothing elegant ... | Loading different versions of the same assembly Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? I need to do some data migration from the old version of the app to the new version. Please let me know if this is possible... | TITLE:
Loading different versions of the same assembly
QUESTION:
Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? I need to do some data migration from the old version of the app to the new version. Please let me know i... | [
"c#",
".net",
"reflection",
"dll",
"assemblies"
] | 24 | 5 | 20,411 | 2 | 0 | 2008-09-12T00:45:51.847000 | 2008-09-12T13:33:38.383000 |
58,036 | 58,110 | How did my process exit? | From C# on a Windows box, is there a way to find out how a process was stopped? I've had a look at the Process class, managed to get a nice friendly callback from the Exited event once I set EnableRaisingEvents = true; but I have not managed to find out whether the process was killed or whether it exited naturally? | Fire up Process Monitor (from Sysinternals, part of Microsoft), run your process and let it die, then filter the Process Monitor results by your process name -- you will be able to see everything that it did, including exit codes. | How did my process exit? From C# on a Windows box, is there a way to find out how a process was stopped? I've had a look at the Process class, managed to get a nice friendly callback from the Exited event once I set EnableRaisingEvents = true; but I have not managed to find out whether the process was killed or whether... | TITLE:
How did my process exit?
QUESTION:
From C# on a Windows box, is there a way to find out how a process was stopped? I've had a look at the Process class, managed to get a nice friendly callback from the Exited event once I set EnableRaisingEvents = true; but I have not managed to find out whether the process was... | [
"c#",
".net",
"system.diagnostics"
] | 1 | 3 | 902 | 2 | 0 | 2008-09-12T00:46:22.703000 | 2008-09-12T01:30:48.807000 |
58,054 | 58,060 | How can I replace newline characters using JSP and JSTL? | I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using JSTL, so that the field can be displayed in a text input. I have found one solution, but it's not very elegant. I'll post below as a possibility. | Here is a solution I found. It doesn't seem very elegant, though: <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <% pageContext.setAttribute("newLineChar", "\n"); %>
${fn:replace(item.comments, newLineChar, "; ")} | How can I replace newline characters using JSP and JSTL? I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using JSTL, so that the field can be displayed in a text input. I have found one solution, but i... | TITLE:
How can I replace newline characters using JSP and JSTL?
QUESTION:
I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using JSTL, so that the field can be displayed in a text input. I have found o... | [
"string",
"jsp",
"replace",
"jstl",
"newline"
] | 45 | 55 | 104,803 | 14 | 0 | 2008-09-12T00:57:11.900000 | 2008-09-12T00:59:31.160000 |
58,058 | 58,061 | Using C++ classes in .so libraries | I'm trying to write a small class library for a C++ course. I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading this long ago (before I started really programming) that... | C++ classes work fine in.so shared libraries (they also work in non-MFC DLLs on Windows, but that's not really your question). It's actually easier than Windows, because you don't have to explicitly export any symbols from the libraries. This document will answer most of your questions: http://people.redhat.com/drepper... | Using C++ classes in .so libraries I'm trying to write a small class library for a C++ course. I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading this long ago (before... | TITLE:
Using C++ classes in .so libraries
QUESTION:
I'm trying to write a small class library for a C++ course. I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading thi... | [
"c++",
"linux",
"class-library"
] | 12 | 13 | 25,658 | 3 | 0 | 2008-09-12T00:58:25.483000 | 2008-09-12T01:01:22.997000 |
58,069 | 58,072 | How to use getaddrinfo_a to do async resolve with glibc | An often overlooked function that requires no external library, but basically has no documentation whatsoever. | UPDATE (2010-10-11): The linux man-pages now have documentation of the getaddrinfo_a, you can find it here: http://www.kernel.org/doc/man-pages/online/pages/man3/getaddrinfo_a.3.html As a disclaimer I should add that I'm quite new to C but not exactly a newbie, so there might be bugs, or bad coding practices, please do... | How to use getaddrinfo_a to do async resolve with glibc An often overlooked function that requires no external library, but basically has no documentation whatsoever. | TITLE:
How to use getaddrinfo_a to do async resolve with glibc
QUESTION:
An often overlooked function that requires no external library, but basically has no documentation whatsoever.
ANSWER:
UPDATE (2010-10-11): The linux man-pages now have documentation of the getaddrinfo_a, you can find it here: http://www.kernel.... | [
"c",
"dns",
"glibc",
"getaddrinfo-a"
] | 19 | 24 | 10,952 | 1 | 0 | 2008-09-12T01:07:06.167000 | 2008-09-12T01:07:18.537000 |
58,070 | 58,091 | OOP class design, Is this design inherently 'anti' OOP? | I remember back when MS released a forum sample application, the design of the application was like this: /Classes/User.cs /Classes/Post.cs... /Users.cs /Posts.cs So the classes folder had just the class i.e. properties and getters/setters. The Users.cs, Post.cs, etc. have the actual methods that access the Data Access... | If every method is just a static call straight to the data source, then the "Posts" class is really a Factory. You could certainly put the static methods in "Posts" into the "Post" class (this is how CSLA works), but they are still factory methods. I would say that a more modern and accurate name for the "Posts" class ... | OOP class design, Is this design inherently 'anti' OOP? I remember back when MS released a forum sample application, the design of the application was like this: /Classes/User.cs /Classes/Post.cs... /Users.cs /Posts.cs So the classes folder had just the class i.e. properties and getters/setters. The Users.cs, Post.cs, ... | TITLE:
OOP class design, Is this design inherently 'anti' OOP?
QUESTION:
I remember back when MS released a forum sample application, the design of the application was like this: /Classes/User.cs /Classes/Post.cs... /Users.cs /Posts.cs So the classes folder had just the class i.e. properties and getters/setters. The U... | [
"oop"
] | 1 | 3 | 1,026 | 6 | 0 | 2008-09-12T01:07:11.063000 | 2008-09-12T01:17:43.550000 |
58,119 | 58,129 | Does re.compile() or any given Python library call throw an exception? | I can't tell from the Python documentation whether the re.compile(x) function may throw an exception (assuming you pass in a string). I imagine there is something that could be considered an invalid regular expression. The larger question is, where do I go to find if a given Python library call may throw exception(s) a... | Well, re.compile certainly may: >>> import re >>> re.compile('he(lo') Traceback (most recent call last): File " ", line 1, in File "C:\Python25\lib\re.py", line 180, in compile return _compile(pattern, flags) File "C:\Python25\lib\re.py", line 233, in _compile raise error, v # invalid expression sre_constants.error: un... | Does re.compile() or any given Python library call throw an exception? I can't tell from the Python documentation whether the re.compile(x) function may throw an exception (assuming you pass in a string). I imagine there is something that could be considered an invalid regular expression. The larger question is, where ... | TITLE:
Does re.compile() or any given Python library call throw an exception?
QUESTION:
I can't tell from the Python documentation whether the re.compile(x) function may throw an exception (assuming you pass in a string). I imagine there is something that could be considered an invalid regular expression. The larger q... | [
"python",
"regex",
"exception"
] | 17 | 13 | 7,075 | 2 | 0 | 2008-09-12T01:35:33.803000 | 2008-09-12T01:42:38.357000 |
58,123 | 58,131 | Get current System.Web.UI.Page from HttpContext? | This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object? And the second question, which is probably related to the first, is why can't I use the following to see if the current page implements an interface: private IWebBase FindWebBase() { if (HttpContext... | No, from MSDN on HttpContext.Current: "Gets or sets the HttpContext object for the current HTTP request." In other words it is an HttpContext object, not a Page. You can get to the Page object via HttpContext using: Page page = HttpContext.Current.Handler as Page;
if (page!= null) { // Use page instance. } | Get current System.Web.UI.Page from HttpContext? This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object? And the second question, which is probably related to the first, is why can't I use the following to see if the current page implements an interface:... | TITLE:
Get current System.Web.UI.Page from HttpContext?
QUESTION:
This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object? And the second question, which is probably related to the first, is why can't I use the following to see if the current page implem... | [
"c#",
"asp.net",
"httpcontext"
] | 87 | 147 | 95,467 | 4 | 0 | 2008-09-12T01:37:23.893000 | 2008-09-12T01:42:57.017000 |
58,141 | 58,154 | Why is it considered bad practice to use cursors in SQL Server? | I knew of some performance reasons back in the SQL 7 days, but do the same issues still exist in SQL Server 2005? If I have a resultset in a stored procedure that I want to act upon individually, are cursors still a bad choice? If so, why? | Because cursors take up memory and create locks. What you are really doing is attempting to force set-based technology into non-set based functionality. And, in all fairness, I should point out that cursors do have a use, but they are frowned upon because many folks who are not used to using set-based solutions use cur... | Why is it considered bad practice to use cursors in SQL Server? I knew of some performance reasons back in the SQL 7 days, but do the same issues still exist in SQL Server 2005? If I have a resultset in a stored procedure that I want to act upon individually, are cursors still a bad choice? If so, why? | TITLE:
Why is it considered bad practice to use cursors in SQL Server?
QUESTION:
I knew of some performance reasons back in the SQL 7 days, but do the same issues still exist in SQL Server 2005? If I have a resultset in a stored procedure that I want to act upon individually, are cursors still a bad choice? If so, why... | [
"sql-server",
"sql-server-2005",
"database-cursor"
] | 66 | 107 | 82,214 | 11 | 0 | 2008-09-12T01:52:15.900000 | 2008-09-12T02:00:00.423000 |
58,146 | 58,345 | Hierarchical Data In ASP.NET MVC | I am trying to come up with the best way to render some hierarchical data in to a nested unordered list using ASP.NET MVC. Does anyone have any tips on how to do this? | I suggest jquery tree view plugins for making it function like a tree, but as for render, just put it in a recursive lambda helper to do the nesting. | Hierarchical Data In ASP.NET MVC I am trying to come up with the best way to render some hierarchical data in to a nested unordered list using ASP.NET MVC. Does anyone have any tips on how to do this? | TITLE:
Hierarchical Data In ASP.NET MVC
QUESTION:
I am trying to come up with the best way to render some hierarchical data in to a nested unordered list using ASP.NET MVC. Does anyone have any tips on how to do this?
ANSWER:
I suggest jquery tree view plugins for making it function like a tree, but as for render, ju... | [
"asp.net",
"asp.net-mvc"
] | 2 | 1 | 4,282 | 5 | 0 | 2008-09-12T01:54:55.550000 | 2008-09-12T05:11:29.167000 |
58,163 | 58,276 | When can/should you go whole hog with the ORM approach? | It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set on occasion. This leads to an uncoordinated tangle of artifacts instead of a cleaner architecture. Is this because I'm applying the tool in an... | Hibernate makes more sense when your application works on object graphs, which are persisted in the RDBMS. Instead, if your application logic works on a 2-D matrix of data, fetching those via direct JDBC works better. Although Hibernate is written on top of JDBC, it has capabilities which might be non-trivial to implem... | When can/should you go whole hog with the ORM approach? It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set on occasion. This leads to an uncoordinated tangle of artifacts instead of a cleaner a... | TITLE:
When can/should you go whole hog with the ORM approach?
QUESTION:
It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set on occasion. This leads to an uncoordinated tangle of artifacts inst... | [
"java",
"hibernate",
"architecture",
"orm"
] | 2 | 4 | 380 | 1 | 0 | 2008-09-12T02:05:01.173000 | 2008-09-12T03:59:42.520000 |
58,174 | 58,183 | Does anyone know where to find free database design templates? | I'm obviously not talking about a full solution, but just a good starting point for common applications for software architects. It could be for a CMS, e-commerce storefront, address book, etc. A UML diagram is not essential, but a table schema with data types in the least. Thanks! | Check out the Library of Free Data Models from DatabaseAnswers.org -- might be a good starting point. I can't vouch for the quality, but there is a lot here... | Does anyone know where to find free database design templates? I'm obviously not talking about a full solution, but just a good starting point for common applications for software architects. It could be for a CMS, e-commerce storefront, address book, etc. A UML diagram is not essential, but a table schema with data ty... | TITLE:
Does anyone know where to find free database design templates?
QUESTION:
I'm obviously not talking about a full solution, but just a good starting point for common applications for software architects. It could be for a CMS, e-commerce storefront, address book, etc. A UML diagram is not essential, but a table s... | [
"database",
"templates"
] | 7 | 12 | 16,010 | 4 | 0 | 2008-09-12T02:16:12.503000 | 2008-09-12T02:22:27.530000 |
58,190 | 58,204 | Are CLR stored procedures preferred over TSQL stored procedures in SQL 2005+? | My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief. However recently I have needed to debug some very poorly written TSQL stored procs. As usual I found many of t... | There are places for both well-written, well-thought-out T-SQL and CLR. If some function is not called frequently and if it required extended procedures in SQL Server 2000, CLR may be an option. Also running things like calculation right next to the data may be appealing. But solving bad programmers by throwing in new ... | Are CLR stored procedures preferred over TSQL stored procedures in SQL 2005+? My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief. However recently I have needed t... | TITLE:
Are CLR stored procedures preferred over TSQL stored procedures in SQL 2005+?
QUESTION:
My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief. However recent... | [
".net",
"sql-server",
"t-sql",
"sqlclr"
] | 16 | 15 | 8,432 | 12 | 0 | 2008-09-12T02:27:12.323000 | 2008-09-12T02:36:20.833000 |
58,207 | 58,212 | Using the result of a command as an argument in bash? | To create a playlist for all of the music in a folder, I am using the following command in bash: ls > list.txt I would like to use the result of the pwd command for the name of the playlist. Something like: ls > ${pwd}.txt That doesn't work though - can anyone tell me what syntax I need to use to do something like this... | The best way to do this is with "$(command substitution)" (thanks, Landon ): ls > "$(pwd).txt" You will sometimes also see people use the older backtick notation, but this has several drawbacks in terms of nesting and escaping: ls > "`pwd`.txt" Note that the unprocessed substitution of pwd is an absolute path, so the a... | Using the result of a command as an argument in bash? To create a playlist for all of the music in a folder, I am using the following command in bash: ls > list.txt I would like to use the result of the pwd command for the name of the playlist. Something like: ls > ${pwd}.txt That doesn't work though - can anyone tell ... | TITLE:
Using the result of a command as an argument in bash?
QUESTION:
To create a playlist for all of the music in a folder, I am using the following command in bash: ls > list.txt I would like to use the result of the pwd command for the name of the playlist. Something like: ls > ${pwd}.txt That doesn't work though ... | [
"bash",
"command-line"
] | 75 | 91 | 69,197 | 7 | 0 | 2008-09-12T02:38:10.563000 | 2008-09-12T02:42:06.047000 |
58,230 | 58,234 | Rendering graphics in C# | Is there another way to render graphics in C# beyond GDI+ and XNA? (For the development of a tile map editor.) | SDL.NET is the solution I've come to love. If you need 3D on top of it, you can use Tao.OpenGL to render inside it. It's fast, industry standard ( SDL, that is), and cross-platform. | Rendering graphics in C# Is there another way to render graphics in C# beyond GDI+ and XNA? (For the development of a tile map editor.) | TITLE:
Rendering graphics in C#
QUESTION:
Is there another way to render graphics in C# beyond GDI+ and XNA? (For the development of a tile map editor.)
ANSWER:
SDL.NET is the solution I've come to love. If you need 3D on top of it, you can use Tao.OpenGL to render inside it. It's fast, industry standard ( SDL, that ... | [
"c#",
"gdi+",
"xna",
"rendering"
] | 9 | 10 | 20,648 | 6 | 0 | 2008-09-12T02:56:32.610000 | 2008-09-12T02:59:41.463000 |
58,245 | 58,257 | Showing a tooltip for a MenuItem | I've got a menu that contains, among other things, some most-recently-used file paths. The paths to these files can be long, so the text sometimes gets clipped like "C:\Progra...\foo.txt" I'd like to pop a tooltip with the full path when the user hovers over the item, but this doesn't seem possible with the Tooltip cla... | If you are creating your menu items using the System.Windows.Forms.MenuItem class you won't have a "ToolTipText" property. You should use the System.Windows.Forms.ToolStripMenuItem class which is new as of.Net Framework 2.0 and DOES include the "ToolTipText" property. You also have to remember to specify ShowItemToolTi... | Showing a tooltip for a MenuItem I've got a menu that contains, among other things, some most-recently-used file paths. The paths to these files can be long, so the text sometimes gets clipped like "C:\Progra...\foo.txt" I'd like to pop a tooltip with the full path when the user hovers over the item, but this doesn't s... | TITLE:
Showing a tooltip for a MenuItem
QUESTION:
I've got a menu that contains, among other things, some most-recently-used file paths. The paths to these files can be long, so the text sometimes gets clipped like "C:\Progra...\foo.txt" I'd like to pop a tooltip with the full path when the user hovers over the item, ... | [
".net",
"winforms"
] | 17 | 26 | 25,468 | 6 | 0 | 2008-09-12T03:05:23.823000 | 2008-09-12T03:15:53.033000 |
58,247 | 58,252 | Compiling code on an external drive | To make things easier when switching between machines (my workstation at the office and my personal laptop) I have thought about trying an external hard drive to store my working directory on. Specifically I am looking at Firewire 800 drives (most are 5400 rpm 8mb cache). What I am wondering is if anyone has experience... | It depends on the size of the project. The throughput is low and the latency is high, so you're going to get hit every which way, but due to the latency you'll be hit harder if you have a lot of little files rather than a few large ones. Have you considered simply carrying around a GIT or other distributed repository a... | Compiling code on an external drive To make things easier when switching between machines (my workstation at the office and my personal laptop) I have thought about trying an external hard drive to store my working directory on. Specifically I am looking at Firewire 800 drives (most are 5400 rpm 8mb cache). What I am w... | TITLE:
Compiling code on an external drive
QUESTION:
To make things easier when switching between machines (my workstation at the office and my personal laptop) I have thought about trying an external hard drive to store my working directory on. Specifically I am looking at Firewire 800 drives (most are 5400 rpm 8mb c... | [
"visual-studio",
"hardware"
] | 1 | 5 | 1,016 | 3 | 0 | 2008-09-12T03:06:13.803000 | 2008-09-12T03:11:30.873000 |
58,280 | 58,450 | UnhandledException handler in a .Net Windows Service | Is it possible to use an UnhandledException Handler in a Windows Service? Normally I would use a custom built Exception Handling Component that does logging, phone home, etc. This component adds a handler to System.AppDomain.CurrentDomain.UnhandledException but as far as I can tell this doesn’t achieve anything win a W... | Ok, I’ve done a little more research into this now. When you create a windows service in.Net, you create a class that inherits from System.ServiceProcess.ServiceBase (In VB this is hidden in the.Designer.vb file). You then override the OnStart and OnStop function, and OnPause and OnContinue if you choose to. These meth... | UnhandledException handler in a .Net Windows Service Is it possible to use an UnhandledException Handler in a Windows Service? Normally I would use a custom built Exception Handling Component that does logging, phone home, etc. This component adds a handler to System.AppDomain.CurrentDomain.UnhandledException but as fa... | TITLE:
UnhandledException handler in a .Net Windows Service
QUESTION:
Is it possible to use an UnhandledException Handler in a Windows Service? Normally I would use a custom built Exception Handling Component that does logging, phone home, etc. This component adds a handler to System.AppDomain.CurrentDomain.UnhandledE... | [
".net",
"vb.net",
"exception",
"windows-services"
] | 26 | 16 | 13,710 | 2 | 0 | 2008-09-12T04:06:20.087000 | 2008-09-12T07:30:04.107000 |
58,289 | 58,295 | Excel like server side control for ASP.NET | We have a requirement to increase the functionality of a grid we are using to edit on our webapp, and our manager keeps citing Excel as the perfect example for a data grid:/ He still doesn't really get that a Spreadsheet like control doesn't exist out of the box, but I thought I'd do a bit of searching nonetheless. I'v... | Update: with Silverlight fast approaching, maybe you can use a real excel control. Devexpress has a powerful grid control for both web and windows. It is not free and I guess nothing really matches Excel. But once the users started using it, they wanted every app with it. Check these videos especially the data grouping... | Excel like server side control for ASP.NET We have a requirement to increase the functionality of a grid we are using to edit on our webapp, and our manager keeps citing Excel as the perfect example for a data grid:/ He still doesn't really get that a Spreadsheet like control doesn't exist out of the box, but I thought... | TITLE:
Excel like server side control for ASP.NET
QUESTION:
We have a requirement to increase the functionality of a grid we are using to edit on our webapp, and our manager keeps citing Excel as the perfect example for a data grid:/ He still doesn't really get that a Spreadsheet like control doesn't exist out of the ... | [
"asp.net",
"excel",
"servercontrols"
] | 3 | 3 | 5,586 | 3 | 0 | 2008-09-12T04:18:39.607000 | 2008-09-12T04:22:00.330000 |
58,294 | 58,296 | How do I get the external IP of a socket in Python? | When I call socket.getsockname() on a socket object, it returns a tuple of my machine's internal IP and the port. However, I would like to retrieve my external IP. What's the cheapest, most efficient manner of doing this? | This isn't possible without cooperation from an external server, because there could be any number of NATs between you and the other computer. If it's a custom protocol, you could ask the other system to report what address it's connected to. | How do I get the external IP of a socket in Python? When I call socket.getsockname() on a socket object, it returns a tuple of my machine's internal IP and the port. However, I would like to retrieve my external IP. What's the cheapest, most efficient manner of doing this? | TITLE:
How do I get the external IP of a socket in Python?
QUESTION:
When I call socket.getsockname() on a socket object, it returns a tuple of my machine's internal IP and the port. However, I would like to retrieve my external IP. What's the cheapest, most efficient manner of doing this?
ANSWER:
This isn't possible... | [
"python",
"sockets"
] | 10 | 9 | 22,334 | 9 | 0 | 2008-09-12T04:21:51.237000 | 2008-09-12T04:23:53.853000 |
58,300 | 58,318 | Tools for manipulating PowerPoint files | Do you know managed tools for manipulating PowerPoint files? The tool should be 100% managed code and offer the option to handle.ppt and.pptx files. | Well, 100% managed could be going the hard route, however, you can use the Office PIAs from your.NET code. Joel Spolsky has an article discussing your various options. | Tools for manipulating PowerPoint files Do you know managed tools for manipulating PowerPoint files? The tool should be 100% managed code and offer the option to handle.ppt and.pptx files. | TITLE:
Tools for manipulating PowerPoint files
QUESTION:
Do you know managed tools for manipulating PowerPoint files? The tool should be 100% managed code and offer the option to handle.ppt and.pptx files.
ANSWER:
Well, 100% managed could be going the hard route, however, you can use the Office PIAs from your.NET cod... | [
"c#",
".net",
"powerpoint"
] | 0 | 0 | 1,141 | 1 | 0 | 2008-09-12T04:32:15.237000 | 2008-09-12T04:48:51.843000 |
58,305 | 58,326 | Is there a way to take a screenshot using Java and save it to some sort of image? | Simple as the title states: Can you use only Java commands to take a screenshot and save it? Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard? | Believe it or not, you can actually use java.awt.Robot to "create an image containing pixels read from the screen." You can then write that image to a file on disk. I just tried it, and the whole thing ends up like: Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()); BufferedImage capture... | Is there a way to take a screenshot using Java and save it to some sort of image? Simple as the title states: Can you use only Java commands to take a screenshot and save it? Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard? | TITLE:
Is there a way to take a screenshot using Java and save it to some sort of image?
QUESTION:
Simple as the title states: Can you use only Java commands to take a screenshot and save it? Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard?
ANSWER:
Believe it or n... | [
"java",
"image",
"screenshot"
] | 136 | 195 | 147,219 | 8 | 0 | 2008-09-12T04:36:44.007000 | 2008-09-12T04:56:20.733000 |
58,306 | 58,446 | Graph Algorithm To Find All Connections Between Two Arbitrary Vertices | I am trying to determine the best time efficient algorithm to accomplish the task described below. I have a set of records. For this set of records I have connection data which indicates how pairs of records from this set connect to one another. This basically represents an undirected graph, with the records being the ... | It appears that this can be accomplished with a depth-first search of the graph. The depth-first search will find all non-cyclical paths between two nodes. This algorithm should be very fast and scale to large graphs (The graph data structure is sparse so it only uses as much memory as it needs to). I noticed that the ... | Graph Algorithm To Find All Connections Between Two Arbitrary Vertices I am trying to determine the best time efficient algorithm to accomplish the task described below. I have a set of records. For this set of records I have connection data which indicates how pairs of records from this set connect to one another. Thi... | TITLE:
Graph Algorithm To Find All Connections Between Two Arbitrary Vertices
QUESTION:
I am trying to determine the best time efficient algorithm to accomplish the task described below. I have a set of records. For this set of records I have connection data which indicates how pairs of records from this set connect t... | [
"algorithm",
"language-agnostic",
"graph-theory"
] | 122 | 122 | 106,993 | 17 | 0 | 2008-09-12T04:36:51.637000 | 2008-09-12T07:25:43.867000 |
58,340 | 120,076 | How to test a WPF user interface? | Using win forms with an MVC / MVP architecture, I would normally use a class to wrap a view to test the UI while using mocks for the model and controller/presenter. The wrapper class would make most everything in the UI an observable property for the test runner through properties and events. Would this be a viable app... | As for the testing itself, you're probably best off using the UI Automation framework. Or if you want a more fluent and wpf/winforms/win32/swt-independent way of using the framework, you could download White from Codeplex (provided that you're in a position to use open source code in your environment). For the gotchas;... | How to test a WPF user interface? Using win forms with an MVC / MVP architecture, I would normally use a class to wrap a view to test the UI while using mocks for the model and controller/presenter. The wrapper class would make most everything in the UI an observable property for the test runner through properties and ... | TITLE:
How to test a WPF user interface?
QUESTION:
Using win forms with an MVC / MVP architecture, I would normally use a class to wrap a view to test the UI while using mocks for the model and controller/presenter. The wrapper class would make most everything in the UI an observable property for the test runner throu... | [
".net",
"wpf",
"testing"
] | 68 | 66 | 68,486 | 9 | 0 | 2008-09-12T05:08:09.610000 | 2008-09-23T09:41:59.243000 |
58,353 | 112,879 | Recent Projects panel on VS2008 not working for fresh installs | The Recent Projects panel on the Start Page of VS2008 Professional doesn't appear to work, and constantly remains empty. I've noticed this on 3 of our developers VS2008 installations, in fact all the installations that weren't updated from 2005 but installed from scratch. I generally treat this as a bit of a curiosity,... | Finally worked it out! The recent projects is driven by (or at least shares a 'Show' flag with) the Recent Documents in the Start Menu. For some reason our SOE has this hidden. Both the following need th be set to 0: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsHistory HKEY_... | Recent Projects panel on VS2008 not working for fresh installs The Recent Projects panel on the Start Page of VS2008 Professional doesn't appear to work, and constantly remains empty. I've noticed this on 3 of our developers VS2008 installations, in fact all the installations that weren't updated from 2005 but installe... | TITLE:
Recent Projects panel on VS2008 not working for fresh installs
QUESTION:
The Recent Projects panel on the Start Page of VS2008 Professional doesn't appear to work, and constantly remains empty. I've noticed this on 3 of our developers VS2008 installations, in fact all the installations that weren't updated from... | [
"visual-studio-2008"
] | 1 | 0 | 516 | 2 | 0 | 2008-09-12T05:17:21.710000 | 2008-09-22T02:21:48.047000 |
58,380 | 58,387 | Avoiding first chance exception messages when the exception is safely handled | The following bit of code catches the EOS Exception using (var reader = new BinaryReader(httpRequestBodyStream)) {
try { while (true) { bodyByteList.Add(reader.ReadByte()); } } catch (EndOfStreamException) { } } So why do I still receive first-chance exceptions in my console? A first chance exception of type 'System.I... | The point of "first-chance" exceptions is that you're seeing them pre-handler so that you can stop on them during debugging at the point of throwing. A "second-chance" exception is one that has no appropriate handler. Sometimes you want to catch "first-chance" exceptions because it's important to see what's happening w... | Avoiding first chance exception messages when the exception is safely handled The following bit of code catches the EOS Exception using (var reader = new BinaryReader(httpRequestBodyStream)) {
try { while (true) { bodyByteList.Add(reader.ReadByte()); } } catch (EndOfStreamException) { } } So why do I still receive fir... | TITLE:
Avoiding first chance exception messages when the exception is safely handled
QUESTION:
The following bit of code catches the EOS Exception using (var reader = new BinaryReader(httpRequestBodyStream)) {
try { while (true) { bodyByteList.Add(reader.ReadByte()); } } catch (EndOfStreamException) { } } So why do I... | [
"c#",
".net",
"exception"
] | 78 | 79 | 68,897 | 9 | 0 | 2008-09-12T05:48:36.800000 | 2008-09-12T05:56:34.847000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.