content
stringlengths
86
88.9k
title
stringlengths
0
150
question
stringlengths
1
35.8k
answers
list
answers_scores
list
non_answers
list
non_answers_scores
list
tags
list
name
stringlengths
30
130
Q: ASP.NET Proxy Application Let me try to explain what I need. I have a server that is visible from the internet. What I need is to create a ASP.NET application that get the request of a web Site and send to a internal server, then it gets the response and publish the the info. For the client this should be totally ...
ASP.NET Proxy Application
Let me try to explain what I need. I have a server that is visible from the internet. What I need is to create a ASP.NET application that get the request of a web Site and send to a internal server, then it gets the response and publish the the info. For the client this should be totally transparent. For different reas...
[ "Why won't any old proxy software work for this? Why does it need to be an ASP.NET application? There are TONS of tools out there (both Windows and *nix) that will get the job done quite easily. Check Squid or NetProxy for starters.\nIf you need to integrate with IIS, IISProxy looks like it would do the trick to...
[ 3, 1 ]
[]
[]
[ ".net", "asp.net", "iis" ]
stackoverflow_0000011460_.net_asp.net_iis.txt
Q: Is there any kind of non text interface to MySQL? I have a MySQL query that returns a result with a single column of integers. Is there any way to get the MySQL C API to transfer this as actually integers rather than as ASCII text? For that matter is there a way to get MySQL to do /any/ of the API stuff as other t...
Is there any kind of non text interface to MySQL?
I have a MySQL query that returns a result with a single column of integers. Is there any way to get the MySQL C API to transfer this as actually integers rather than as ASCII text? For that matter is there a way to get MySQL to do /any/ of the API stuff as other than ASCII text. I'm thinking this would save a bit of t...
[ "You're probably out of luck, to be honest. Looking at the MySQL C API (http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html, http://dev.mysql.com/doc/refman/5.0/en/c-api-datatypes.html, look at MYSQL_ROW) there doesn't seem to be a mechanism for returning data in its actual type... the joys of using structs...
[ 1 ]
[]
[]
[ "api", "mysql" ]
stackoverflow_0000011686_api_mysql.txt
Q: Publishing to IIS - Best Practices I'm not new to web publishing, BUT I am new to publishing against a web site that is frequently used. Previously, the apps on this server were not hit very often, but we're rolling out a high demand application. So, what is the best practice for publishing to a live web server?...
Publishing to IIS - Best Practices
I'm not new to web publishing, BUT I am new to publishing against a web site that is frequently used. Previously, the apps on this server were not hit very often, but we're rolling out a high demand application. So, what is the best practice for publishing to a live web server? Is it best to wait until the middle of...
[ "\n@Nick DeVore wrote:\nIf 2 is true, then that seems bad if\nsomeone is using that specific page or\nDLL and it gets overwritten.\n\nIt's not really an issue if you're using ASP.NET stack (Webforms, MVC or rolling your own) because all your aspx files get compiled and therefore not touched by webserver. /bin/ fold...
[ 2, 0 ]
[]
[]
[ "iis", "publish" ]
stackoverflow_0000011764_iis_publish.txt
Q: Personalized icon next to the URL address in the browser's address bar? How do I write code where a company icon appears on the left side next to the URL address in the browser's address bar? A: You are looking for a Favicon. A: it loads www.whateveryouron.com/favicon.ico if your domain is robermyers.com, just...
Personalized icon next to the URL address in the browser's address bar?
How do I write code where a company icon appears on the left side next to the URL address in the browser's address bar?
[ "You are looking for a Favicon.\n", "it loads www.whateveryouron.com/favicon.ico\nif your domain is robermyers.com, just put a favicon.ico 16px icon thats accessible, and you're in like flint.\njust try this googles or stackoverflows\n", "You need to create a favicon. The favicon uses a standard (in Windows, at...
[ 8, 4, 4, 0, 0, 0 ]
[]
[]
[ "html" ]
stackoverflow_0000010072_html.txt
Q: best way to persist data in .NET Web Service I have a web service that queries data from this json file, but I don't want the web service to have to access the file every time. I'm thinking that maybe I can store the data somewhere else (maybe in memory) so the web service can just get the data from there the next...
best way to persist data in .NET Web Service
I have a web service that queries data from this json file, but I don't want the web service to have to access the file every time. I'm thinking that maybe I can store the data somewhere else (maybe in memory) so the web service can just get the data from there the next time it's trying to query the same data. I kinda ...
[ "Extending on Ice^^Heat's idea, you might want to think about where you would cache - either cache the contents of the json file in the Application cache like so: \nContext.Cache.Insert(\"foo\", _\n Foo, _\n Nothing, _\n DateAdd(DateInterval.Minute, 30, Now()), _\n ...
[ 5, 3, 2, 2 ]
[]
[]
[ ".net", "json", "memory", "persistence", "web_services" ]
stackoverflow_0000011761_.net_json_memory_persistence_web_services.txt
Q: How do I write those cool command line code generators (rails, sproutcore, webgen) I've grokked the code for all the aforementioned apps and I still can't find a straightforward way to create a static directory structure from a single command. A: Check out rubigen. You can also view a presentation by dr nic. A...
How do I write those cool command line code generators (rails, sproutcore, webgen)
I've grokked the code for all the aforementioned apps and I still can't find a straightforward way to create a static directory structure from a single command.
[ "Check out rubigen. You can also view a presentation by dr nic.\n", "So what you want is to able to issue a command that will generate an entire directory tree?\ncp -r <template> <destination>\n\nOr am I misunderstanding? If you want to generate a consistent directory structure, your best bet is to simply copy ...
[ 5, 0 ]
[]
[]
[ "ruby" ]
stackoverflow_0000010595_ruby.txt
Q: Standard Signature a Text in a Message using Exchange Server Anyone know how to do this without using a third party program? If there no way to do it with a add-on someone can recommend one? EDIT: I need to add this in the server so all users have the same signature. Thanks A: You need to create your own exchan...
Standard Signature a Text in a Message using Exchange Server
Anyone know how to do this without using a third party program? If there no way to do it with a add-on someone can recommend one? EDIT: I need to add this in the server so all users have the same signature. Thanks
[ "You need to create your own exchange message sink to do this. Here's a classic VB example from MS KB:\nhttp://support.microsoft.com/kb/317327\nand a VB Script one:\nhttp://support.microsoft.com/kb/317680\nAnd lots of goodness from MSDN about Exchange 2003 Transport Event Sinks:\nhttp://msdn.microsoft.com/en-us/lib...
[ 2, 0 ]
[]
[]
[ "exchange_server", "outlook" ]
stackoverflow_0000011275_exchange_server_outlook.txt
Q: mod_rewrite to alias one file suffix type to another I hope I can explain this clearly enough, but if not let me know and I'll try to clarify. I'm currently developing a site using ColdFusion and have a mod_rewrite rule in place to make it look like the site is using PHP. Any requests for index.php get processed b...
mod_rewrite to alias one file suffix type to another
I hope I can explain this clearly enough, but if not let me know and I'll try to clarify. I'm currently developing a site using ColdFusion and have a mod_rewrite rule in place to make it look like the site is using PHP. Any requests for index.php get processed by index.cfm (the rule maps *.php to *.cfm). This works gre...
[ "You can use the S flag to skip the 404 rule, like this:\nRewriteEngine on\n\n# Do not separate these two rules so long as the first has S=1\nRewriteRule (.*)\\.php$ $1.cfm [S=1]\nRewriteRule \\.cfm$ - [R=404]\n\nIf you are also using the Alias option then you should also add the PT flag. See the mod_rewrite docume...
[ 1, 0, 0 ]
[]
[]
[ "apache", "mod_rewrite", "seo" ]
stackoverflow_0000008832_apache_mod_rewrite_seo.txt
Q: Visual Studio Setup Project Custom Dialog I have created a custom dialog for Visual Studio Setup Project using the steps described here Now I have a combobox in one of my dialogs. I want to populate the combobox with a list of all SQL Server instances running on the local network. It's trivial to get the server li...
Visual Studio Setup Project Custom Dialog
I have created a custom dialog for Visual Studio Setup Project using the steps described here Now I have a combobox in one of my dialogs. I want to populate the combobox with a list of all SQL Server instances running on the local network. It's trivial to get the server list ... but I'm completely lost on how to make t...
[ "I've always found the custom dialogs in visual studio setup projects to be woefully limited and barely functional.\nBy contrast, I normally create custom actions that display winforms gui's for any remotely difficult tasks during setup. Works really well and you can do just about anything you want by creating a c...
[ 13, 1 ]
[]
[]
[ ".net", "installation", "projects", "visual_studio", "windows_installer" ]
stackoverflow_0000011439_.net_installation_projects_visual_studio_windows_installer.txt
Q: Using mod_rewrite to Mimic SSL Virtual Hosts? What is the best way to transparently rewrite a URL over an SSL connection with Apache 2.2? Apache 2 does not natively support multiple name-based virtual hosts for an SSL connection and I have heard that mod_rewrite can help with this. I would like to do something lik...
Using mod_rewrite to Mimic SSL Virtual Hosts?
What is the best way to transparently rewrite a URL over an SSL connection with Apache 2.2? Apache 2 does not natively support multiple name-based virtual hosts for an SSL connection and I have heard that mod_rewrite can help with this. I would like to do something like this: I have set up the server so that the sites ...
[ "Configure a single VirtualHost to serve both secure.example.com and dbadmin.example.com (making it the only *:443 VirtualHost achieves this). You can then use mod_rewrite to adjust the URI for requests to dbadmin.example.com:\n<VirtualHost *:443>\n ServerName secure.example.com\n ServerAlias dbadmin.example....
[ 3, 2, 0 ]
[]
[]
[ "apache", "https", "mod_rewrite" ]
stackoverflow_0000008355_apache_https_mod_rewrite.txt
Q: ASP.NET UserControl's and DefaultEvent Outline OK, I have Google'd this and already expecting a big fat NO!! But I thought I should ask since I know sometimes there can be the odd little gem of knowledge lurking around in peoples heads ^_^ I am working my way through some excercises in a book for study, and this p...
ASP.NET UserControl's and DefaultEvent
Outline OK, I have Google'd this and already expecting a big fat NO!! But I thought I should ask since I know sometimes there can be the odd little gem of knowledge lurking around in peoples heads ^_^ I am working my way through some excercises in a book for study, and this particular exercise is User Controls. I have ...
[ "Here is a possible answer, without testing (like martin did). \nIn reflector, you will see that the DefaultEventAttribute allows itself to be inherited.\nIn reflector, you see that the UserControl class has it's default event set to the Load event.\nSo the possible reason is that even though you are decorating you...
[ 0, 0 ]
[]
[]
[ "asp.net", "attributes", "c#", "user_controls" ]
stackoverflow_0000011267_asp.net_attributes_c#_user_controls.txt
Q: In .NET, will empty method calls be optimized out? Given an empty method body, will the JIT optimize out the call (I know the C# compiler won't). How would I go about finding out? What tools should I be using and where should I be looking? Since I'm sure it'll be asked, the reason for the empty method is a preproc...
In .NET, will empty method calls be optimized out?
Given an empty method body, will the JIT optimize out the call (I know the C# compiler won't). How would I go about finding out? What tools should I be using and where should I be looking? Since I'm sure it'll be asked, the reason for the empty method is a preprocessor directive. @Chris: Makes sense, but it could opti...
[ "This chap has quite a good treatment of JIT optimisations, do a search on the page for 'method is empty', it's about half way down the article -\nhttp://www.codeproject.com/KB/dotnet/JITOptimizations.aspx\nApparently empty methods do get optimised out through inlining what is effectively no code.\n@Chris: I do rea...
[ 15, 13, 2, 1 ]
[]
[]
[ ".net", "performance" ]
stackoverflow_0000011783_.net_performance.txt
Q: What is the best way to upload a file via an HTTP POST with a web form? Basically, something better than this: <input type="file" name="myfile" size="50"> First of all, the browse button looks different on every browser. Unlike the submit button on a form, you have to come up with some hack-y way to style it. Se...
What is the best way to upload a file via an HTTP POST with a web form?
Basically, something better than this: <input type="file" name="myfile" size="50"> First of all, the browse button looks different on every browser. Unlike the submit button on a form, you have to come up with some hack-y way to style it. Secondly, there's no progress indicator showing you how much of the file has up...
[ "File upload boxes is where we're currently at if you don't want to involve other technologies like Flash, Java or ActiveX.\nWith plain HTML you are pretty much limited to the experience you've described (no progress bar, double submits, etc). If you are willing to use some javascript, you can solve some of the pro...
[ 9, 1, 1, 0 ]
[]
[]
[ "forms", "html", "http", "post", "upload" ]
stackoverflow_0000011974_forms_html_http_post_upload.txt
Q: Why do I get the error "Unable to update the password" when calling AzMan? I'm doing a authorization check from a WinForms application with the help of the AzMan authorization provider from Enterprise Library and am receiving the the following error: Unable to update the password. The value provided as the curren...
Why do I get the error "Unable to update the password" when calling AzMan?
I'm doing a authorization check from a WinForms application with the help of the AzMan authorization provider from Enterprise Library and am receiving the the following error: Unable to update the password. The value provided as the current password is incorrect. (Exception from HRESULT: 0x8007052B) (Microsoft.Practic...
[ "For AzMan with ASP.NET, turn on impersonation in web.config (<identity impersonate=\"true\" username=\"xx\" pasword=\"xx\" />), and make sure with an AD administrator that the impersonation account has \"reader\" permissions on the AzMan store; plus, give write permissions to this account on the Temporary ASP.NET ...
[ 2, 2 ]
[]
[]
[ "adam", "authorization", "azman", "c#", "winforms" ]
stackoverflow_0000010810_adam_authorization_azman_c#_winforms.txt
Q: Configuring VisualSVN Server to use _svn instead of .svn We were having a problem with our build server not checking out modifications from source control despite recognizing that there had been changes. It was traced to the control folder (not sure what it's real name is), the existing working builds were using _...
Configuring VisualSVN Server to use _svn instead of .svn
We were having a problem with our build server not checking out modifications from source control despite recognizing that there had been changes. It was traced to the control folder (not sure what it's real name is), the existing working builds were using _svn. Clearing the working folder forced a new complete checkou...
[ "The business about _svn vs. .svn was an issue with Visual Studio web projects only (and I'm fairly sure it was fixed in VS2005 anyway), it's not a general \"_svn works better with VS\" thing.\nIt's also only a working-copy issue, not a repository issue - i.e. it doesn't matter if some users of SVN are using client...
[ 6, 3, 2, 0 ]
[]
[]
[ "svn", "version_control", "visualsvn_server" ]
stackoverflow_0000012107_svn_version_control_visualsvn_server.txt
Q: Windows Forms Threading and Events - ListBox updates promptly but progressbar experiences huge delay Our team is creating a new recruitment workflow system to replace an old one. I have been tasked with migrating the old data into the new schema. I have decided to do this by creating a small Windows Forms project ...
Windows Forms Threading and Events - ListBox updates promptly but progressbar experiences huge delay
Our team is creating a new recruitment workflow system to replace an old one. I have been tasked with migrating the old data into the new schema. I have decided to do this by creating a small Windows Forms project as the schema are radically different and straight TSQL scripts are not an adequate solution. The main sea...
[ "Maybe you can try the BackgroundWorker component. It makes threading easier. Examples here:\n\nBackgroundWorker Threads and Supporting Cancel\nUsing the BackgroundWorker Component in .NET 2 applications\nBackgroundWorker Sample\n\n", "Maybe outside of the scope but, to sometimes its useful to do an Application.D...
[ 2, 0, 0, 0 ]
[ "Are you sure that the UI thread is running freely during all this process? i.e. it's not sitting blocked-up on a Join or some other wait? That's what it looks like to me.\nThe suggestion of using BackgroundWorker is a good one - definitely superior to trying to sledge-hammer your way out of the problem with a lo...
[ -1, -1 ]
[ "delegates", "events", "forms", "multithreading", "windows" ]
stackoverflow_0000012095_delegates_events_forms_multithreading_windows.txt
Q: Variable Bindings in WPF I’m creating a UserControl for a rich TreeView (one that has context menus for renaming nodes, adding child nodes, etc.). I want to be able to use this control to manage or navigate any hierarchical data structures I will create. I currently have it working for any data structure that impl...
Variable Bindings in WPF
I’m creating a UserControl for a rich TreeView (one that has context menus for renaming nodes, adding child nodes, etc.). I want to be able to use this control to manage or navigate any hierarchical data structures I will create. I currently have it working for any data structure that implements the following interface...
[ "Perhaps this might help:\nCreate a new Binding when you set the HeaderProperty property on the Header dependency property:\nHeader property is your normal everyday DependencyProperty:\n public string Header\n {\n get { return (string)GetValue(HeaderProperty); }\n set { SetValue(HeaderProperty, ...
[ 2 ]
[]
[]
[ "c#", "data_binding", "wpf" ]
stackoverflow_0000011516_c#_data_binding_wpf.txt
Q: Access to global application settings A database application that I'm currently working on, stores all sorts of settings in the database. Most of those settings are there to customize certain business rules, but there's also some other stuff in there. The app contains objects that specifically do a certain task, e...
Access to global application settings
A database application that I'm currently working on, stores all sorts of settings in the database. Most of those settings are there to customize certain business rules, but there's also some other stuff in there. The app contains objects that specifically do a certain task, e.g., a certain complicated calculation. Tho...
[ "You could use Martin Fowlers ServiceLocator pattern. In php it could look like this:\nclass ServiceLocator {\n private static $soleInstance;\n private $globalSettings;\n\n public static function load($locator) {\n self::$soleInstance = $locator;\n }\n\n public static function globalSettings() {\n if (!i...
[ 1, 1, 0, 0 ]
[]
[]
[ "language_agnostic", "oop" ]
stackoverflow_0000012140_language_agnostic_oop.txt
Q: Namespace/solution structure I apologize for asking such a generalized question, but it's something that can prove challenging for me. My team is about to embark on a large project that will hopefully drag together all of the random one-off codebases that have evolved through the years. Given that this project wil...
Namespace/solution structure
I apologize for asking such a generalized question, but it's something that can prove challenging for me. My team is about to embark on a large project that will hopefully drag together all of the random one-off codebases that have evolved through the years. Given that this project will cover standardizing logical enti...
[ "There's a million ways to skin a cat. However, the simplest one is always the best. Which way is the simplest for you? Depends on your requirements. But there are some general rules of thumb I follow.\nFirst, reduce the overall number of projects as much as possible. When you compile twenty times a day, that ...
[ 12, 7, 4, 4, 3, 0 ]
[]
[]
[ "architecture", "legacy", "module", "namespaces" ]
stackoverflow_0000012243_architecture_legacy_module_namespaces.txt
Q: How do I restyle an Adobe Flex Accordion to include a button in each canvas header? Here is the sample code for my accordion: <mx:Accordion x="15" y="15" width="230" height="599" styleName="myAccordion"> <mx:Canvas id="pnlSpotlight" label="SPOTLIGHT" height="100%" width="100%" horizontalScrollPolicy="off"> ...
How do I restyle an Adobe Flex Accordion to include a button in each canvas header?
Here is the sample code for my accordion: <mx:Accordion x="15" y="15" width="230" height="599" styleName="myAccordion"> <mx:Canvas id="pnlSpotlight" label="SPOTLIGHT" height="100%" width="100%" horizontalScrollPolicy="off"> <mx:VBox width="100%" height="80%" paddingTop="2" paddingBottom="1" verticalGap="1"...
[ "Thanks, I got it working using FlexLib's CanvasButtonAccordionHeader.\n", "You will have to create a custom header renderer, add a button to it and position it manually. Try something like this:\n<mx:Accordion>\n <mx:headerRenderer>\n <mx:Component>\n <AccordionHeader xmlns=\"mx.containers.a...
[ 2, 1 ]
[]
[]
[ "actionscript_3", "apache_flex" ]
stackoverflow_0000011665_actionscript_3_apache_flex.txt
Q: How can I remove nodes from a SiteMapNodeCollection? I've got a Repeater that lists all the web.sitemap child pages on an ASP.NET page. Its DataSource is a SiteMapNodeCollection. But, I don't want my registration form page to show up there. Dim Children As SiteMapNodeCollection = SiteMap.CurrentNode.ChildNodes ...
How can I remove nodes from a SiteMapNodeCollection?
I've got a Repeater that lists all the web.sitemap child pages on an ASP.NET page. Its DataSource is a SiteMapNodeCollection. But, I don't want my registration form page to show up there. Dim Children As SiteMapNodeCollection = SiteMap.CurrentNode.ChildNodes 'remove registration page from collection For Each n As Si...
[ "Using Linq and .Net 3.5:\n//this will now be an enumeration, rather than a read only collection\nDim children = SiteMap.CurrentNode.ChildNodes.Where( _\n Function (x) x.Url <> \"/Registration.aspx\" )\n\nRepeaterSubordinatePages.DataSource = children \n\nWithout Linq, but using .Net 2:\nFunction IsShown( n as S...
[ 1, 1, 0 ]
[]
[]
[ ".net", "asp.net", "repeater", "sitemap", "vb.net" ]
stackoverflow_0000012297_.net_asp.net_repeater_sitemap_vb.net.txt
Q: Reference that lists available JavaScript events? I'm aware of things like onchange, onmousedown and onmouseup but is there a good reference somewhere that lists all of them complete with possibly a list of the elements that they cover? A: W3Schools seems to have a good Javascript events reference: HTML DOM Even...
Reference that lists available JavaScript events?
I'm aware of things like onchange, onmousedown and onmouseup but is there a good reference somewhere that lists all of them complete with possibly a list of the elements that they cover?
[ "W3Schools seems to have a good Javascript events reference: HTML DOM Events\n", "Quirksmode has a nice event-compatibility table and an introduction.\n", "Here is a pretty good JavaScript event reference with the elements they are for:\nJavaScript Tutorial >> JavaScript Events\n", "This Javascript Cheat Shee...
[ 11, 11, 4, 4, 2 ]
[]
[]
[ "browser", "client_side", "javascript" ]
stackoverflow_0000006661_browser_client_side_javascript.txt
Q: Automate adding entries to a wiki Once I have my renamed files I need to add them to my project's wiki page. This is a fairly repetitive manual task, so I guess I could script it but I don't know where to start. The process is: Got to appropriate page on the wiki for each team member (DeveloperA, DeveloperB, Deve...
Automate adding entries to a wiki
Once I have my renamed files I need to add them to my project's wiki page. This is a fairly repetitive manual task, so I guess I could script it but I don't know where to start. The process is: Got to appropriate page on the wiki for each team member (DeveloperA, DeveloperB, DeveloperC) { for each of two files ('*...
[ "Check if the wiki you mean to talk to supports XMLRPC, because if it does it should be a snap. I wrote a tool called WikiUp to solve a similar problem (updating a delineated section on a wiki page). \n", "If you're writing in C#, the WebClient classes might be a good place to start. I bet people could give more...
[ 2, 1, 1 ]
[]
[]
[ "automation", "scripting", "webautomation" ]
stackoverflow_0000012428_automation_scripting_webautomation.txt
Q: Creating Visual Studio templates under the "Windows" category. I have created a template for Visual Studio 2008 and it currently shows up under File->New Project->Visual C#. However, it is only really specific to Visual C#/Windows but I can't work out how to get it to show up under the "Windows" category and not t...
Creating Visual Studio templates under the "Windows" category.
I have created a template for Visual Studio 2008 and it currently shows up under File->New Project->Visual C#. However, it is only really specific to Visual C#/Windows but I can't work out how to get it to show up under the "Windows" category and not the more general "Visual C#".
[ "Check out MSDN \"How to: Locate and Organize Project and Item Templates\"\nCreate a folder within one of these\n<VisualStudioInstallDir>\\Common7\\IDE\\ItemTemplates\\CSharp\\\nMy Documents\\Visual Studio 2008\\Templates\\ProjectTemplates\\CSharp\\\n\n", "Categorization of templates depends on settings (for exam...
[ 5, 0 ]
[]
[]
[ "templates", "visual_studio" ]
stackoverflow_0000012271_templates_visual_studio.txt
Q: Alternative Hostname for an IIS web site for internal access only I'm using IIS in Windows 2003 Server for a SharePoint intranet. External incoming requests will be using the host header portal.mycompany.com and be forced to use SSL. I was wondering if there's a way to set up an alternate host header such as http:...
Alternative Hostname for an IIS web site for internal access only
I'm using IIS in Windows 2003 Server for a SharePoint intranet. External incoming requests will be using the host header portal.mycompany.com and be forced to use SSL. I was wondering if there's a way to set up an alternate host header such as http://internalportal/ which only accepts requests from the internal network...
[ "Daniel, keep in mind that just because something is possbile in IIS, and via any number of off box solutions (like hardware load balancers and SSL) doesn't mean that it is supported by SharePoint, or that it is implemented in the same way.\nYou can do what you are asking for, however you should do it via SharePoin...
[ 3, 1, 1 ]
[]
[]
[ "iis", "moss", "sharepoint", "wss" ]
stackoverflow_0000005494_iis_moss_sharepoint_wss.txt
Q: How do you convert the number you get from datepart to the name of the day? Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number? select datepart(dw, getdate()); This will return 1-7, with Sunday being 1. I would like 'Sunday' instead of 1. A: se...
How do you convert the number you get from datepart to the name of the day?
Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number? select datepart(dw, getdate()); This will return 1-7, with Sunday being 1. I would like 'Sunday' instead of 1.
[ "select datename(weekday, getdate());\n\n", "It actually took me more searching than I thought it would to find this answer. It's funny how you can use a technology for ages and never know about simple functions like this.\nselect datename(dw, getdate())\n\nI'm not sure how localization would work with this fun...
[ 12, 1, 0, 0 ]
[]
[]
[ "datepart", "sql_server" ]
stackoverflow_0000012533_datepart_sql_server.txt
Q: Why do Sql Server 2005 maintenance plans use the wrong database for dbcc checkdb? This is a problem I have seen other people besides myself having, and I haven't found a good explanation. Let's say you have a maintenance plan with a task to check the database, something like this: USE [MyDb] GO DBCC CHECKDB with n...
Why do Sql Server 2005 maintenance plans use the wrong database for dbcc checkdb?
This is a problem I have seen other people besides myself having, and I haven't found a good explanation. Let's say you have a maintenance plan with a task to check the database, something like this: USE [MyDb] GO DBCC CHECKDB with no_infomsgs, all_errormsgs If you go look in your logs after the task executes, you mig...
[ "For starters, always remember that GO is not a SQL keyword; it is merely a batch separator that is (generally) implemented/recognized by the client, not the server. So, depending on context and client, there really is no guarantee that the current database is preserved between batches.\n", "If you are using a ma...
[ 1, 1, 0 ]
[]
[]
[ "sql_server", "sql_server_2005" ]
stackoverflow_0000012304_sql_server_sql_server_2005.txt
Q: Tools for automating mouse and keyboard events sent to a windows application What tools are useful for automating clicking through a windows form application? Is this even useful? I see the testers at my company doing this a great deal and it seems like a waste of time. A: Check out https://github.com/TestStack/...
Tools for automating mouse and keyboard events sent to a windows application
What tools are useful for automating clicking through a windows form application? Is this even useful? I see the testers at my company doing this a great deal and it seems like a waste of time.
[ "Check out https://github.com/TestStack/White and http://nunitforms.sourceforge.net/. We've used the White project with success.\n", "Though they're mostly targeted at automating administration tasks or shortcuts for users, Autohotkey and AutoIT let you automate nearly anything you want as far as mouse/keyboard i...
[ 7, 7, 1, 0, 0 ]
[]
[]
[ "automation", "testing" ]
stackoverflow_0000012523_automation_testing.txt
Q: Access Control Lists & Access Control Objects, good tutorial? we're developing a web app to cover all aspects of a printing company from finances, to payroll, to job costing. Its important to be able to control who can access what parts of these applications. Don't want a line employee giving himself a raise, et...
Access Control Lists & Access Control Objects, good tutorial?
we're developing a web app to cover all aspects of a printing company from finances, to payroll, to job costing. Its important to be able to control who can access what parts of these applications. Don't want a line employee giving himself a raise, etc... I've heard of the concept of ACL & ACO, but haven't found a go...
[ "A brief rundown on ACLs, where they should be used and how they should be structured and implemented for various applications and user levels can be found here:\nLINK\n", "I've had to implement that type of security a couple of times. Unfortunately I don't know of any really good articles that provide examples....
[ 2, 1, 1 ]
[]
[]
[ "acl", "permissions" ]
stackoverflow_0000012612_acl_permissions.txt
Q: Add .NET 2.0 SP1 as a prerequisite for deployment project I have a .NET 2.0 application that has recently had contributions that are Service Pack 1 dependent. The deployment project has detected .NET 2.0 as a prerequisite, but NOT SP1. How do I include SP1 as a dependency/prerequisite in my deployment project? ...
Add .NET 2.0 SP1 as a prerequisite for deployment project
I have a .NET 2.0 application that has recently had contributions that are Service Pack 1 dependent. The deployment project has detected .NET 2.0 as a prerequisite, but NOT SP1. How do I include SP1 as a dependency/prerequisite in my deployment project?
[ "You'll want to setup launch condition in your deployment project to make sure version 2.0 SP1 is installed. You'll want to set a requirement based off the MsiNetAssemblySupport variable, tied to the version number of .NET 2.0 SP1 (2.0.50727.1433 and above according to this page.)\nBootstrapping the project to actu...
[ 3 ]
[]
[]
[ ".net_2.0", "dependencies", "installation" ]
stackoverflow_0000012720_.net_2.0_dependencies_installation.txt
Q: Setting up Subversion on Windows as a service When installing subversion as a service, I used this command: c:\>svnservice -install --daemon --root "c:\documents and settings\my_repository" And then I got this error: Could not create service in service control manager. After looking at some MSDN docs on the serv...
Setting up Subversion on Windows as a service
When installing subversion as a service, I used this command: c:\>svnservice -install --daemon --root "c:\documents and settings\my_repository" And then I got this error: Could not create service in service control manager. After looking at some MSDN docs on the service control manager, I tried granting full control ...
[ "VisualSVN Server installs as a Windows service. It is free, includes Apache, OpenSSL, and a repository / permission management tool. It can also integrate with Active Directory for user authentication. I highly recommend it for hosting SVN on Windows.\n", "I've followed the instructions given at the Collabnet si...
[ 6, 1, 1, 0, 0, 0, 0 ]
[]
[]
[ "svn", "version_control" ]
stackoverflow_0000012718_svn_version_control.txt
Q: Unit testing a timer based application? I am currently writing a simple, timer based mini app in C# that performs an action n times every k seconds. I am trying to adopt a test driven development style, so my goal is to unit test all parts of the app. So, my question is: Is there a good way to unit test a timer ba...
Unit testing a timer based application?
I am currently writing a simple, timer based mini app in C# that performs an action n times every k seconds. I am trying to adopt a test driven development style, so my goal is to unit test all parts of the app. So, my question is: Is there a good way to unit test a timer based class? The problem, as I see it, is that ...
[ "What I have done is to mock the timer, and also the current system time, that my events could be triggered immediately, but as far as the code under test was concerned time elapsed was seconds.\n", "Len Holgate has a series of 20 articles on testing timer based code.\n", "I think what I would do in this case i...
[ 11, 11, 4, 2 ]
[]
[]
[ ".net", "c#", "timer", "unit_testing" ]
stackoverflow_0000012045_.net_c#_timer_unit_testing.txt
Q: How is the HTML on this site so clean? I work with C# at work but dislike how with webforms it spews out a lot of JavaScript not including the many lines for viewstate that it creates. That's why I like coding with PHP as I have full control. But I was just wondering how this sites HTML is so clean and elegant? Do...
How is the HTML on this site so clean?
I work with C# at work but dislike how with webforms it spews out a lot of JavaScript not including the many lines for viewstate that it creates. That's why I like coding with PHP as I have full control. But I was just wondering how this sites HTML is so clean and elegant? Does using MVC have something to do with it? I...
[ "One of the goals of ASP.NET MVC is to give you control of your markup. However, there have always been choices with ASP.NET which would allow you to generate relatively clean HTML.\nFor instance, ASP.NET has always offered a choice with validator controls. Do you value development speed over markup? Use validators...
[ 9, 3, 3, 2 ]
[]
[]
[ "html", "semantic_markup" ]
stackoverflow_0000012768_html_semantic_markup.txt
Q: Upload binary data with Silverlight 2b2 I am trying to upload a file or stream of data to our web server and I cant find a decent way of doing this. I have tried both WebClient and WebRequest both have their problems. WebClient Nice and easy but you do not get any notification that the asynchronous upload has co...
Upload binary data with Silverlight 2b2
I am trying to upload a file or stream of data to our web server and I cant find a decent way of doing this. I have tried both WebClient and WebRequest both have their problems. WebClient Nice and easy but you do not get any notification that the asynchronous upload has completed, and the UploadProgressChanged event ...
[ "The way i get around it is through INotifyPropertyChanged and event notification.\nThe essentials:\n public void DoIt(){\nthis.IsUploading = True; \n\n WebRequest postRequest = WebRequest.Create(new Uri(ServiceURL));\n\n postRequest.BeginGetRequestStream(new AsyncCallback(RequestOpened), postReque...
[ 1, 0, 0, 0 ]
[]
[]
[ ".net", "silverlight" ]
stackoverflow_0000012642_.net_silverlight.txt
Q: Best way to custom edit records in ASP.NET? I'm coming from a Rails background and doing some work on a ASP.NET project (not ASP MVC). Newbie question: what's the easiest way to make a custom editor for a table of records? For example: I have a bunch of data rows and want to change the "category" field on each -- ...
Best way to custom edit records in ASP.NET?
I'm coming from a Rails background and doing some work on a ASP.NET project (not ASP MVC). Newbie question: what's the easiest way to make a custom editor for a table of records? For example: I have a bunch of data rows and want to change the "category" field on each -- maybe a dropdown, maybe a link, maybe the user ty...
[ "You can REALLY cheat nowadays and take a peek at the new Dynamic Data that comes with .NET 3.5 SP1. Scott Guthrie has a blog entry demoing on how quick and easy it'll flow for you here:\nhttp://weblogs.asp.net/scottgu/archive/2007/12/14/new-asp-net-dynamic-data-support.aspx\nWithout getting THAT cutting edge, I'd ...
[ 2, 0, 0 ]
[]
[]
[ "asp.net" ]
stackoverflow_0000012706_asp.net.txt
Q: Is a Homogeneous development platform good for the industry? Is it in best interests of the software development industry for one framework, browser or language to win the war and become the de facto standard? On one side it takes away the challenges of cross platform, but it opens it up for a single point of fai...
Is a Homogeneous development platform good for the industry?
Is it in best interests of the software development industry for one framework, browser or language to win the war and become the de facto standard? On one side it takes away the challenges of cross platform, but it opens it up for a single point of failure. Would it also result in a stagnation of innovation, or woul...
[ "Defacto standards are bad because they are usually controlled by a single party. What is best for the industry is for there to be a foundation of open standards on top of which everyone can compete. \nThe web is a perfect example. When IE won the browser war, it stagnated for years, and is only just now starting t...
[ 11, 2, 0, 0 ]
[]
[]
[ "cross_platform" ]
stackoverflow_0000012929_cross_platform.txt
Q: Windows/C++: How do I determine the share name associated with a shared drive? Let's say I have a drive such as C:\, and I want to find out if it's shared and what it's share name (e.g. C$) is. To find out if it's shared, I can use NetShareCheck. How do I then map the drive to its share name? I thought that NetSha...
Windows/C++: How do I determine the share name associated with a shared drive?
Let's say I have a drive such as C:\, and I want to find out if it's shared and what it's share name (e.g. C$) is. To find out if it's shared, I can use NetShareCheck. How do I then map the drive to its share name? I thought that NetShareGetInfo would do it, but it looks like that takes the share name, not the local dr...
[ "If all else fails, you could always use NetShareEnum and call NetShareGetInfo on each.\n", "I believe you're looking for WNetGetConnectionA or WNetGetConnectionW.\n", "Use;\nSHGetFileInfo with SHGFI_ATTRIBUTES\n\nupon return check the dwAttributes flag for SFGAO_SHARE.\nI'm not sure how to find the actual path...
[ 3, 1, 0 ]
[]
[]
[ "c++", "networking", "share", "windows" ]
stackoverflow_0000012594_c++_networking_share_windows.txt
Q: C# Database Access: DBNull vs null We have our own ORM we use here, and provide strongly typed wrappers for all of our db tables. We also allow weakly typed ad-hoc SQL to be executed, but these queries still go through the same class for getting values out of a data reader. In tweaking that class to work with Orac...
C# Database Access: DBNull vs null
We have our own ORM we use here, and provide strongly typed wrappers for all of our db tables. We also allow weakly typed ad-hoc SQL to be executed, but these queries still go through the same class for getting values out of a data reader. In tweaking that class to work with Oracle, we've come across an interesting que...
[ "I find it better to use null, instead of DB null.\nThe reason is because, as you said, you're separating yourself from the DB world.\nIt is generally good practice to check reference types to ensure they aren't null anyway. You're going to be checking for null for things other than DB data, and I find it is best t...
[ 15, 7, 3, 1 ]
[]
[]
[ "c#", "dbnull", "null", "orm" ]
stackoverflow_0000012836_c#_dbnull_null_orm.txt
Q: Best way to capture key events in NSTextView? I'm slowly learning Objective-C and Cocoa, and the only way I see so far to capture key events in Text Views is to use delegation, but I'm having trouble finding useful documentation and examples on how to implement such a solution. Can anyone point me in the right dir...
Best way to capture key events in NSTextView?
I'm slowly learning Objective-C and Cocoa, and the only way I see so far to capture key events in Text Views is to use delegation, but I'm having trouble finding useful documentation and examples on how to implement such a solution. Can anyone point me in the right direction or supply some first-hand help?
[ "Generally, the way you implement it is simply to add the required function to your view's controller, and set its delegate. For example, if you want code to run when the view loads, you just delegate your view to the controller, and implement the awakeFromNib function.\nSo, to detect a key press in a text view, ma...
[ 14, 10, 2, 1 ]
[]
[]
[ "cocoa", "events", "objective_c" ]
stackoverflow_0000011291_cocoa_events_objective_c.txt
Q: How do I convert a date to a HTTP-formatted date in .Net / C# How does one convert a .Net DateTime into a valid HTTP-formatted date string? A: Dates can be converted to HTTP valid dates (RFC 1123) by using the "r" format string in .Net. HTTP dates need to be GMT / not offset - this can be done using the ToUniver...
How do I convert a date to a HTTP-formatted date in .Net / C#
How does one convert a .Net DateTime into a valid HTTP-formatted date string?
[ "Dates can be converted to HTTP valid dates (RFC 1123) by using the \"r\" format string in .Net. HTTP dates need to be GMT / not offset - this can be done using the ToUniversalTime() method.\nSo, in C# for example:\nstring HttpDate = SomeDate.ToUniversalTime().ToString(\"r\");\n\nRight now, that produces HttpDate =...
[ 90 ]
[]
[]
[ ".net", "c#", "http" ]
stackoverflow_0000013087_.net_c#_http.txt
Q: What do ref, val and out mean on method parameters? I'm looking for a clear, concise and accurate answer. Ideally as the actual answer, although links to good explanations welcome. This also applies to VB.Net, but the keywords are different - ByRef and ByVal. A: By default (in C#), passing an object to a funct...
What do ref, val and out mean on method parameters?
I'm looking for a clear, concise and accurate answer. Ideally as the actual answer, although links to good explanations welcome. This also applies to VB.Net, but the keywords are different - ByRef and ByVal.
[ "By default (in C#), passing an object to a function actually passes a copy of the reference to that object. Changing the parameter itself only changes the value in the parameter, and not the variable that was specified.\nvoid Test1(string param)\n{\n param = \"new value\";\n}\n\nstring s1 = \"initial value\";\n...
[ 27, 8, 3, 2 ]
[]
[]
[ ".net", "c#", "vb.net" ]
stackoverflow_0000013060_.net_c#_vb.net.txt
Q: Does the OutputCacheFilter in the Microsoft MVC Preview 4 actually save on action invocations? We deployed a live, fresh, swanky site using preview 3 including rigorous stress testing. Page Output caching was our saviour and afforded us the ability to meet our performance contractual requirements. My question is,...
Does the OutputCacheFilter in the Microsoft MVC Preview 4 actually save on action invocations?
We deployed a live, fresh, swanky site using preview 3 including rigorous stress testing. Page Output caching was our saviour and afforded us the ability to meet our performance contractual requirements. My question is, is there a difference between action OutputCacheFilter and page output caching? Is the action outpu...
[ "Internally, the OutputCacheAttribute (aka output cache filter) uses the same internal mechanism as page output caching (aka the @OutputCache directive).\nTherefore, it's not any faster than page output caching. However, with MVC, you really can't use page output caching via the @OutputCache directive in MVC becaus...
[ 3, 1 ]
[]
[]
[ "asp.net", "asp.net_mvc", "c#", "outputcache" ]
stackoverflow_0000010661_asp.net_asp.net_mvc_c#_outputcache.txt
Q: Best practice for webservices I've created a webservice and when I want to use its methods I instantiate it in the a procedure, call the method, and I finally I dispose it, however I think also it could be okay to instantiate the webservice in the "private void Main_Load(object sender, EventArgs e)" event. The thi...
Best practice for webservices
I've created a webservice and when I want to use its methods I instantiate it in the a procedure, call the method, and I finally I dispose it, however I think also it could be okay to instantiate the webservice in the "private void Main_Load(object sender, EventArgs e)" event. The thing is that if I do it the first way...
[ "It depends on how often you are going to be calling the web service. If you're going to be calling it almost constantly, it would probably be better to use method #2. However, if it's not going to be getting called quite so often, you are better off using method #1, and only instantiating it when you need it.\n"...
[ 2, 0 ]
[]
[]
[ "web_services" ]
stackoverflow_0000013160_web_services.txt
Q: Upgrade to ASP.NET 3.x I am currently aware that ASP.NET 2.0 is out and about and that there are 3.x versions of the .Net Framework. Is it possible to upgrade my ASP.NET web server to version 3.x of the .Net Framework? I have tried this, however, when selecting which version of the .Net framwork to use in IIS (th...
Upgrade to ASP.NET 3.x
I am currently aware that ASP.NET 2.0 is out and about and that there are 3.x versions of the .Net Framework. Is it possible to upgrade my ASP.NET web server to version 3.x of the .Net Framework? I have tried this, however, when selecting which version of the .Net framwork to use in IIS (the ASP.NET Tab), only version...
[ "\nif I install 3.5 and have IIS setup to use 2.0. I will be able to use 3.5 features?\n\nYes, that is correct. You have IIS set to 2.0 for both 2.0 and 3.5 sites, as they both run on the same CLR. 3.5 uses a different compile method than 2.0. This is declared in the web.config for the site. See this post for more ...
[ 5, 2, 1, 1, 0, 0 ]
[]
[]
[ ".net_3.5", "asp.net" ]
stackoverflow_0000004627_.net_3.5_asp.net.txt
Q: A ThreadStateException occures when trying to restart a thread From time to time I get a System.Threading.ThreadStateException when attempting to restart a thread. The code in question is as follows: // Make sure the thread is done stopping while (this.mThread.ThreadState == ThreadState.Running) { Thread.Slee...
A ThreadStateException occures when trying to restart a thread
From time to time I get a System.Threading.ThreadStateException when attempting to restart a thread. The code in question is as follows: // Make sure the thread is done stopping while (this.mThread.ThreadState == ThreadState.Running) { Thread.Sleep(0); } // Respawn a thread if the current one is stopped or doesn't...
[ "It's possible for a thread to be in more than one state at once therefore the ThreadState property is actually a bitmap of possible states. So testing for equality with just one state will not give you the right result. You would need to do something like:\nif((mThread.ThreadState & ThreadState.Running) != 0)\n\nH...
[ 6, 3, 1 ]
[]
[]
[ ".net", "c#", "exception", "multithreading" ]
stackoverflow_0000013170_.net_c#_exception_multithreading.txt
Q: How to trace COM objects exceptions? I have a DLL with some COM objects. Sometimes, this objects crashes and register an error event in the Windows Event Log with lots of hexadecimal informations. I have no clue why this crashes happens. So, How can I trace those COM objects exceptions? A: The first step is to ...
How to trace COM objects exceptions?
I have a DLL with some COM objects. Sometimes, this objects crashes and register an error event in the Windows Event Log with lots of hexadecimal informations. I have no clue why this crashes happens. So, How can I trace those COM objects exceptions?
[ "The first step is to lookup the Fail code's hex value (E.G. E_FAIL 0x80004005). I've had really good luck with posting that value in Google to get a sense of what the error code means. \nThen, I just use trial and error to try to isolate the location in code that's failing, and the root cause of the failure. \n...
[ 2, 1, 1, 1 ]
[]
[]
[ "com", "dll", "exception", "trace" ]
stackoverflow_0000010935_com_dll_exception_trace.txt
Q: How do I integrate my continuous integration system with my bug tracking system? I use cruisecontrol.rb for CI and FogBugz for bug tracking, but the more general the answers, the better. First is the technical problem: is there an API for FogBugz? Are there good tutorials, or better yet, pre-written code? Second ...
How do I integrate my continuous integration system with my bug tracking system?
I use cruisecontrol.rb for CI and FogBugz for bug tracking, but the more general the answers, the better. First is the technical problem: is there an API for FogBugz? Are there good tutorials, or better yet, pre-written code? Second is the procedural problem: what, exactly, should the CI put in the bug tracker when th...
[ "At my company we've recently adopted the (commercial) Atlassian stack - including JIRA for issue tracking and Bamboo for builds. Much like the Microsoft world (I'm guessing - we're a Java shop), if you get all your products from a single vendor you get the bonus of tight integration.\nFor an example of how they've...
[ 4, 3, 0 ]
[]
[]
[ "bug_tracking", "continuous_integration", "cruisecontrol.rb", "fogbugz" ]
stackoverflow_0000013200_bug_tracking_continuous_integration_cruisecontrol.rb_fogbugz.txt
Q: How to render a control to look like ComboBox with Visual Styles enabled? I have a control that is modelled on a ComboBox. I want to render the control so that the control border looks like that of a standard Windows ComboBox. Specifically, I have followed the MSDN documentation and all the rendering of the contro...
How to render a control to look like ComboBox with Visual Styles enabled?
I have a control that is modelled on a ComboBox. I want to render the control so that the control border looks like that of a standard Windows ComboBox. Specifically, I have followed the MSDN documentation and all the rendering of the control is correct except for rendering when the control is disabled. Just to be clea...
[ "I'm not 100% sure if this is what you are looking for but you should check out the VisualStyleRenderer in the System.Windows.Forms.VisualStyles-namespace.\n\nVisualStyleRenderer class (MSDN)\nHow to: Render a Visual Style Element (MSDN)\nVisualStyleElement.ComboBox.DropDownButton.Disabled (MSDN)\n\nSince VisualSty...
[ 11, 1 ]
[]
[]
[ ".net", "c#", "winforms" ]
stackoverflow_0000002874_.net_c#_winforms.txt
Q: How can I refactor HTML markup out of my property files? I've recently inherited a internationalized and text-heavy Struts 1.1 web application. Many of the JSP files look like: <p> <bean:message key="alert" /> </p> and the properties files look like: messages.properties alert=Please update your <a href="/addr...
How can I refactor HTML markup out of my property files?
I've recently inherited a internationalized and text-heavy Struts 1.1 web application. Many of the JSP files look like: <p> <bean:message key="alert" /> </p> and the properties files look like: messages.properties alert=Please update your <a href="/address.do">address</a> and <a href="/contact.do">contact informat...
[ "\nAvoid creating links within long\n blocks of text. Prefer shorter text\n that can act as a logically complete\n and independent link.\n\nGenerally, it will lead to fewer problems. Sometimes you have to compromise your UI design to accommodate localization; sometimes you need to compromise your localization pr...
[ 2, 1, 0, 0 ]
[]
[]
[ "internationalization", "java", "jsp", "struts" ]
stackoverflow_0000013225_internationalization_java_jsp_struts.txt
Q: Is there any wiki engine that supports page creation by email? I want to consolidate all the loose information of the company I work for into a knowledge base. A wiki seems to be the way to go, but most of the relevant information is buried inside PST files, and it would take ages to convince people to manually tr...
Is there any wiki engine that supports page creation by email?
I want to consolidate all the loose information of the company I work for into a knowledge base. A wiki seems to be the way to go, but most of the relevant information is buried inside PST files, and it would take ages to convince people to manually translate their emails one by one (including attachments) into wiki pa...
[ "Both Jotspot and MediaWiki allow you to do this. The latter has support for a lot of plugins, of which this is one. The format is essentially PageTitle@something. Jotspot is a hosted solution where you get your own email address, MediaWiki is self-hosted and you give it a mailbox to monitor for incoming.\nArticles...
[ 3, 0 ]
[]
[]
[ "email", "mime", "wiki", "wiki_engine" ]
stackoverflow_0000011612_email_mime_wiki_wiki_engine.txt
Q: What are the advantages of using a single database for EACH client? In a database-centric application that is designed for multiple clients, I've always thought it was "better" to use a single database for ALL clients - associating records with proper indexes and keys. In listening to the Stack Overflow podcast, ...
What are the advantages of using a single database for EACH client?
In a database-centric application that is designed for multiple clients, I've always thought it was "better" to use a single database for ALL clients - associating records with proper indexes and keys. In listening to the Stack Overflow podcast, I heard Joel mention that FogBugz uses one database per client (so if the...
[ "Assume there's no scaling penalty for storing all the clients in one database; for most people, and well configured databases/queries, this will be fairly true these days. If you're not one of these people, well, then the benefit of a single database is obvious.\nIn this situation, benefits come from the encapsula...
[ 51, 16, 12, 10, 10, 6, 3, 0 ]
[]
[]
[ "database", "database_design", "multi_tenant" ]
stackoverflow_0000013348_database_database_design_multi_tenant.txt
Q: Should I support ASP.NET 1.1? I've just started working on an ASP.NET project which I hope to open source once it gets to a suitable stage. It's basically going to be a library that can be used by existing websites. My preference is to support ASP.NET 2.0 through 3.5, but I wondered how many people I would be leav...
Should I support ASP.NET 1.1?
I've just started working on an ASP.NET project which I hope to open source once it gets to a suitable stage. It's basically going to be a library that can be used by existing websites. My preference is to support ASP.NET 2.0 through 3.5, but I wondered how many people I would be leaving out by not supporting ASP.NET 1...
[ "Increasingly I think not.\nThe kind of large rigid organisation currently still clinging to 1.1 (probably because they're only just upgraded to it) is also the kind that's highly unlikely to look at open source solutions.\nIf I were starting a new ASP.Net project right now I'd stick with .Net 3.5 and probably the ...
[ 4, 2, 1 ]
[]
[]
[ ".net_1.1", "asp.net" ]
stackoverflow_0000013106_.net_1.1_asp.net.txt
Q: The theory (and terminology) behind Source Control I've tried using source control for a couple projects but still don't really understand it. For these projects, we've used TortoiseSVN and have only had one line of revisions. (No trunk, branch, or any of that.) If there is a recommended way to set up source co...
The theory (and terminology) behind Source Control
I've tried using source control for a couple projects but still don't really understand it. For these projects, we've used TortoiseSVN and have only had one line of revisions. (No trunk, branch, or any of that.) If there is a recommended way to set up source control systems, what are they? What are the reasons and ...
[ "Think of source control as a giant \"Undo\" button for your source code. Every time you check in, you're adding a point to which you can roll back. Even if you don't use branching/merging, this feature alone can be very valuable.\nAdditionally, by having one 'authoritative' version of the source control, it become...
[ 8, 6, 3, 1, 1 ]
[]
[]
[ "version_control" ]
stackoverflow_0000013460_version_control.txt
Q: Purpose of {1} in this regular expression to match url protocols I was reading this question about how to parse URLs out of web pages and had a question about the accepted answer which offered this solution: ((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+) The solution was offered by csmba and he credited it to regexli...
Purpose of {1} in this regular expression to match url protocols
I was reading this question about how to parse URLs out of web pages and had a question about the accepted answer which offered this solution: ((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+) The solution was offered by csmba and he credited it to regexlib.com. Whew. Credits done. I think this is a fairly naive regular expr...
[ "@Rob: I disagree. To enforce what you are asking for I think you would need to use negative-look-behind, which is possible but is certainly not related to use {1}. Neither version of the regexp address that particular issue.\nTo let the code speak:\ntibook 0 /home/jj33/swap > cat text\nText this is http://exampl...
[ 3, 2, 1, 1 ]
[]
[]
[ "regex" ]
stackoverflow_0000013470_regex.txt
Q: When to use an extension method with lambda over LINQtoObjects to filter a collection? I am prototyping some C# 3 collection filters and came across this. I have a collection of products: public class MyProduct { public string Name { get; set; } public Double Price { get; set; } public string Descripti...
When to use an extension method with lambda over LINQtoObjects to filter a collection?
I am prototyping some C# 3 collection filters and came across this. I have a collection of products: public class MyProduct { public string Name { get; set; } public Double Price { get; set; } public string Description { get; set; } } var MyProducts = new List<MyProduct> { new MyProduct ...
[ "LINQ turns into method calls like the code you have.\nIn other words, there should be no difference.\nHowever, in your two pieces of code you are not calling .ToList in the first, so the first piece of code will produce an enumerable data source, but if you call .ToList on it, the two should be the same.\n", "As...
[ 6, 4, 0, 0 ]
[]
[]
[ ".net_3.5", "c#", "lambda", "linq" ]
stackoverflow_0000005194_.net_3.5_c#_lambda_linq.txt
Q: SQL query, count and group by If I have data like this: Key Name 1 Dan 2 Tom 3 Jon 4 Tom 5 Sam 6 Dan What is the SQL query to bring back the records where Name is repeated 2 or more times? So the result I would want is Tom Dan A: Couldn't be simpler... Select Name, Count(Name) As Count From Table ...
SQL query, count and group by
If I have data like this: Key Name 1 Dan 2 Tom 3 Jon 4 Tom 5 Sam 6 Dan What is the SQL query to bring back the records where Name is repeated 2 or more times? So the result I would want is Tom Dan
[ "Couldn't be simpler...\nSelect Name, Count(Name) As Count \n From Table\n Group By Name\n Having Count(Name) > 1\n Order By Count(Name) Desc\n\nThis could also be extended to delete duplicates:\nDelete From Table\nWhere Key In (\n Select Max(Key)\n From Table\n Group By Name\n H...
[ 40, 4, 2 ]
[]
[]
[ "sql" ]
stackoverflow_0000003196_sql.txt
Q: GridView delete not working I'm using a GridView in C#.NET 3.5 and have just converted the underlying DataSource from Adapter model to an object which gets its data from LINQ to SQL - i.e. a Business object that returns a List<> for the GetData() function etc. All was well in Denmark and the Update, and conditiona...
GridView delete not working
I'm using a GridView in C#.NET 3.5 and have just converted the underlying DataSource from Adapter model to an object which gets its data from LINQ to SQL - i.e. a Business object that returns a List<> for the GetData() function etc. All was well in Denmark and the Update, and conditional Select statements work as expec...
[ "I found the solution. I had to set the GridView's DataKeyNames property to the unique key that my data was returning (in this case a classically named ID field). I'm guessing that this property \"unset\" itself when the Grid refreshed.\n" ]
[ 6 ]
[]
[]
[ "asp.net", "c#", "gridview" ]
stackoverflow_0000013524_asp.net_c#_gridview.txt
Q: Browser Sync across many machines Everyone remembers google browser sync right? I thought it was great. Unfortunately Google decided not to upgrade the service to Firefox 3.0. Mozilla is developing a replacement for google browser sync which will be a part of the Weave project. I have tried using Weave and found i...
Browser Sync across many machines
Everyone remembers google browser sync right? I thought it was great. Unfortunately Google decided not to upgrade the service to Firefox 3.0. Mozilla is developing a replacement for google browser sync which will be a part of the Weave project. I have tried using Weave and found it to be very very slow or totally inope...
[ "Mozilla Weave is capable of running on personal servers. It uses WebDAV to communicate with HTTP servers and can be configured to connect to private servers. I've tried setting it up on my own servers but with no success (Mainly because I'm not very good at working with Apache to configure WebDAV)\nI'm hoping Mozi...
[ 7, 1, 0, 0 ]
[]
[]
[ "browser", "firefox", "synchronization" ]
stackoverflow_0000013518_browser_firefox_synchronization.txt
Q: user controls and asp.net mvc Here is one trivial question, that I am not sure how to handle. I need to display list of categories on every page, and to be able to choose items from a specific category to be displayed. I use asp.net MVC, and have chosen to create a user control that will display categories. My que...
user controls and asp.net mvc
Here is one trivial question, that I am not sure how to handle. I need to display list of categories on every page, and to be able to choose items from a specific category to be displayed. I use asp.net MVC, and have chosen to create a user control that will display categories. My question is: what is the best approach...
[ "I'm using mvc components, which replaced ascx user controls in preview 4.\nExample:\nhttp://blog.wekeroad.com/blog/asp-net-mvc-preview-4-componentcontroller-is-now-renderaction/\nSo, you call components action from View, which then choose View to render. You can pass data in this call also. \n", "it is the mvc f...
[ 2, 1 ]
[]
[]
[ "asp.net", "asp.net_mvc", "user_controls" ]
stackoverflow_0000013561_asp.net_asp.net_mvc_user_controls.txt
Q: Http Auth in a Firefox 3 bookmarklet I'm trying to create a bookmarklet for posting del.icio.us bookmarks to a separate account. I tested it from the command line like: wget -O - --no-check-certificate \ "https://seconduser:thepassword@api.del.icio.us/v1/posts/add?url=http://seet.dk&description=test" This works g...
Http Auth in a Firefox 3 bookmarklet
I'm trying to create a bookmarklet for posting del.icio.us bookmarks to a separate account. I tested it from the command line like: wget -O - --no-check-certificate \ "https://seconduser:thepassword@api.del.icio.us/v1/posts/add?url=http://seet.dk&description=test" This works great. I then wanted to create a bookmarkle...
[ "Can you sniff the traffic to find what's actually being sent? Is it sending any auth data at all and it's incorrect or being presented in a form the server doesn't like, or is it never being sent by firefox at all?\n", "@travis Looks very nice! I will sure take a look into it. I can think of several places I ca...
[ 4, 2, 1, 1 ]
[]
[]
[ "delicious_api", "firefox", "javascript" ]
stackoverflow_0000004544_delicious_api_firefox_javascript.txt
Q: Has anybody used Google Performance Tools? Looking for feedback on : http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools A: There's a pretty good post that I read a while back that outlines some testing and analysis of GPT in a variety of scenarios A: I use GPT at work since 2007, and I total...
Has anybody used Google Performance Tools?
Looking for feedback on : http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools
[ "There's a pretty good post that I read a while back that outlines some testing and analysis of GPT in a variety of scenarios\n", "I use GPT at work since 2007, and I totally satisfied. I use it to monitor and optimize a Linux network library, and I have obtained a significant results.\nThe main flaw of GPT is th...
[ 4, 2 ]
[]
[]
[ "google_perftools", "malloc", "multithreading", "performance" ]
stackoverflow_0000006957_google_perftools_malloc_multithreading_performance.txt
Q: Programatic access to call stack in .net How can I get programmatic access to the call stack? A: Try System.Diagnostics.StackTrace. A: You can use the StackTrace and StrackFrame classes in System.Diagnostics. A: The right way is to use the StackTrace and StackFrame classes. Throwing an exception just to get ...
Programatic access to call stack in .net
How can I get programmatic access to the call stack?
[ "Try System.Diagnostics.StackTrace.\n", "You can use the StackTrace and StrackFrame classes in System.Diagnostics.\n", "The right way is to use the StackTrace and StackFrame classes. Throwing an exception just to get the stack trace is completely misusing exceptions.\n" ]
[ 22, 5, 0 ]
[]
[]
[ ".net", "callstack", "reflection" ]
stackoverflow_0000013434_.net_callstack_reflection.txt
Q: Asynchronous multi-direction server-client communication over the same open socket? I have a client-server app where the client is on a Windows Mobile 6 device, written in C++ and the server is on full Windows and written in C#. Originally, I only needed it to send messages from the client to the server, with the...
Asynchronous multi-direction server-client communication over the same open socket?
I have a client-server app where the client is on a Windows Mobile 6 device, written in C++ and the server is on full Windows and written in C#. Originally, I only needed it to send messages from the client to the server, with the server only ever sending back an acknowledgement that it received the message. Now, I w...
[ "When I needed to write an application with a client-server model where the clients could leave and enter whenever they want, (I assume that's also the case for your application as you use mobile devices) I made sure that the clients send an online message to the server, indicating they were connected and ready to ...
[ 9, 8, 4, 4 ]
[]
[]
[ "c#", "c++", "sockets" ]
stackoverflow_0000001241_c#_c++_sockets.txt
Q: Using unhandled exceptions instead of Contains()? Imagine an object you are working with has a collection of other objects associated with it, for example, the Controls collection on a WinForm. You want to check for a certain object in the collection, but the collection doesn't have a Contains() method. There ar...
Using unhandled exceptions instead of Contains()?
Imagine an object you are working with has a collection of other objects associated with it, for example, the Controls collection on a WinForm. You want to check for a certain object in the collection, but the collection doesn't have a Contains() method. There are several ways of dealing with this. Implement your ow...
[ "The general rule of thumb is to avoid using exceptions for control flow unless the circumstances that will trigger the exception are \"exceptional\" -- e.g., extremely rare!\nIf this is something that will happen normally and regularly it definitely should not be handled as an exception.\nExceptions are very, very...
[ 4, 3, 0, 0, 0, 0, 0 ]
[ "The latter is an acceptable solution. Although I would definitely catch on the specific exception (ElementNotFound?) that the collection throws in that case.\nSpeedwise, it depends on the common case. If you're more likely to find the element than not, the exception solution will be faster. If you're more likely t...
[ -2 ]
[ ".net", "c#", "error_handling" ]
stackoverflow_0000008348_.net_c#_error_handling.txt
Q: SVN merge merged extra stuff I just did a merge using something like: svn merge -r 67212:67213 https://my.svn.repository/trunk . I only had 2 files, one of which is a simple ChangeLog. Rather than just merging my ChangeLog changes, it actually pulled mine plus some previous ones that were not in the destination ...
SVN merge merged extra stuff
I just did a merge using something like: svn merge -r 67212:67213 https://my.svn.repository/trunk . I only had 2 files, one of which is a simple ChangeLog. Rather than just merging my ChangeLog changes, it actually pulled mine plus some previous ones that were not in the destination ChangeLog. I noticed there was a ...
[ "This only happens with conflicts - basically svn tried to merge the change in, but (roughly speaking) saw the change as:\nAdd\n2008-08-06 Mike Stone <myemail>\n\n* changed_file: Details.\n\nbefore\n2008-08-06 Someone Else <their_email>\n\nAnd it couldn't find the Someone Else line while doing the merge, so chu...
[ 2, 0 ]
[]
[]
[ "merge", "svn" ]
stackoverflow_0000004072_merge_svn.txt
Q: C# .NET listing contents of remote files Is it possible in .NET to list files on a remote location like an URL? Much in the same way the System.IO classes work. All I need is the URLs to images that are on a remote server. A: Short answer: No, unless you have more control over that web-server Long answer: Here a...
C# .NET listing contents of remote files
Is it possible in .NET to list files on a remote location like an URL? Much in the same way the System.IO classes work. All I need is the URLs to images that are on a remote server.
[ "Short answer: No, unless you have more control over that web-server\nLong answer: Here are possible solutions...\n\nYou will need server-side script that will do it locally and output this list in your preferred format.\nMost of the web-servers implement default file-browsing pages, so you could theoretically pars...
[ 3, 1 ]
[]
[]
[ ".net" ]
stackoverflow_0000013655_.net.txt
Q: Making code work with register_globals turned off I have inherited some legacy PHP code what was written back when it was standard practice to use register_globals (As of PHP 4.2.0, this directive defaults to off, released 22. Apr 2002). We know now that it is bad for security to have it enabled. The problem is ho...
Making code work with register_globals turned off
I have inherited some legacy PHP code what was written back when it was standard practice to use register_globals (As of PHP 4.2.0, this directive defaults to off, released 22. Apr 2002). We know now that it is bad for security to have it enabled. The problem is how do I find all the places in the code where I need to ...
[ "If you set error reporting to E_ALL, it warns in the error log about undefined variables complete with filename and line number (assuming you are logging to a file). However, it will warn only if when it comes across an undefined variable, so I think you will have to test each code path. Running php from the comma...
[ 6, 3, 2, 0 ]
[]
[]
[ "php", "register_globals" ]
stackoverflow_0000006633_php_register_globals.txt
Q: OpenID Attribute Exchange - should I use it? My website will be using only OpenID for authentication. I'd like to pull user details down via attribute exchange, but attribute exchange seems to have caused a lot of grief for StackOverflow. What is the current state of play in the industry? Does any OpenID provide...
OpenID Attribute Exchange - should I use it?
My website will be using only OpenID for authentication. I'd like to pull user details down via attribute exchange, but attribute exchange seems to have caused a lot of grief for StackOverflow. What is the current state of play in the industry? Does any OpenID provider do a decent job of attribute exchange? Should I ...
[ "Here on Stack Overflow, we're just using the Simple Registration extension for now, as there were some issues with Attribute Exchange (AX).\nThe biggest was OpenID Providers (OP) not agreeing on which attribute type urls to use. The finalized spec for AX says that attribute urls should come from http://www.axsche...
[ 17, 1 ]
[]
[]
[ "authentication", "openid" ]
stackoverflow_0000011903_authentication_openid.txt
Q: VisualSVN undelete with TortoiseSVN Using TortoiseSVN against VisualSVN I delete a source file that I should not have deleted. Now this isn't a train smash because I can get the file back from the daily backup. However I would like to undelete it from SVN (VisualSVN) so that I can get the history back. However I c...
VisualSVN undelete with TortoiseSVN
Using TortoiseSVN against VisualSVN I delete a source file that I should not have deleted. Now this isn't a train smash because I can get the file back from the daily backup. However I would like to undelete it from SVN (VisualSVN) so that I can get the history back. However I can't work out how to do that. Anybody kno...
[ "What you have to do is the following:\n\nRight click on the folder where you think it is.\nChoose Show Log under TortioseSVN\nFind the checkin that the file was deleted in\nGo down the list and find the file\nSelect Revert changes for this version to undelete.\n\n", "Did you only delete it locally, or did you co...
[ 12, 1 ]
[]
[]
[ "svn", "tortoisesvn", "visualsvn_server" ]
stackoverflow_0000013848_svn_tortoisesvn_visualsvn_server.txt
Q: How to keyboard down or up between dropdown "options"? I have a custom built ajax [div] based dynamic dropdown. I have an [input] box which; onkeyup, runs an Ajax search which returns results in divs and are drawn back in using innerHTML. These divs all have highlights onmouseover so, a typical successful search ...
How to keyboard down or up between dropdown "options"?
I have a custom built ajax [div] based dynamic dropdown. I have an [input] box which; onkeyup, runs an Ajax search which returns results in divs and are drawn back in using innerHTML. These divs all have highlights onmouseover so, a typical successful search yields the following structure (pardon the semi-code): [inpu...
[ "What you need to do is attach event listeners to the div with id=\"results\". You can do this by adding onkeyup, onkeydown, etc. attributes to the div when you create it or you can attach these using JavaScript.\nMy recommendation would be that you use an AJAX library like YUI, jQuery, Prototype, etc. for two reas...
[ 9, 1 ]
[]
[]
[ "dom", "events", "javascript", "keyboard" ]
stackoverflow_0000004884_dom_events_javascript_keyboard.txt
Q: Python Regular Expressions to implement string unescaping I am trying to implement string unescaping with Python regex and backreferences, and it doesn't seem to want to work very well. I'm sure it's something I'm doing wrong but I can't figure out what... >>> import re >>> mystring = r"This is \n a test \r" >>> p...
Python Regular Expressions to implement string unescaping
I am trying to implement string unescaping with Python regex and backreferences, and it doesn't seem to want to work very well. I'm sure it's something I'm doing wrong but I can't figure out what... >>> import re >>> mystring = r"This is \n a test \r" >>> p = re.compile( "\\\\(\\S)" ) >>> p.sub( "\\1", mystring ) 'This...
[ "Isn't that what Anders' second example does?\nIn 2.5 there's also a string-escape encoding you can apply:\n>>> mystring = r\"This is \\n a test \\r\"\n>>> mystring.decode('string-escape')\n'This is \\n a test \\r'\n>>> print mystring.decode('string-escape')\nThis is \n a test \n>>> \n\n", "Well, I think you migh...
[ 10, 3, 1, 0, 0 ]
[]
[]
[ "backreference", "python", "regex" ]
stackoverflow_0000013791_backreference_python_regex.txt
Q: quoting System.DirectoryServices.ResultPropertyCollection I'm missing something here: $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry $objSearcher.Filter = ("(objectclass=computer)") $computers = $objSearcher.fi...
quoting System.DirectoryServices.ResultPropertyCollection
I'm missing something here: $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry $objSearcher.Filter = ("(objectclass=computer)") $computers = $objSearcher.findall() So the question is why do the two following outputs ...
[ "When you included $_.properties.name in the string, it was returning the type name of the property. When a variable is included in a string and the string is evaluated, it calls the ToString method on that object referenced by the variable (not including the members specified after). \nIn this case, the ToString...
[ 1, 0, 0 ]
[]
[]
[ ".net", "active_directory", "powershell", "scripting" ]
stackoverflow_0000013753_.net_active_directory_powershell_scripting.txt
Q: How big would such a database be? I'm trying to figure out how big a certain database would be (it hasn't been created yet). I know how many rows and what the tables will be. Is there a feature in Oracle that will tell me the size of such a theoretical database? Is there a known math formula I can use? I know ther...
How big would such a database be?
I'm trying to figure out how big a certain database would be (it hasn't been created yet). I know how many rows and what the tables will be. Is there a feature in Oracle that will tell me the size of such a theoretical database? Is there a known math formula I can use? I know there is a feature to determine the size of...
[ "You might try prototyping your design - create an initial version of the database and write some scripts (or use a tool) to populate the tables with a reasonable amount of data. Then you will know for sure how much space X rows takes up. If it's too much, you can go back to the drawing board with your design. I...
[ 7, 5, 1, 1, 0 ]
[]
[]
[ "database", "oracle" ]
stackoverflow_0000011055_database_oracle.txt
Q: How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order? How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order? A: // Boost DFS example on an undirected graph. // Create a sample graph, traverse its nodes // in DFS order and print out th...
How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order?
How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order?
[ "// Boost DFS example on an undirected graph.\n// Create a sample graph, traverse its nodes\n// in DFS order and print out their values.\n\n#include <boost/graph/adjacency_list.hpp>\n#include <boost/graph/depth_first_search.hpp>\n#include <iostream>\nusing namespace std;\n\ntypedef boost::adjacency_list<boost::list...
[ 36 ]
[]
[]
[ "boost_graph", "c++" ]
stackoverflow_0000014126_boost_graph_c++.txt
Q: How would you go about evaluating a programmer? A few weeks ago, I was assigned to evaluate all our programmers. I'm very uncomfortable with this since I was the one who taught everyone the shop's programming language (they all got out of college not knowing the language and as luck would have it, I'm very profici...
How would you go about evaluating a programmer?
A few weeks ago, I was assigned to evaluate all our programmers. I'm very uncomfortable with this since I was the one who taught everyone the shop's programming language (they all got out of college not knowing the language and as luck would have it, I'm very proficient with it.). On the evaluation, I was very biased o...
[ "Gets things done is really all you need to evaluate a developer. After that you look at the quality that the developer generates. Do they write unit tests and believe in testing and being responsible for the code they generate? Do they take initiative to fix bugs without being assigned them? Are they passionat...
[ 11, 2, 0, 0 ]
[]
[]
[ "evaluation" ]
stackoverflow_0000014106_evaluation.txt
Q: IE7: header above menu I am having trouble with IE7. I have a header, which is an IMG. Under it I have a div that represents a menu, they have to be attached to each other without space in between. Both are 1000px width. In Opera and FireFox the header and the menu are neatly attached to each other. However, in IE...
IE7: header above menu
I am having trouble with IE7. I have a header, which is an IMG. Under it I have a div that represents a menu, they have to be attached to each other without space in between. Both are 1000px width. In Opera and FireFox the header and the menu are neatly attached to each other. However, in IE7, there is a small space be...
[ "Try the IE Developer Toolbar, which will let you inspect what is going on with the elements and give you outlines of the areas covered. It might give you a better understanding of the problem.\n", "The solution: \nimg {\npadding: 0px;\nmargin: 0px;\ndisplay: block;\n}\n\ndisplay: block\n", "I run into this a ...
[ 3, 0, 0, 0, 0, 0, 0 ]
[]
[]
[ "css", "html", "internet_explorer_7" ]
stackoverflow_0000013851_css_html_internet_explorer_7.txt
Q: How to learn ADO.NET I need to learn ADO.NET to build applications based on MS Office. I have read a good deal about ADO.NET in the MSDN Library, but everything seems rather messy to me. What are the basics one must figure out when using ADO.NET? I think a few key words will suffice to let me organize my learning....
How to learn ADO.NET
I need to learn ADO.NET to build applications based on MS Office. I have read a good deal about ADO.NET in the MSDN Library, but everything seems rather messy to me. What are the basics one must figure out when using ADO.NET? I think a few key words will suffice to let me organize my learning.
[ "There are three key components (assuming ur using SQL server):\n\nSQLConnection\nSqlCommand\nSqlDataReader\n\n(if you're using something else, replace Sql with \"Something\", like MySqlConnection, OracleCommand)\nEverything else is just built on top of that.\nExample 1:\nusing (SqlConnection connection = new SqlCo...
[ 6, 0 ]
[]
[]
[ "ado.net" ]
stackoverflow_0000004170_ado.net.txt
Q: Boost warnings with VC++ 9 When the Boost library/headers is used with VC++ 9 compilers (Visual C++ 2008 Express Edition or Visual Studio 2008), a lot of benign warnings are generated. They are of 2 kinds: Warning about the Wp64 setting. Warning about the compiler version. How can I turn off these warnings? A: ...
Boost warnings with VC++ 9
When the Boost library/headers is used with VC++ 9 compilers (Visual C++ 2008 Express Edition or Visual Studio 2008), a lot of benign warnings are generated. They are of 2 kinds: Warning about the Wp64 setting. Warning about the compiler version. How can I turn off these warnings?
[ "\nWarning about the Wp64 setting.\n\nTurn off the /Wp64 setting which is set by default. You can find it in Project Properties -> C/C++ -> General.\n\nWarning about the compiler version.\n\nGo to the Boost trunk (online) and get the latest boost\\boost\\config\\compiler\\visualc.hpp header file. Diff it with the c...
[ 1 ]
[]
[]
[ "boost", "c++", "visual_studio", "warnings" ]
stackoverflow_0000014271_boost_c++_visual_studio_warnings.txt
Q: GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT errors I'm using FBOs in my OpenGL code and I'm seeing compilation errors on GL\_FRAMEBUFFER\_INCOMPLETE\_DUPLICATE\_ATTACHMENT\_EXT. What's the cause of this and how do I fix it? A: The cause of this error is an older version of NVIDIA's glext.h, which still ha...
GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT errors
I'm using FBOs in my OpenGL code and I'm seeing compilation errors on GL\_FRAMEBUFFER\_INCOMPLETE\_DUPLICATE\_ATTACHMENT\_EXT. What's the cause of this and how do I fix it?
[ "The cause of this error is an older version of NVIDIA's glext.h, which still has this definition. Whereas the most recent versions of GLEW don't. This leads to compilation errors in code that you had written previously or got from the web.\nThe GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT definition for FBO ...
[ 4 ]
[]
[]
[ "fbo", "opengl" ]
stackoverflow_0000014297_fbo_opengl.txt
Q: Using OpenGL textures larger than window/display size I'm having problems using textures that are larger than the OpenGL window or the display size as non-display render targets. What's the solution for this problem? A: There's a simple solution. Assuming your (non-display) textures are 1024x1024 and you are res...
Using OpenGL textures larger than window/display size
I'm having problems using textures that are larger than the OpenGL window or the display size as non-display render targets. What's the solution for this problem?
[ "There's a simple solution.\nAssuming your (non-display) textures are 1024x1024 and you are restricted to a 256x256 window/display.\nunsigned int WIN_WIDTH = 256;\nunsigned int WIN_HEIGHT = WIN_WIDTH;\nunsigned int TEX_WIDTH = 1024;\nunsigned int TEX_HEIGHT = TEX_WIDTH;\n\nUse the window size to create your OpenGL ...
[ 4 ]
[]
[]
[ "opengl", "textures" ]
stackoverflow_0000014310_opengl_textures.txt
Q: Using GLUT bitmap fonts I'm writing a simple OpenGL application that uses GLUT. I don't want to roll my own font rendering code, instead I want to use the simple bitmap fonts that ship with GLUT. What are the steps to get them working? A: Simple text display is easy to do in OpenGL using GLUT bitmap fonts. These...
Using GLUT bitmap fonts
I'm writing a simple OpenGL application that uses GLUT. I don't want to roll my own font rendering code, instead I want to use the simple bitmap fonts that ship with GLUT. What are the steps to get them working?
[ "Simple text display is easy to do in OpenGL using GLUT bitmap fonts. These are simple 2D fonts and are not suitable for display inside your 3D environment. However, they're perfect for text that needs to be overlayed on the display window.\nHere are the sample steps to display Eric Cartman's favorite quote colored...
[ 29 ]
[]
[]
[ "bitmap", "fonts", "glut", "opengl" ]
stackoverflow_0000014318_bitmap_fonts_glut_opengl.txt
Q: Getting started with a Picasa Plugin Does anyone here know any resources on how to get started writing a plugin for Google's Picasa? I love it for photo management, but I have some ideas for how it could be better. Riya-esque facial search: given a large enough corpus of faces and pictures (people tend to be re...
Getting started with a Picasa Plugin
Does anyone here know any resources on how to get started writing a plugin for Google's Picasa? I love it for photo management, but I have some ideas for how it could be better. Riya-esque facial search: given a large enough corpus of faces and pictures (people tend to be repeated often in individuals' albums (famil...
[ "there is a an Opensource Project which created a \"Upload To FlickR\" Plugin. Maybe you could use it as an startingpoint... \n", "I thought about facial recognition many years ago but my search only found a web API - no plugin api. My idea was to use an external facial recognition program to slowly index my enti...
[ 1, 1 ]
[ "I would start with the Picasa API:\nPicasa API\n" ]
[ -2 ]
[ "api", "photo_management", "picasa", "plugins" ]
stackoverflow_0000013881_api_photo_management_picasa_plugins.txt
Q: Accessing audio/video metadata with .NET What is the best way to get and set the meta data for mp3, mp4, avi files etc. with .NET? A: I use MediaInfo with my C# apps, gives you a lot of information about media files. A: These are the example class files for different languages found in the MediaInfo.dll zip M...
Accessing audio/video metadata with .NET
What is the best way to get and set the meta data for mp3, mp4, avi files etc. with .NET?
[ "I use MediaInfo with my C# apps, gives you a lot of information about media files.\n", "These are the example class files for different languages found in the MediaInfo.dll zip\n\nMediaInfoDLL.cs\nMediaInfoDLL.def\nMediaInfoDLL.h\nMediaInfoDLL.java\nMediaInfoDLL.jsl\nMediaInfoDLL.pas\nMediaInfoDLL.py\nMediaInfoD...
[ 6, 4, 3, 3, 3, 1, 1 ]
[]
[]
[ ".net", "audio", "mp3", "video" ]
stackoverflow_0000009091_.net_audio_mp3_video.txt
Q: Accessing OpenGL state variables in Cg I need to access the OpenGL state variables (such as the MVP matrices) in my Cg shader program. I'm passing these values to my Cg shader program manually using calls such as cgGLSetStateMatrixParameter() in my C/C++ code. Is there an easier way to do this? A: If you are on ...
Accessing OpenGL state variables in Cg
I need to access the OpenGL state variables (such as the MVP matrices) in my Cg shader program. I'm passing these values to my Cg shader program manually using calls such as cgGLSetStateMatrixParameter() in my C/C++ code. Is there an easier way to do this?
[ "If you are on any fairly recent Cg profile (arbvp1 and later), your Cg shader programs can in fact access the OpenGL state (MVP matrices, material and light settings) directly. This makes writing those programs less painful.\nHere are some of the state variables which can be accessed:\nMVP matrices of all types:\n...
[ 4 ]
[]
[]
[ "cg", "opengl", "state", "variables" ]
stackoverflow_0000014358_cg_opengl_state_variables.txt
Q: Valid OpenGL context How and at what stage is a valid OpenGL context created in my code? I'm getting errors on even simple OpenGL code. A: From the posts on comp.graphics.api.opengl, it seems like most newbies burn their hands on their first OpenGL program. In most cases, the error is caused due to OpenGL funct...
Valid OpenGL context
How and at what stage is a valid OpenGL context created in my code? I'm getting errors on even simple OpenGL code.
[ "From the posts on comp.graphics.api.opengl, it seems like most newbies burn their hands on their first OpenGL program. In most cases, the error is caused due to OpenGL functions being called even before a valid OpenGL context is created. OpenGL is a state machine. Only after the machine has been started and hummin...
[ 4 ]
[]
[]
[ "glut", "opengl" ]
stackoverflow_0000014364_glut_opengl.txt
Q: What's the deal with |Pipe-delimited| variables in connection strings? I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is that hard-coded or is there a generalized mechanism at work along the lines of %environment variables%? A: From the MSDN Smart Client Data Blog: In this ve...
What's the deal with |Pipe-delimited| variables in connection strings?
I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is that hard-coded or is there a generalized mechanism at work along the lines of %environment variables%?
[ "From the MSDN Smart Client Data Blog:\n\nIn this version, the .NET runtime\n added support for what we call the\n DataDirectory macro. This allows\n Visual Studio to put a special\n variable in the connection string that\n will be expanded at run-time...\nBy default, the |DataDirectory|\n variable will be ex...
[ 5 ]
[]
[]
[ ".net", "ado.net", "connection_string", "macros", "syntax" ]
stackoverflow_0000014241_.net_ado.net_connection_string_macros_syntax.txt
Q: GLUT pop-up menus Is it easy to create GLUT pop-up menus for my OpenGL application? If yes, how? A: Creating and using pop-up menus with GLUT is very simple. Here is a code sample that creates a pop-up menu with 4 options: // Menu items enum MENU_TYPE { MENU_FRONT, MENU_SPOT, MENU_BACK, ...
GLUT pop-up menus
Is it easy to create GLUT pop-up menus for my OpenGL application? If yes, how?
[ "Creating and using pop-up menus with GLUT is very simple. Here is a code sample that creates a pop-up menu with 4 options:\n// Menu items\nenum MENU_TYPE\n{\n MENU_FRONT,\n MENU_SPOT,\n MENU_BACK,\n MENU_BACK_FRONT,\n};\n\n// Assign a default value\nMENU_TYPE show = MENU_BACK_FRONT;\n\n...
[ 13 ]
[]
[]
[ "glut", "menu", "opengl" ]
stackoverflow_0000014370_glut_menu_opengl.txt
Q: How do I call a Flex SWF from a remote domain using Flash (AS3)? I have a Flex swf hosted at http://www.a.com/a.swf. I have a flash code on another doamin that tries loading the SWF: _loader = new Loader(); var req:URLRequest = new URLRequest("http://services.nuconomy.com/n.swf"); _loader.contentLoaderInfo.addEven...
How do I call a Flex SWF from a remote domain using Flash (AS3)?
I have a Flex swf hosted at http://www.a.com/a.swf. I have a flash code on another doamin that tries loading the SWF: _loader = new Loader(); var req:URLRequest = new URLRequest("http://services.nuconomy.com/n.swf"); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderFinish); _loader.load(req); On the o...
[ "This is all described in The Adobe Flex 3 Programming ActionScript 3 PDF on page 550 (Chapter 27: Flash Player Security / Cross-scripting):\n\nIf two SWF files written with ActionScript 3.0 are served from different domains—for example, http://siteA.com/swfA.swf and http://siteB.com/swfB.swf—then, by default, Flas...
[ 6, 2, 0 ]
[]
[]
[ "actionscript_3", "apache_flex", "flash", "security" ]
stackoverflow_0000014350_actionscript_3_apache_flex_flash_security.txt
Q: In ASP.NET MVC I encounter an incorrect type error when rendering a user control with the correct typed object I encounter an error of the form: "The model item passed into the dictionary is of type FooViewData but this dictionary requires a model item of type bar" even though I am passing in an object of the corr...
In ASP.NET MVC I encounter an incorrect type error when rendering a user control with the correct typed object
I encounter an error of the form: "The model item passed into the dictionary is of type FooViewData but this dictionary requires a model item of type bar" even though I am passing in an object of the correct type (bar) for the typed user control.
[ "What @MattMitchell said is probably the reason you're seeing this error.\nIf you want to know why; it is because when you pass null as the controlData parameter when using RenderUserControl(), the framework will try to pass the view data from the current view context onto the user control instead (see UserControlE...
[ 4, 1 ]
[]
[]
[ "asp.net_mvc" ]
stackoverflow_0000005544_asp.net_mvc.txt
Q: File Uploads via Web Services Is it possible to upload a file from a client's computer to the server through a web service? The client can be running anything from a native desktop app to a thin ajax client. A: It's certainly possible to send binary files via web services (eg. SOAP), but you usually have to do s...
File Uploads via Web Services
Is it possible to upload a file from a client's computer to the server through a web service? The client can be running anything from a native desktop app to a thin ajax client.
[ "It's certainly possible to send binary files via web services (eg. SOAP), but you usually have to do some kind of encoding such as base64, which increases the amount of data to send. One of the most efficient ways to send an arbitrary binary file is via an HTTP PUT operation, since there is no encoding overhead. N...
[ 1, 0 ]
[]
[]
[ ".net", "file_upload", "upload", "web_services" ]
stackoverflow_0000011782_.net_file_upload_upload_web_services.txt
Q: Is there any trick that allows to use Management Studio's (ver. 2008) IntelliSense feature with earlier versions of SQL Server? New version of Management Studio (i.e. the one that ships with SQL Server 2008) finally has a Transact-SQL IntelliSense feature. However, out-of-the-box it only works with SQL Server 2008...
Is there any trick that allows to use Management Studio's (ver. 2008) IntelliSense feature with earlier versions of SQL Server?
New version of Management Studio (i.e. the one that ships with SQL Server 2008) finally has a Transact-SQL IntelliSense feature. However, out-of-the-box it only works with SQL Server 2008 instances. Is there some workaround for this?
[ "There's no known trick 'in the wild' for getting around this, other than using CTP-6 of SQL Server 2008 (in favour of the RTM).\nthe reasons for removing backward compatability (and a lot more discussion besides) are provided at the relevant feedback in microsoft connect.\nedit: sorry i don't know where this ctp i...
[ 8, 1 ]
[]
[]
[ "database", "intellisense", "sql", "sql_server", "sql_server_2008" ]
stackoverflow_0000004511_database_intellisense_sql_sql_server_sql_server_2008.txt
Q: How do I access the Ruby AST from C level code? I understand that the Ruby 1.8 AST is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down the tree as it goes. Is there a straightforward way of accessing thi...
How do I access the Ruby AST from C level code?
I understand that the Ruby 1.8 AST is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down the tree as it goes. Is there a straightforward way of accessing this AST in a Ruby C extension? Does it involve the Ruby...
[ "A good starting point is probably to read the source of the ParseTree library, which lets you get at and mess with the AST from ruby.\n", "Thanks for the tip. You're right - ParseTree seems to be the only code out there with any manipulation of the AST going on, except that it's actually written in RubyInline. \...
[ 1, 0 ]
[]
[]
[ "c", "interpreter", "ruby", "tree" ]
stackoverflow_0000013981_c_interpreter_ruby_tree.txt
Q: Software to use when designing classes What software do you use when designing classes and their relationship, or just pen and paper? A: I find pen and paper very useful, and I try to get as far away from a computer as possible. If I do it on the compy, I'm always too tempted to start programming the solution. T...
Software to use when designing classes
What software do you use when designing classes and their relationship, or just pen and paper?
[ "I find pen and paper very useful, and I try to get as far away from a computer as possible. If I do it on the compy, I'm always too tempted to start programming the solution. That inevitably leads to me changing things later that I would have spotted in the planning phase had I actually spent a good measure of tim...
[ 5, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]
[]
[]
[ "class_design", "editor" ]
stackoverflow_0000014435_class_design_editor.txt
Q: How to organize dataset queries to improve performance I don't know when to add to a dataset a tableadapter or a query from toolbox. Does it make any difference? I also dont know where to create instances of the adapters. Should I do it in the Page_Load? Should I just do it when I'm going to use it? Am I open...
How to organize dataset queries to improve performance
I don't know when to add to a dataset a tableadapter or a query from toolbox. Does it make any difference? I also dont know where to create instances of the adapters. Should I do it in the Page_Load? Should I just do it when I'm going to use it? Am I opening a new connection when I create a new instance? This doe...
[ "\nShould I just do it when I'm going to use it?\n\nI would recommend that you only retrieve the data when you are going to use it. If you are not going to need it, there is no reason to waste resources by retrieving it in Page_Load. If you are going to need it multiple times throughout the page load, consider savi...
[ 2 ]
[]
[]
[ "asp.net", "database", "performance" ]
stackoverflow_0000014570_asp.net_database_performance.txt
Q: How to register COM from VS Setup project? I have marked my DLL as vsdraCOM, and I can see it in the registry after installing, but my application does not see the COM interface until I call RegAsm on it manually. Why could this be? The COM registration does not work on Vista (confirmed myself) and on XP (confirm...
How to register COM from VS Setup project?
I have marked my DLL as vsdraCOM, and I can see it in the registry after installing, but my application does not see the COM interface until I call RegAsm on it manually. Why could this be? The COM registration does not work on Vista (confirmed myself) and on XP (confirmed by a colleague). Using Visual Studio 2005 on ...
[ "Well, I have found a solution:\n\nRun RegAsm.exe with the /regfile option to generate the registry entries.\nManually import the .reg file into the VS Setup project by viewing the registry, right clicking, and choosing \"Import...\"\n\n" ]
[ 5 ]
[]
[]
[ "com", "registry" ]
stackoverflow_0000012807_com_registry.txt
Q: Default database IDs; system and user values As part of our current database work, we are looking at a dealing with the process of updating databases. A point which has been brought up recurrently, is that of dealing with system vs. user values; in our project user and system vals are stored together. For example....
Default database IDs; system and user values
As part of our current database work, we are looking at a dealing with the process of updating databases. A point which has been brought up recurrently, is that of dealing with system vs. user values; in our project user and system vals are stored together. For example... We have a list of templates. 1, <system templat...
[ "I recommend using the second with the modification that you store the system and user values in one table. GUID is quite reliable in this manner.\nAnother idea: use any text-based ID (not necessary GUID), which you give for the system values and is generated by a random string or a string based on some kind of cus...
[ 1, 1, 1, 0, 0, 0 ]
[]
[]
[ "database" ]
stackoverflow_0000009702_database.txt
Q: Editing User Profile w/ Forms Authentication We're using Forms Authentication in SharePoint. When the account is created, the administrator can add some information, like name and address. But the required fields are username and email address. When a user goes to their profile page, all the fields are blank and...
Editing User Profile w/ Forms Authentication
We're using Forms Authentication in SharePoint. When the account is created, the administrator can add some information, like name and address. But the required fields are username and email address. When a user goes to their profile page, all the fields are blank and they are unable to edit them. I have read a numb...
[ "If you log in to the \"Shared Services administration\" through the \"Central Admin Tool\" there is an option \"Profile services policies\". You can define in here what fields are user-overridable.\n" ]
[ 4 ]
[]
[]
[ "moss", "sharepoint", "wss" ]
stackoverflow_0000014611_moss_sharepoint_wss.txt
Q: Multiple choice on WinForms What's the best way of implementing a multiple choice option in Windows Forms? I want to enforce a single selection from a list, starting with a default value. It seems like a ComboBox would be a good choice, but is there a way to specify a non-blank default value? I could just set it i...
Multiple choice on WinForms
What's the best way of implementing a multiple choice option in Windows Forms? I want to enforce a single selection from a list, starting with a default value. It seems like a ComboBox would be a good choice, but is there a way to specify a non-blank default value? I could just set it in the code at some appropriate in...
[ "If you only want one answer from the group, then a RadioButton control would be your best fit or you could use the ComboBox if you will have a lot of options. To set a default value, just add the item to the ComboBox's collection and set the SelectedIndex or SelectedItem to that item.\nDepending on how many optio...
[ 8, 2, 2, 2, 1 ]
[]
[]
[ "combobox", "winforms" ]
stackoverflow_0000014618_combobox_winforms.txt
Q: Static Methods in an Interface/Abstract Class First off, I understand the reasons why an interface or abstract class (in the .NET/C# terminology) cannot have abstract static methods. My question is then more focused on the best design solution. What I want is a set of "helper" classes that all have their own stat...
Static Methods in an Interface/Abstract Class
First off, I understand the reasons why an interface or abstract class (in the .NET/C# terminology) cannot have abstract static methods. My question is then more focused on the best design solution. What I want is a set of "helper" classes that all have their own static methods such that if I get objects A, B, and C f...
[ "If I were you I would try to avoid any statics. IMHO I always ended up with some sort of synchronization issues down the road with statics. That being said you are presenting a classic example of generic programming using templates. I will adopt the template based solution of Rob Copper presented in one of the pos...
[ 5, 3, 3, 2, 2, 2, 1, 0, 0, 0 ]
[]
[]
[ ".net", "abstract_class", "interface_design", "static_methods" ]
stackoverflow_0000014614_.net_abstract_class_interface_design_static_methods.txt
Q: Is it possible to automatically make check-outs from any VCS? Let's take a web development environment, where developers checkout a project onto their local machines, work on it, and check in changes to development. These changes are further tested on development and moved live on a regular schedule (eg weekly, mo...
Is it possible to automatically make check-outs from any VCS?
Let's take a web development environment, where developers checkout a project onto their local machines, work on it, and check in changes to development. These changes are further tested on development and moved live on a regular schedule (eg weekly, monthly, etc.). Is it possible to have an auto-moveup of the latest t...
[ "Yes, it is possible. This is usually a feature provided by continuous integration tools. Typically they will get the latest source from version control, build the project, test it (running unit tests) and possibly deploy it on a (test) server. \nIf you don't require all those steps, you can easily do the same thin...
[ 2, 1, 1, 1, 0, 0 ]
[]
[]
[ "cvs", "svn", "version_control", "versions" ]
stackoverflow_0000014634_cvs_svn_version_control_versions.txt