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: How to setup a crontab to execute at specific time How can I set up my crontab to execute X script at 11:59PM every day without emailing me or creating any logs? Right now my crontab looks something like this @daily /path/to/script.sh A: When you do crontab -e, try this: 59 23 * * * /usr/sbin/myscript > /dev/nul...
How to setup a crontab to execute at specific time
How can I set up my crontab to execute X script at 11:59PM every day without emailing me or creating any logs? Right now my crontab looks something like this @daily /path/to/script.sh
[ "When you do crontab -e, try this:\n59 23 * * * /usr/sbin/myscript > /dev/null\n\nThat means: At 59 Minutes and 23 Hours on every day (*) on every month on every weekday, execute myscript.\nSee man crontab for some more info and examples.\n", "Following up on svrist's answer, depending on your shell, the 2>&1 sho...
[ 10, 6, 5 ]
[]
[]
[ "cron", "settings" ]
stackoverflow_0000003136_cron_settings.txt
Q: Get a preview JPEG of a PDF on Windows? I have a cross-platform (Python) application which needs to generate a JPEG preview of the first page of a PDF. On the Mac I am spawning sips. Is there something similarly simple I can do on Windows? A: ImageMagick delegates the PDF->bitmap conversion to GhostScript anywa...
Get a preview JPEG of a PDF on Windows?
I have a cross-platform (Python) application which needs to generate a JPEG preview of the first page of a PDF. On the Mac I am spawning sips. Is there something similarly simple I can do on Windows?
[ "ImageMagick delegates the PDF->bitmap conversion to GhostScript anyway, so here's a command you can use (it's based on the actual command listed by the ps:alpha delegate in ImageMagick, just adjusted to use JPEG as output):\ngs -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT \\\n-dMaxBitmap=500000000 -dLas...
[ 44, 16, 5 ]
[]
[]
[ "image", "pdf", "python", "windows" ]
stackoverflow_0000000502_image_pdf_python_windows.txt
Q: User authentication on Resin webserver I'm currently tasked with replacing an Apache + Resin Java web server with a Resin-only configuration. Currently in our apache setup, we use .htaccess and a small user database to provide passwording at a directory level. Does anyone know the equivalent setup when using just ...
User authentication on Resin webserver
I'm currently tasked with replacing an Apache + Resin Java web server with a Resin-only configuration. Currently in our apache setup, we use .htaccess and a small user database to provide passwording at a directory level. Does anyone know the equivalent setup when using just Resin as the web server?
[ "See \"Authentication on Resin\"\nThe closest you'll come to .htaccess with apache is configuring for Basic auth using an XmlAuthenticator. You'll need to convert your htpasswd file into the XML format that resin uses.\nFollow the \"Quick Start\" section and you'll get what you want.\n" ]
[ 1 ]
[]
[]
[ "apache", "caucho", "configuration", "resin", "webserver" ]
stackoverflow_0000007214_apache_caucho_configuration_resin_webserver.txt
Q: Animation in .NET What is a good way to perform animation using .NET? I would prefer not to use Flash if possible, so am looking for suggestions of ways which will work to implement different types of animation on a new site I am producing. The new site is for a magician, so I want to provide animated buttons (Car...
Animation in .NET
What is a good way to perform animation using .NET? I would prefer not to use Flash if possible, so am looking for suggestions of ways which will work to implement different types of animation on a new site I am producing. The new site is for a magician, so I want to provide animated buttons (Cards turning over, etc.) ...
[ "Silverlight springs to mind as an obvious choice if you want to do animation using .NET on the web. It may not cover all platforms but will work in IE and FireFox and on the Mac.\n", "Have a look at the jQuery cross browser JavaScript library for animation (it is what is used on Stack Overflow). The reference fo...
[ 4, 2, 0, 0 ]
[]
[]
[ ".net", "animation" ]
stackoverflow_0000007180_.net_animation.txt
Q: Visual Studio - new "default" property values for inherited controls I'm looking for help setting a new default property value for an inherited control in Visual Studio: class NewCombo : System.Windows.Forms.ComboBox { public NewCombo() { DropDownItems = 50; } } The problem is that the base class property DropD...
Visual Studio - new "default" property values for inherited controls
I'm looking for help setting a new default property value for an inherited control in Visual Studio: class NewCombo : System.Windows.Forms.ComboBox { public NewCombo() { DropDownItems = 50; } } The problem is that the base class property DropDownItems has a 'default' attribute set on it that is a different value (no...
[ "In your derived class you need to either override (or shadow using new) the property in question and then re-apply the default value attribute.\n" ]
[ 5 ]
[]
[]
[ ".net", "c#", "vb.net", "visual_studio" ]
stackoverflow_0000007367_.net_c#_vb.net_visual_studio.txt
Q: Change the width of a scrollbar Is it possible to change the width of a scroll bar on a form. This app is for a touch screen and it is a bit too narrow. A: This is a Windows Forms application? I was able to make a very fat and thick scrollbar by adjusting the "Width" property of my scroll bar control. Is yo...
Change the width of a scrollbar
Is it possible to change the width of a scroll bar on a form. This app is for a touch screen and it is a bit too narrow.
[ "This is a Windows Forms application? I was able to make a very fat and thick scrollbar by adjusting the \"Width\" property of my scroll bar control. \n\nIs your scroll bar something you have programmatic access to (i.e. it is a control you added to the form)?\n", "The width of the scrollbars is controlled by W...
[ 4, 3 ]
[]
[]
[ "scrollbar", "vb.net" ]
stackoverflow_0000007224_scrollbar_vb.net.txt
Q: E-mail Notifications In a .net system I'm building, there is a need for automated e-mail notifications. These should be editable by an admin. What's the easiest way to do this? SQL table and WYSIWIG for editing? The queue is a great idea. I've been throwing around that type of process for awhile with my old compa...
E-mail Notifications
In a .net system I'm building, there is a need for automated e-mail notifications. These should be editable by an admin. What's the easiest way to do this? SQL table and WYSIWIG for editing? The queue is a great idea. I've been throwing around that type of process for awhile with my old company.
[ "From a high level, yes. :D The main thing is some place to store the templates. A database is a great option unless you're not already using one, then file systems work fine.\nWSIWIG editors (such as fckeditor) work well and give you some good options regarding the features that you allow.\nSome sort of token r...
[ 3, 1, 0, 0, 0 ]
[]
[]
[ ".net", "email" ]
stackoverflow_0000006210_.net_email.txt
Q: What is best practice for FTP from a SQL Server 2005 stored procedure? What is the best method for executing FTP commands from a SQL Server stored procedure? we currently use something like this: EXEC master..xp_cmdshell 'ftp -n -s:d:\ftp\ftpscript.xmt 172.1.1.1' The problem is that the command seems to succeed e...
What is best practice for FTP from a SQL Server 2005 stored procedure?
What is the best method for executing FTP commands from a SQL Server stored procedure? we currently use something like this: EXEC master..xp_cmdshell 'ftp -n -s:d:\ftp\ftpscript.xmt 172.1.1.1' The problem is that the command seems to succeed even if the FTP ended in error. Also, the use of xp_cmdshell requires special...
[ "If you're running SQL 2005 you could do this in a CLR integration assembly and use the FTP classes in the System.Net namespace to build a simple FTP client.\nYou'd benefit from being able to trap and handle exceptions and reduce the security risk of having to use xp_cmdshell.\nJust some thoughts.\n", "Another po...
[ 5, 3, 2 ]
[]
[]
[ "ftp", "sql_server" ]
stackoverflow_0000004246_ftp_sql_server.txt
Q: Test serialization encoding What is the best way to verify/test that a text string is serialized to a byte array with a certain encoding? In my case, I want to verify that an XML structure is serialized to a byte array with the UTF-8 encoding which is of variable character length. As an example, my current ugly pr...
Test serialization encoding
What is the best way to verify/test that a text string is serialized to a byte array with a certain encoding? In my case, I want to verify that an XML structure is serialized to a byte array with the UTF-8 encoding which is of variable character length. As an example, my current ugly procedure is to inject a character ...
[ "Perhaps you could deserialise the byte array using a known encoding and ensure that (a) it doesn't throw any exceptions, and (b) deserialises to the original string. It seems that from your description of the scenario, you may not have the original string readily available. Might there be a way to create it?\n", ...
[ 2, 0 ]
[]
[]
[ "encoding", "java", "serialization", "string", "xml" ]
stackoverflow_0000007681_encoding_java_serialization_string_xml.txt
Q: Default Form Button in FireFox I am building a server control that will search our db and return results. The server control is contains an ASP:Panel. I have set the default button on the panel equal to my button id and have set the form default button equal to my button id. On the Panel: MyPanel.DefaultButton ...
Default Form Button in FireFox
I am building a server control that will search our db and return results. The server control is contains an ASP:Panel. I have set the default button on the panel equal to my button id and have set the form default button equal to my button id. On the Panel: MyPanel.DefaultButton = SearchButton.ID On the Control: Me...
[ "Is SearchButton a LinkButton? If so, the javascript that is written to the browser doesn't work properly.\nHere is a good blog post explaining the issue and how to solve it: \nUsing Panel.DefaultButton property with LinkButton control in ASP.NET\n", "Ends up this resolved my issue:\n SearchButton.UseSubmitB...
[ 3, 2, 0 ]
[]
[]
[ "asp.net", "vb.net" ]
stackoverflow_0000006076_asp.net_vb.net.txt
Q: Eclipse on win64 Is anyone successfully using the latest 64-bit Ganymede release of Eclipse on Windows XP or Vista 64-bit? Currently I run the normal Eclipse 3.4 distribution on a 32bit JDK and launch & compile my apps with a 64bit JDK. Our previous experience has been that the 64bit Eclipse distro is unstable for...
Eclipse on win64
Is anyone successfully using the latest 64-bit Ganymede release of Eclipse on Windows XP or Vista 64-bit? Currently I run the normal Eclipse 3.4 distribution on a 32bit JDK and launch & compile my apps with a 64bit JDK. Our previous experience has been that the 64bit Eclipse distro is unstable for us, so I'm curious if...
[ "I'm using Eclipse with a 64bit VM. However I have to use Java 1.5, because with Java 1.6, even 1.6.0_10ea, Eclipse crashed when changing the .classpath-file. On Linux I had the same problems and could only get the 64bit Eclipse to work with 64bit Java 1.5.\nThe problem seems to be with the just in time compilation...
[ 7, 1 ]
[]
[]
[ "eclipse", "eclipse_3.4", "ganymede", "java" ]
stackoverflow_0000006222_eclipse_eclipse_3.4_ganymede_java.txt
Q: interrogating table lock schemes in T-SQL Is there some means of querying the system tables to establish which tables are using what locking schemes? I took a look at the columns in sysobjects but nothing jumped out. A: aargh, just being an idiot: SELECT name, lockscheme(name) FROM sysobjects WHERE t...
interrogating table lock schemes in T-SQL
Is there some means of querying the system tables to establish which tables are using what locking schemes? I took a look at the columns in sysobjects but nothing jumped out.
[ "aargh, just being an idiot:\nSELECT name, lockscheme(name)\nFROM sysobjects\nWHERE type=\"U\"\nORDER BY name\n\n", "take a look at the syslockinfo and syslocks system tables\nyou can also run the sp_lock proc\n" ]
[ 1, 0 ]
[]
[]
[ "sysobjects", "tsql" ]
stackoverflow_0000007933_sysobjects_tsql.txt
Q: .NET Interfaces Over the past few years I've changed from having a long flowing page of controls that I hid/showed to using a lot of user controls. I've always had a bit of a discussion between co-workers on best practices. Should you have properties that you populate, or use paramterized sub's to load the inform...
.NET Interfaces
Over the past few years I've changed from having a long flowing page of controls that I hid/showed to using a lot of user controls. I've always had a bit of a discussion between co-workers on best practices. Should you have properties that you populate, or use paramterized sub's to load the information in your control...
[ "I'm not sure if interfaces are going to help you a lot here. My understanding is that you are breaking a page down into set of \"composite\" user controls that contain other controls, and you want to decide whether to use properties for setting values. \nI guess this really depends on how the user controls are des...
[ 1 ]
[]
[]
[ ".net", "interface", "user_controls" ]
stackoverflow_0000008066_.net_interface_user_controls.txt
Q: How do I find the high water mark (for sessions) on Oracle 9i How can I find the high water mark (the historical maximum number of concurrent users) in an oracle database (9i). A: This should do the trick: SELECT sessions_highwater FROM v$license; A: select max_utilization from v$resource_limit where resource_...
How do I find the high water mark (for sessions) on Oracle 9i
How can I find the high water mark (the historical maximum number of concurrent users) in an oracle database (9i).
[ "This should do the trick:\nSELECT sessions_highwater FROM v$license;\n\n", "select max_utilization from v$resource_limit where resource_name = 'sessions';\n\nA good overview of Oracle system views can be found here.\n" ]
[ 5, 1 ]
[]
[]
[ "oracle", "oracle9i", "session", "sql" ]
stackoverflow_0000008145_oracle_oracle9i_session_sql.txt
Q: MySQL replication: if I don't specify any databases, will log_bin log EVERYTHING? I'm setting up replication for a server which runs a bunch of databases (one per client) and plan on adding more all the time, on my.cnf, Instead of having: binlog-do-db = databasename 1 binlog-do-db = databasename 2 binlog-do-db ...
MySQL replication: if I don't specify any databases, will log_bin log EVERYTHING?
I'm setting up replication for a server which runs a bunch of databases (one per client) and plan on adding more all the time, on my.cnf, Instead of having: binlog-do-db = databasename 1 binlog-do-db = databasename 2 binlog-do-db = databasename 3 ... binlog-do-db = databasename n can I rather just have binlog-ign...
[ "That looks correct: http://dev.mysql.com/doc/refman/5.0/en/binary-log.html#option_mysqld_binlog-ignore-db.\nAccording to that reference:\n\nThere are some --binlog-ignore-db\n rules. Does the default database match\n any of the --binlog-ignore-db rules?\n\nYes: Do not write the statement, and exit.\nNo: Write th...
[ 12 ]
[]
[]
[ "mysql", "replication" ]
stackoverflow_0000008166_mysql_replication.txt
Q: Remove Quotes and Commas from a String in MySQL I'm importing some data from a CSV file, and numbers that are larger than 1000 get turned into 1,100 etc. What's a good way to remove both the quotes and the comma from this so I can put it into an int field? Edit: The data is actually already in a MySQL table, so ...
Remove Quotes and Commas from a String in MySQL
I'm importing some data from a CSV file, and numbers that are larger than 1000 get turned into 1,100 etc. What's a good way to remove both the quotes and the comma from this so I can put it into an int field? Edit: The data is actually already in a MySQL table, so I need to be able to this using SQL. Sorry for the mi...
[ "My guess here is that because the data was able to import that the field is actually a varchar or some character field, because importing to a numeric field might have failed. Here was a test case I ran purely a MySQL, SQL solution.\n\nThe table is just a single column (alpha) that is a varchar.\nmysql> desc t;\...
[ 17, 2, 0, 0, 0, 0, 0 ]
[ "Daniel's and Eldila's answer have one problem: They remove all quotes and commas in the whole file.\nWhat I usually do when I have to do something like this is to first replace all separating quotes and (usually) semicolons by tabs. \n\nSearch: \";\"\nReplace: \\t\n\nSince I know in which column my affected values...
[ -1 ]
[ "mysql", "regex", "string" ]
stackoverflow_0000007917_mysql_regex_string.txt
Q: ASP.NET Display SVN Revision Number I see in the Stack Overflow footer that the SVN Revision number is displayed. Is this automated and if so, how does one implement it in ASP.NET? (Solutions in other languages are acceptable) A: Make sure that the file has svn:keywords "Rev Id" and then put $Rev$ somewhere in t...
ASP.NET Display SVN Revision Number
I see in the Stack Overflow footer that the SVN Revision number is displayed. Is this automated and if so, how does one implement it in ASP.NET? (Solutions in other languages are acceptable)
[ "Make sure that the file has svn:keywords \"Rev Id\" and then put $Rev$ somewhere in there.\nSee this question and the answers to it.\n", "in our continuous integration setup we use SVNRevisionLabeller and pass the variables from this to MSBuild to use when creating the compiled website dll. It's then available t...
[ 6, 0, 0 ]
[]
[]
[ "asp.net", "svn" ]
stackoverflow_0000002308_asp.net_svn.txt
Q: How do you get a custom id to render using HtmlHelper in MVC Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( "myCheckBox", "Click Here", "True", false ) %> only outputs: <input type="checkbox" value="True" name="myCheckBox" /> There is a name there for the form post back but no id for javascript...
How do you get a custom id to render using HtmlHelper in MVC
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( "myCheckBox", "Click Here", "True", false ) %> only outputs: <input type="checkbox" value="True" name="myCheckBox" /> There is a name there for the form post back but no id for javascript or labels :-( I was hoping that changing it to: Html.CheckBox( "m...
[ "Try this: \n<%= Html.CheckBox(\"myCheckbox\", \"Click here\", \"True\", false, new {_id =\"test\" })%>\n\nFor any keyword you can use an underscore before the name of the attribute. Instead of class you use _class. Since class is a keyword in C#, and also the name of the attribute in HTML. Now, \"id\" isn't a k...
[ 5, 0 ]
[]
[]
[ "asp.net_mvc", "html_helper" ]
stackoverflow_0000008147_asp.net_mvc_html_helper.txt
Q: Getting started with a custom JXTA PeerGroup I have been working with JXTA 2.3 for the last year or so for a peer-to-peer computing platform I am developing. I am migrating to JXTA 2.5 and in the process I am trying to clean up a lot of my use of JXTA. For the most part, I approached JXTA with a just make it work ...
Getting started with a custom JXTA PeerGroup
I have been working with JXTA 2.3 for the last year or so for a peer-to-peer computing platform I am developing. I am migrating to JXTA 2.5 and in the process I am trying to clean up a lot of my use of JXTA. For the most part, I approached JXTA with a just make it work attitude. I used it to jumpstart creating and mana...
[ "The META-INF.services stuff is known by its class name in the API: ServiceLoader. A Google search for ServiceLoader yields some information.\nI am not really familiar with it, but sometimes it's all about knowing the right search keywords.\n" ]
[ 6 ]
[]
[]
[ "java", "jxta", "p2p" ]
stackoverflow_0000002931_java_jxta_p2p.txt
Q: Remove the bar at the top of Loginview for formatting I'm making a webform using a LoginView, the problem is that because the control includes a grey bar telling you what type of control it is it throws of correctly formatting the page (it has LoginView1 at the top). Is there a way to hide this on the LoginView as...
Remove the bar at the top of Loginview for formatting
I'm making a webform using a LoginView, the problem is that because the control includes a grey bar telling you what type of control it is it throws of correctly formatting the page (it has LoginView1 at the top). Is there a way to hide this on the LoginView as the contentPlaceholder does an excellent job for this. I'v...
[ "I may have misunderstood your question but.... \nThe 'grey bar telling you what type of control it is' only shows up if you are looking at the page in 'design view' in your IDE (are you using Visual Studio?).\nOnce you run the page this label is not visible. \nIt is very common for pages that have dynamic/ser...
[ 3, 0 ]
[]
[]
[ "asp.net", "webforms" ]
stackoverflow_0000007873_asp.net_webforms.txt
Q: I can't get my debugger to stop breaking on first-chance exceptions I'm using Visual C++ 2003 to debug a program remotely via TCP/IP. I had set the Win32 exception c00000005, "Access violation," to break into the debugger when thrown. Then, I set it back to "Use parent setting." The setting for the parent, Win32 E...
I can't get my debugger to stop breaking on first-chance exceptions
I'm using Visual C++ 2003 to debug a program remotely via TCP/IP. I had set the Win32 exception c00000005, "Access violation," to break into the debugger when thrown. Then, I set it back to "Use parent setting." The setting for the parent, Win32 Exceptions, is to continue when the exception is thrown. Now, when I debug...
[ "Is this an exception that your code would actually handle if you weren't running in the debugger?\n", "I'd like to support Will Dean's answer\nAn access violation sounds like an actual bug in your code. It's not something I'd expect the underlying C/++ Runtime to be throwing and catching internally.\nThe 'first-...
[ 5, 5, 1 ]
[]
[]
[ "c++", "debugging", "first_chance_exception", "visual_studio", "visual_studio_2003" ]
stackoverflow_0000008263_c++_debugging_first_chance_exception_visual_studio_visual_studio_2003.txt
Q: How to programmatically iterate datagrid rows? I'm suddenly back to WinForms, after years of web development, and am having trouble with something that should be simple. I have an ArrayList of business objects bound to a Windows Forms DataGrid. I'd like the user to be able to edit the cells, and when finished,...
How to programmatically iterate datagrid rows?
I'm suddenly back to WinForms, after years of web development, and am having trouble with something that should be simple. I have an ArrayList of business objects bound to a Windows Forms DataGrid. I'd like the user to be able to edit the cells, and when finished, press a Save button. At that point I'd like to it...
[ "foreach(var row in DataGrid1.Rows)\n{\n DoStuff(row);\n}\n//Or --------------------------------------------- \nforeach(DataGridRow row in DataGrid1.Rows)\n{\n DoStuff(row);\n}\n//Or ---------------------------------------------\nfor(int i = 0; i< DataGrid1.Rows.Count - 1; i++)\n{\n DoStuff(DataGrid1.Rows[i]);...
[ 5, 1, 0 ]
[ "Aha, I was really just testing everyone once again! :) The real answer is, you rarely need to iterate the datagrid. Because even when binding to an ArrayList, the binding is 2 way. Still, it is handy to know how to itereate the grid directly, it can save a few lines of code now and then. \nBut NotMyself and O...
[ -2 ]
[ "winforms" ]
stackoverflow_0000006430_winforms.txt
Q: What client(s) should be targeted in implementing an ICalendar export for events? http://en.wikipedia.org/wiki/ICalendar I'm working to implement an export feature for events. The link above lists tons of clients that support the ICalendar standard, but the "three big ones" I can see are Apple's iCal, Microsoft's ...
What client(s) should be targeted in implementing an ICalendar export for events?
http://en.wikipedia.org/wiki/ICalendar I'm working to implement an export feature for events. The link above lists tons of clients that support the ICalendar standard, but the "three big ones" I can see are Apple's iCal, Microsoft's Outlook, and Google's Gmail. I'm starting to get the feeling that each of these client ...
[ "I have to say that I don't use the hourly recurrence feature as really how many people have events that repeat in the same day? I could see if someone however was to schedule when they needed to take a particular medicine at recurring times throughout the day.\nI would say support full features in the application ...
[ 2, 0 ]
[]
[]
[ "gmail", "icalendar", "outlook", "recurrence" ]
stackoverflow_0000006378_gmail_icalendar_outlook_recurrence.txt
Q: Visual Studio refactoring: Remove method Is there any Visual Studio Add-In that can do the remove method refactoring? Suppose you have the following method: Result DoSomething(parameters) { return ComputeResult(parameters); } Or the variant where Result is void. The purpose of the refactoring is to ...
Visual Studio refactoring: Remove method
Is there any Visual Studio Add-In that can do the remove method refactoring? Suppose you have the following method: Result DoSomething(parameters) { return ComputeResult(parameters); } Or the variant where Result is void. The purpose of the refactoring is to replace all the calls to DoSomething with call...
[ "If I understand the question, then Resharper calls this 'inline method' - Ctrl - R + I\n", "When it comes to refactoring like that, try out ReSharper. \nJust right click on the method name, click \"Find usages\", and refactor until it cannot find any references.\nAnd as dlamblin mentioned, the newest version of...
[ 6, 1, 1, 1, 0, 0 ]
[]
[]
[ "methods", "refactoring", "visual_studio" ]
stackoverflow_0000008549_methods_refactoring_visual_studio.txt
Q: Connection Pooling in .NET/SQL Server? Is it necessary or advantageous to write custom connection pooling code when developing applications in .NET with an SQL Server database? I know that ADO.NET gives you the option to enable/disable connection pooling -- does that mean that it's built into the framework and I ...
Connection Pooling in .NET/SQL Server?
Is it necessary or advantageous to write custom connection pooling code when developing applications in .NET with an SQL Server database? I know that ADO.NET gives you the option to enable/disable connection pooling -- does that mean that it's built into the framework and I don't need to worry about it? Why do people...
[ "The connection pooling built-in to ADO.Net is robust and mature. I would recommend against attempting to write your own version.\n", "I'm no real expert on this matter, but I know ADO.NET has its own connection pooling system, and as long as I've been using it it's been faultless.\nMy reaction would be that the...
[ 15, 3, 2, 1 ]
[ "Well, it is going to go away as the answer to all these questions will be LINQ. Incidentally, we have never needed custom connection pooling for any of our applications, so I am not sure what all the noise is about.\n" ]
[ -2 ]
[ ".net", "c#", "connection_pooling", "sql_server" ]
stackoverflow_0000008223_.net_c#_connection_pooling_sql_server.txt
Q: Watch for change in ip address status Is there a way to watch for changes in the ip-address much the same as it is possible to watch for changes to files using the FileSystemWatcher? I'm connecting to a machine via tcp/ip but it takes a while until it gives me an ip-address. I would like to dim out the connect but...
Watch for change in ip address status
Is there a way to watch for changes in the ip-address much the same as it is possible to watch for changes to files using the FileSystemWatcher? I'm connecting to a machine via tcp/ip but it takes a while until it gives me an ip-address. I would like to dim out the connect button until I have a valid ip-address.
[ "Check NetworkChange class. It raises an event when a network address changes.\n" ]
[ 6 ]
[]
[]
[ ".net", "windows" ]
stackoverflow_0000008585_.net_windows.txt
Q: Closet server versus Colo? As a programmer I need a place to store my stuff. I've been running a server in my parents closet for a long time, but I recently came across a decent 2U server. I have no experience dealing with hosting companies, beyond the very cheap stuff, and I'm wondering what I should look for in ...
Closet server versus Colo?
As a programmer I need a place to store my stuff. I've been running a server in my parents closet for a long time, but I recently came across a decent 2U server. I have no experience dealing with hosting companies, beyond the very cheap stuff, and I'm wondering what I should look for in a colo or if I should just keep ...
[ "There are three major factors here.\n\nCost. The colo will obviously be more expensive than sticking a server in your parents' closet.\nQuality. The colo should be a lot more reliable than the server in your parents' closet. They aren't as likely to go down when there's a power surge. They should provide some ...
[ 3, 1, 0 ]
[]
[]
[ "hardware", "storage" ]
stackoverflow_0000008545_hardware_storage.txt
Q: Numerical formatting using String.Format Are there any codes that allow for numerical formatting of data when using string.format? A: Loads, stick string.Format into Google :-) A quite good tutorial is at iduno A: Yes, you could format it this way: string.Format("Format number to: {0 : #.00}", number); string....
Numerical formatting using String.Format
Are there any codes that allow for numerical formatting of data when using string.format?
[ "Loads, stick string.Format into Google :-)\nA quite good tutorial is at iduno\n", "Yes, you could format it this way:\nstring.Format(\"Format number to: {0 : #.00}\", number);\nstring.Format(\"Format date to: {0 : MM/dd/yyyy}\", date);\n\n", "There are a number. This MS site is probably the best place to look...
[ 6, 4, 2, 2, 1 ]
[]
[]
[ ".net", "formatting", "numeric" ]
stackoverflow_0000008653_.net_formatting_numeric.txt
Q: How can I empty the recycle bin for all users from a Windows service application in c# I'm looking for a c# snippet which I can insert in a Windows service. The code must empty the recycle bin for all users on the computer. I have previously tried using SHEmptyRecycleBin (ref http://www.codeproject.com/KB/cs/Empty...
How can I empty the recycle bin for all users from a Windows service application in c#
I'm looking for a c# snippet which I can insert in a Windows service. The code must empty the recycle bin for all users on the computer. I have previously tried using SHEmptyRecycleBin (ref http://www.codeproject.com/KB/cs/Empty_Recycle_Bin.aspx) however the code doesn't work when ran from a windows service as the serv...
[ "Hopefully you can't.\nA service running as the local machine should not be clearing my Recycle bin, ever.\nYou could promote the service to run as an Admin account then it would have the right (and be a security risk), but why do you want to do this? It sounds like the sort of think Viruses try to do.\n", "I thi...
[ 4, 2, 1 ]
[]
[]
[ "c#", "recycle_bin" ]
stackoverflow_0000008648_c#_recycle_bin.txt
Q: Code crash in MS Visual Studio 2005 in RELEASE configuration I have a workspace for running an H.263 Video Encoder in a loop for 31 times i.e. the main is executed 31 times to generate 31 different encoded bit streams. This MS Visual Studio 2005 Workspace has all C source files. When i create a "DEBUG" configurati...
Code crash in MS Visual Studio 2005 in RELEASE configuration
I have a workspace for running an H.263 Video Encoder in a loop for 31 times i.e. the main is executed 31 times to generate 31 different encoded bit streams. This MS Visual Studio 2005 Workspace has all C source files. When i create a "DEBUG" configuration for the workspace and build and execute it, it runs fine, i.e. ...
[ "It's hard to say what the problem might be without carefully inspecting the code. However...\nOne of the differences between debug and release builds is how the function call stack frame is set up. There are certain classes of bad things you can do (like calling a function with the wrong number of arguments) that ...
[ 2, 1, 1, 1, 1, 0, 0, 0 ]
[]
[]
[ "visual_studio_2005" ]
stackoverflow_0000008612_visual_studio_2005.txt
Q: Best implementation for Key Value Pair Data Structure? So I've been poking around with C# a bit lately, and all the Generic Collections have me a little confused. Say I wanted to represent a data structure where the head of a tree was a key value pair, and then there is one optional list of key value pairs below t...
Best implementation for Key Value Pair Data Structure?
So I've been poking around with C# a bit lately, and all the Generic Collections have me a little confused. Say I wanted to represent a data structure where the head of a tree was a key value pair, and then there is one optional list of key value pairs below that (but no more levels than these). Would this be suitable?...
[ "There is an actual Data Type called KeyValuePair, use like this\nKeyValuePair<string, string> myKeyValuePair = new KeyValuePair<string,string>(\"defaultkey\", \"defaultvalue\");\n\n", "One possible thing you could do is use the Dictionary object straight out of the box and then just extend it with your own modif...
[ 141, 14, 7, 5, 3, 2, 1, 1 ]
[]
[]
[ "c#", "collections", "data_structures" ]
stackoverflow_0000008800_c#_collections_data_structures.txt
Q: Is there any list datatype in MySQL stored procedures, or a way to emulate them? I would like to create a stored procedure in MySQL that took a list as argument. For example, say that I would like to be able to set multiple tags for an item in one call, then what I want to do is to define a procedure that takes th...
Is there any list datatype in MySQL stored procedures, or a way to emulate them?
I would like to create a stored procedure in MySQL that took a list as argument. For example, say that I would like to be able to set multiple tags for an item in one call, then what I want to do is to define a procedure that takes the ID of the item and a list of tags to set. However, I can't seem to find any way to d...
[ "This article has some good discussion on the problem of parsing an array to a stored procedure since stored procedures only allow valid table column data-types as parameters.\nThere are some neat things you can do with the csv table type in mysql - that is if you are loading a flat file into the db.\nYou could cre...
[ 9, 1, 0, 0 ]
[]
[]
[ "mysql", "stored_procedures" ]
stackoverflow_0000008795_mysql_stored_procedures.txt
Q: Evidence Based Scheduling Tool Are there any free tools that implement evidence-based scheduling like Joel talks about? There is FogBugz, of course, but I am looking for a simple and free tool that can apply EBS on some tasks that I give estimates (and actual times which are complete) for. A: FogBugz is free for...
Evidence Based Scheduling Tool
Are there any free tools that implement evidence-based scheduling like Joel talks about? There is FogBugz, of course, but I am looking for a simple and free tool that can apply EBS on some tasks that I give estimates (and actual times which are complete) for.
[ "FogBugz is free for up to 2 users by the way. As far I know this is the only tool that does EBS.\nSee here http://www.workhappy.net/2008/06/get-fogbugz-for.html\n", "According to Wikipedia, Fogbugz is the only product currently offering EBS.\n" ]
[ 14, 7 ]
[]
[]
[ "fogbugz" ]
stackoverflow_0000008876_fogbugz.txt
Q: Get list of domains on the network Using the Windows API, how can I get a list of domains on my network? A: Answered my own question: Use the NetServerEnum function, passing in the SV_TYPE_DOMAIN_ENUM constant for the "servertype" argument. In Delphi, the code looks like this: <snip> type NET_API_STATUS = DWOR...
Get list of domains on the network
Using the Windows API, how can I get a list of domains on my network?
[ "Answered my own question:\nUse the NetServerEnum function, passing in the SV_TYPE_DOMAIN_ENUM constant for the \"servertype\" argument.\nIn Delphi, the code looks like this:\n<snip>\ntype\n NET_API_STATUS = DWORD;\n PSERVER_INFO_100 = ^SERVER_INFO_100;\n SERVER_INFO_100 = packed record\n sv100_platform_id : ...
[ 3, 1 ]
[]
[]
[ "winapi" ]
stackoverflow_0000008880_winapi.txt
Q: Cannot add WebViewer of ActiveReports to an ASP.NET page I installed ActiveReports from their site. The version was labeled as .NET 2.0 build 5.2.1013.2 (for Visual Studio 2005 and 2008). I have an ASP.NET project in VS 2008 which has 2.0 as target framework. I added all the tools in the DataDynamics namespace to...
Cannot add WebViewer of ActiveReports to an ASP.NET page
I installed ActiveReports from their site. The version was labeled as .NET 2.0 build 5.2.1013.2 (for Visual Studio 2005 and 2008). I have an ASP.NET project in VS 2008 which has 2.0 as target framework. I added all the tools in the DataDynamics namespace to the toolbox, created a new project, added a new report. When ...
[ "I think I found the reason. While trying to get this work, I think I installed another version of the package that removed or deactivated my current version. The control I was dropping on the form belonged to the older version that had no assemblies referenced. I removed all installations of ActiveReports, install...
[ 2 ]
[]
[]
[ "activereports" ]
stackoverflow_0000008807_activereports.txt
Q: Why won't Entourage work with Exchange 2007? So this is IT more than programming but Google found nothing, and you guys are just the right kind of geniuses. My Exchange Server 2007 and Entourage clients don't play nice. Right now the big issue is that the entourage client will not connect to Exchange 2007 ( Entou...
Why won't Entourage work with Exchange 2007?
So this is IT more than programming but Google found nothing, and you guys are just the right kind of geniuses. My Exchange Server 2007 and Entourage clients don't play nice. Right now the big issue is that the entourage client will not connect to Exchange 2007 ( Entourage 2004 or 2008) The account settings are corr...
[ "Try it without using the /exchange in the server properties field. Here's a link with relevant info.\n", "davex.dll is the legacy webdav component for Exchange server, which Entourage uses. Your first step should be investigating why the application pool crashes. My guess is that Entourage can't do anything whe...
[ 2, 0 ]
[]
[]
[ "dll", "email", "entourage", "exchange_server" ]
stackoverflow_0000008228_dll_email_entourage_exchange_server.txt
Q: Looking for best practice for doing a "Net Use" in C# I'd rather not have to resort to calling the command line. I'm looking for code that can map/disconnect a drive, while also having exception handling. Any ideas? A: Use P/Invoke and WNetAddConnection2 There should also be some wrappers out there to do some of...
Looking for best practice for doing a "Net Use" in C#
I'd rather not have to resort to calling the command line. I'm looking for code that can map/disconnect a drive, while also having exception handling. Any ideas?
[ "Use P/Invoke and WNetAddConnection2\nThere should also be some wrappers out there to do some of the grunt work for you.\nGoogle is your friend, as always.\n" ]
[ 9 ]
[]
[]
[ ".net_1.1", "c#" ]
stackoverflow_0000008919_.net_1.1_c#.txt
Q: VS 2008 - Objects disappearing? I've only been using VS 2008 Team Foundation for a few weeks. Over the last few days, I've noticed that sometimes one of my objects/controls on my page just disappears from intellisense. The project builds perfectly and the objects are still in the HTML, but I still can't find the o...
VS 2008 - Objects disappearing?
I've only been using VS 2008 Team Foundation for a few weeks. Over the last few days, I've noticed that sometimes one of my objects/controls on my page just disappears from intellisense. The project builds perfectly and the objects are still in the HTML, but I still can't find the object. Any one else notice this? Edi...
[ "The Visual Studio 2008 and .NET 3.5 Framework Service Pack 1 has gone out of beta, maybe you can see if this bug still occurs?\n", "I am also having a number of problems with VS 2008. Who would guess that I don't ever need to select multiple controls on a web form...\nAnyway, a lot has been fixed in Service Pac...
[ 3, 2, 0 ]
[]
[]
[ ".net", "tfs", "visual_studio" ]
stackoverflow_0000006284_.net_tfs_visual_studio.txt
Q: Calling Table-Valued SQL Functions From .NET Scalar-valued functions can be called from .NET as follows: SqlCommand cmd = new SqlCommand("testFunction", sqlConn); //testFunction is scalar cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("retVal", SqlDbType.Int); cmd.Parameters["retVal"].Directio...
Calling Table-Valued SQL Functions From .NET
Scalar-valued functions can be called from .NET as follows: SqlCommand cmd = new SqlCommand("testFunction", sqlConn); //testFunction is scalar cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("retVal", SqlDbType.Int); cmd.Parameters["retVal"].Direction = ParameterDirection.ReturnValue; cmd.ExecuteSca...
[ "No because you need to select them. However you can create a stored proc wrapper, which may defeat the point of having a table function.\n" ]
[ 19 ]
[]
[]
[ ".net", "c#", "sql" ]
stackoverflow_0000008987_.net_c#_sql.txt
Q: VMWare Server Under Linux Secondary NIC connection With VMWare Server running under Linux (Debain), I would like to have the following setup: 1st: NIC being used by many of the images running under VMWare, as well as being used by the Linux OS 2nd: NIC being used by only 1 image and to be unused by the Linux OS ...
VMWare Server Under Linux Secondary NIC connection
With VMWare Server running under Linux (Debain), I would like to have the following setup: 1st: NIC being used by many of the images running under VMWare, as well as being used by the Linux OS 2nd: NIC being used by only 1 image and to be unused by the Linux OS (as its part of a DMZ) Although the second NIC won't be...
[ "I believe you can set the desired solution up by rerunning the vmware configuration script. And doing a custom network setup, so that both NIC's are mapped to your vmware instance. I would recommend making eth0 the 2nd NIC since it will be easier for Linux to use by default. Then make eth1 the 1st NIC.\n" ]
[ 2 ]
[]
[]
[ "linux", "nic", "sysadmin", "vmware" ]
stackoverflow_0000008940_linux_nic_sysadmin_vmware.txt
Q: HTTPS in IIS 5.1 I'm using IIS 5.1 in Windows XP on my development computer. I'm going to set up HTTPS on my company's web server, but I want to try doing it locally before doing it on a production system. But when I go into the Directory Security tab of my web site's configuration section, the "Secure communicati...
HTTPS in IIS 5.1
I'm using IIS 5.1 in Windows XP on my development computer. I'm going to set up HTTPS on my company's web server, but I want to try doing it locally before doing it on a production system. But when I go into the Directory Security tab of my web site's configuration section, the "Secure communication" groupbox is disabl...
[ "You may need to manually create a certificate first (on WinXP there does not seem to be a built-in mechanism, so you need to use OpenSSL). Check out these two links:\nEnabling SSL in IIS on Windows XP Professional\nEnabling SSL (HTTPS) for IIS in Windows XP\n", "That is because IIS 5.1 under the limited Windows ...
[ 3, 3 ]
[]
[]
[ "iis", "ssl" ]
stackoverflow_0000009024_iis_ssl.txt
Q: Checking FTP status codes with a PHP script I have a script that checks responses from HTTP servers using the PEAR HTTP classes. However, I've recently found that the script fails on FTP servers (and probably anything that's not HTTP or HTTPS). I tried Google, but didn't see any scripts or code that returned the s...
Checking FTP status codes with a PHP script
I have a script that checks responses from HTTP servers using the PEAR HTTP classes. However, I've recently found that the script fails on FTP servers (and probably anything that's not HTTP or HTTPS). I tried Google, but didn't see any scripts or code that returned the server status code from servers other than HTTP se...
[ "HTTP works slightly differently than FTP though unfortunately. Although both may look the same in your browser, HTTP works off the basis of URI (i.e. to access resource A, you have an identifier which tells you how to access that).\nFTP is very old school server driven. Even anonymous FTP is a bit of a hack, since...
[ 4, 0, 0 ]
[]
[]
[ "ftp", "http", "pear", "php", "server_response" ]
stackoverflow_0000008726_ftp_http_pear_php_server_response.txt
Q: How do I setup Public-Key Authentication? How do I setup Public-Key Authentication for SSH? A: If you have SSH installed, you should be able to run.. ssh-keygen Then go through the steps, you'll have two files, id_rsa and id_rsa.pub (the first is your private key, the second is your public key - the one you cop...
How do I setup Public-Key Authentication?
How do I setup Public-Key Authentication for SSH?
[ "If you have SSH installed, you should be able to run..\nssh-keygen\n\nThen go through the steps, you'll have two files, id_rsa and id_rsa.pub (the first is your private key, the second is your public key - the one you copy to remote machines)\nThen, connect to the remote machine you want to login to, to the file ~...
[ 105, 5 ]
[]
[]
[ "linux", "private_key", "public_key", "ssh" ]
stackoverflow_0000007260_linux_private_key_public_key_ssh.txt
Q: How can I turn a string of HTML into a DOM object in a Firefox extension? I'm downloading a web page (tag soup HTML) with XMLHttpRequest and I want to take the output and turn it into a DOM object that I can then run XPATH queries on. How do I convert from a string into DOM object? It appears that the general solu...
How can I turn a string of HTML into a DOM object in a Firefox extension?
I'm downloading a web page (tag soup HTML) with XMLHttpRequest and I want to take the output and turn it into a DOM object that I can then run XPATH queries on. How do I convert from a string into DOM object? It appears that the general solution is to create a hidden iframe and throw the contents of the string into tha...
[ "Ajaxian actually had a post on inserting / retrieving html from an iframe today. You can probably use the js snippet they have posted there.\nAs for handling closing of a browser / tab, you can attach to the onbeforeunload (http://msdn.microsoft.com/en-us/library/ms536907(VS.85).aspx) event and do whatever you nee...
[ 10, 6, 2, 1, 1 ]
[]
[]
[ "dom", "firefox", "javascript" ]
stackoverflow_0000003868_dom_firefox_javascript.txt
Q: Opening a file in my application from File Explorer I've created my own application in VB.NET that saves its documents into a file with it's own custom extension (.eds). Assuming that I've properly associated the file extension with my application, how do I actually handle the processing of the selected file withi...
Opening a file in my application from File Explorer
I've created my own application in VB.NET that saves its documents into a file with it's own custom extension (.eds). Assuming that I've properly associated the file extension with my application, how do I actually handle the processing of the selected file within my application when I double click on the file in File ...
[ "Try this article but short answer is My.Application.CommandLineArgs\n" ]
[ 2 ]
[]
[]
[ "file_extension", "vb.net" ]
stackoverflow_0000009161_file_extension_vb.net.txt
Q: ADO.NET Connection Pooling & SQLServer What is it? How do I implement connection pooling with MS SQL? What are the performance ramifications when Executing many queries one-after-the other (i.e. using a loop with 30K+ iterations calling a stored procedure)? Executing a few queries that take a long time (10+ min)?...
ADO.NET Connection Pooling & SQLServer
What is it? How do I implement connection pooling with MS SQL? What are the performance ramifications when Executing many queries one-after-the other (i.e. using a loop with 30K+ iterations calling a stored procedure)? Executing a few queries that take a long time (10+ min)? Are there any best practices?
[ "Connection pooling is a mechanism to re-use connections, as establishing a new connection is slow.\nIf you use an MSSQL connection string and System.Data.SqlClient then you're already using it - in .Net this stuff is under the hood most of the time.\nA loop of 30k iterations might be better as a server side cursor...
[ 3, 2, 0 ]
[ "Your question was also partially answered by this thread. A search would have revealed this.. The definition of Connection Pooling, of which a Google would have answered with the first hit being this..\nWhich would leave just the best practices, which I think would have been a good question :)\n+1 to Keith's Answe...
[ -3 ]
[ "ado.net", "performance", "sql_server" ]
stackoverflow_0000009228_ado.net_performance_sql_server.txt
Q: JQuery.Validate failure in Opera If you're using Opera 9.5x you may notice that our client-side JQuery.Validate code is disabled here at Stack Overflow. function initValidation() { if (navigator.userAgent.indexOf("Opera") != -1) return; $("#post-text").rules("add", { required: true, minlength: 5 }); } Tha...
JQuery.Validate failure in Opera
If you're using Opera 9.5x you may notice that our client-side JQuery.Validate code is disabled here at Stack Overflow. function initValidation() { if (navigator.userAgent.indexOf("Opera") != -1) return; $("#post-text").rules("add", { required: true, minlength: 5 }); } That's because it generates an exception ...
[ "turns out the problem was in the\n{ debug : true }\n\noption for the JQuery.Validate initializer. With this removed, things work fine in Opera. Thanks to Jörn Zaefferer for helping us figure this out!\nOh, and the $50 will be donated to the JQuery project. :)\n", "I can't seem to reproduce this bug. Can you give...
[ 11, 0, 0 ]
[]
[]
[ "jquery", "opera", "validation" ]
stackoverflow_0000008681_jquery_opera_validation.txt
Q: Creating Redundancy for a Subversion Repository? What is the best way to create redundant subversion repositories? I have a subversion repository (linked through apache2 and WebDAV) and would like to create a mirror repository on a different server in the event of outages, but I am not certain of the best way to p...
Creating Redundancy for a Subversion Repository?
What is the best way to create redundant subversion repositories? I have a subversion repository (linked through apache2 and WebDAV) and would like to create a mirror repository on a different server in the event of outages, but I am not certain of the best way to proceed. I am thinking that post-commit scripts could b...
[ "Sounds like what you are looking for is basically federated (synced) servers...\nI asked the same question recently...and while I didn't find the exact solution I was looking for it came close.\nSee here:\n", "Do you really need per-commit back-ups? There are almost certainly better ways of safe-guarding against...
[ 4, 2, 1 ]
[]
[]
[ "redundancy", "repository", "svn" ]
stackoverflow_0000008306_redundancy_repository_svn.txt
Q: Is there some way of recycling a Crystal Reports dataset? I'm trying to write a Crystal Report which has totals grouped in a different way to the main report. The only way I've been able to do this so far is to use a subreport for the totals, but it means having to hit the data source again to retrieve the same da...
Is there some way of recycling a Crystal Reports dataset?
I'm trying to write a Crystal Report which has totals grouped in a different way to the main report. The only way I've been able to do this so far is to use a subreport for the totals, but it means having to hit the data source again to retrieve the same data, which seems like nonsense. Here's a simplified example: ...
[ "Hmm... as nice as it is to call the stored proc from the report and have it all contained in one location, however we found (like you) that you eventually hit a point where you can't get crystal to do what you want even tho the data is right there.\nWe ended up introducing a business layer which sits under the rep...
[ 2, 1 ]
[]
[]
[ "asp.net", "crystal_reports", "dataset" ]
stackoverflow_0000008669_asp.net_crystal_reports_dataset.txt
Q: How have Html entities inside asp.net page? Inside an asp.net page, should I use <html><title>My page's title from México</title></html> Or <html><title>My page&rsquo;s title from M&eacute;xico</title></html> Both examples have the same output. Since asp.net encodes all my pages to utf-8, there is no need to us...
How have Html entities inside asp.net page?
Inside an asp.net page, should I use <html><title>My page's title from México</title></html> Or <html><title>My page&rsquo;s title from M&eacute;xico</title></html> Both examples have the same output. Since asp.net encodes all my pages to utf-8, there is no need to use html entities, is that right?
[ "The second example will ensure compatibility with ASCII standards of HTML transmition. So my vote is for the second example, so you don't have to ensure the HTML is output and encoded as UTF-8 all the way through all the proxy servers and any other kind of caching and translation that might occur.\n", "You're c...
[ 3, 3, 3 ]
[]
[]
[ "asp.net", "encoding", "html" ]
stackoverflow_0000009022_asp.net_encoding_html.txt
Q: Running Javascript after control's selected value has been set Simple ASP.NET application. I have two drop-down controls. On the first-drop down I have a JavaScript onChange event. The JavaScript enables the second drop-down and removes a value from it (the value selected in the first drop-down). If they click the...
Running Javascript after control's selected value has been set
Simple ASP.NET application. I have two drop-down controls. On the first-drop down I have a JavaScript onChange event. The JavaScript enables the second drop-down and removes a value from it (the value selected in the first drop-down). If they click the blank first value of the drop-down, then the second drop-down will ...
[ "If the second dropdown is initially enabled through javascript (I'm assuming this is during a javascript onchange, since you didn't specify), then clicking the back button to reload the previous postback will never enable it. \nMixing ASP.NET with classic javascript can be hairy. You might want to have a look at A...
[ 4, 2 ]
[]
[]
[ "asp.net", "javascript" ]
stackoverflow_0000009341_asp.net_javascript.txt
Q: Quality Control / Log Monitoring One of the articles I really enjoyed reading recently was Quality Control by Last.FM. In the spirit of this article, I was wondering if anyone else had favorite monitoring setups for web type applications. Or maybe if you don't believe in Log Monitoring, why? I'm looking for a mix ...
Quality Control / Log Monitoring
One of the articles I really enjoyed reading recently was Quality Control by Last.FM. In the spirit of this article, I was wondering if anyone else had favorite monitoring setups for web type applications. Or maybe if you don't believe in Log Monitoring, why? I'm looking for a mix of opinion slash experience here I gue...
[ "We get a bunch of email/pager alerts from an older host/app/network monitoring environment that get gradually more abusive depending on severity of the problem/time taken to respond. Fortunately we all have thick skins and very broad senses of humour. :)\n", "We use log4net, and normally write both to log files ...
[ 2, 2 ]
[]
[]
[ "logging", "monitoring" ]
stackoverflow_0000009338_logging_monitoring.txt
Q: How do I prevent IIS7 from dropping my cookies? I'm using Windows Vista x64 with SP1, and I'm developing an ASP.NET app with IIS7 as the web server. I've got a problem where my cookies aren't "sticking" to the session, so I had a Google and found that there was a known issue with duplicate response headers overwri...
How do I prevent IIS7 from dropping my cookies?
I'm using Windows Vista x64 with SP1, and I'm developing an ASP.NET app with IIS7 as the web server. I've got a problem where my cookies aren't "sticking" to the session, so I had a Google and found that there was a known issue with duplicate response headers overwriting instead of being added to the session. This prob...
[ "Just a thought, have you got an underscore in the url. e.g. http://my_site ?\nAnd one other thing, you're not running the app pool in web garden mode? i.e. Process Model -> Maximum Worker Processes: > 1\nWhat type of app pool are you using - Integrated or Classic mode ?\n" ]
[ 4 ]
[]
[]
[ "cookies", "http", "iis", "iis_7", "windows_vista" ]
stackoverflow_0000009372_cookies_http_iis_iis_7_windows_vista.txt
Q: Windows Mobile Device Emulator - how to save config permanently? I am working at a client site where there is a proxy server (HTTP) in place. If I do a hard reset of the emulator it forgets network connection settings for the emulator and settings in the hosted Windows Mobile OS. If I 'save state and exit' it will...
Windows Mobile Device Emulator - how to save config permanently?
I am working at a client site where there is a proxy server (HTTP) in place. If I do a hard reset of the emulator it forgets network connection settings for the emulator and settings in the hosted Windows Mobile OS. If I 'save state and exit' it will lose all of these settings. I need to do hard resets regularly which ...
[ "The problem with these devices is everything is stored in the RAM and ROM. So you need a second alternate device storage for these settings, just like a real device. So that when a real device, or your device is reset, it has a statically stored configuration file outside of the RAM that can be loaded on start u...
[ 0, 0 ]
[]
[]
[ "device", "emulation", "visual_studio", "windows_mobile" ]
stackoverflow_0000009018_device_emulation_visual_studio_windows_mobile.txt
Q: Test Distribution At my work we are running a group of tests that consist of about 3,000 separate test cases. Previously we were running this entire test suite on one machine, which took about 24-72 hours to complete the entire test run. We now have created our own system for grouping and distributing the tests am...
Test Distribution
At my work we are running a group of tests that consist of about 3,000 separate test cases. Previously we were running this entire test suite on one machine, which took about 24-72 hours to complete the entire test run. We now have created our own system for grouping and distributing the tests among about three separat...
[ "I've seen some people having a play with distributed JUnit. I can't particularly vouch for how effective it is, but the other teams I've seen seemed to think it was straight forward enough. Hope that helps.\n", "Our build people use Mozilla Tinderbox. It seems to have some hooks for distributed testing. I'm so...
[ 3, 1, 1 ]
[]
[]
[ "enterprise", "java", "testing" ]
stackoverflow_0000008219_enterprise_java_testing.txt
Q: Datagrid: Calculate Avg or Sum for column in Footer I have a datagrid getting bound to a dataset, and I want to display the average result in the footer for a column populated with integers. The way I figure, there's 2 ways I can think of: 1."Use the Source, Luke" In the code where I'm calling DataGrid.DataBind()...
Datagrid: Calculate Avg or Sum for column in Footer
I have a datagrid getting bound to a dataset, and I want to display the average result in the footer for a column populated with integers. The way I figure, there's 2 ways I can think of: 1."Use the Source, Luke" In the code where I'm calling DataGrid.DataBind(), use the DataTable.Compute() method (or in my case DataSe...
[ "I don't know if either are necessarily better, but two alternate ways would be:\n\nManually run through the table once you hit the footer and calculate from the on-screen text\nManually retrieve the data and do the calculation separately from the bind\n\nOf course, #2 sort of offsets the advantages of data binding...
[ 1, 1 ]
[]
[]
[ "asp.net", "datagrid", "report", "vb.net" ]
stackoverflow_0000009409_asp.net_datagrid_report_vb.net.txt
Q: Best way to write a RESTful service "client" in .Net? What techniques do people use to "consume" services in the REST stile on .Net ? Plain http client? Related to this: many rest services are now using JSON (its tighter and faster) - so what JSON lib is used? A: My approach was Write some libraries and interf...
Best way to write a RESTful service "client" in .Net?
What techniques do people use to "consume" services in the REST stile on .Net ? Plain http client? Related to this: many rest services are now using JSON (its tighter and faster) - so what JSON lib is used?
[ "My approach was\n\nWrite some libraries and interfaces to serialize your objects into REST-compatible XML.\nYou can't neccessarily just use the built-in serializers, because your service may not accept the same kind of XML that .NET wants to give you.\nExample: When passing booleans to a Rails REST service, \"true...
[ 5 ]
[]
[]
[ ".net", "rest", "web_services" ]
stackoverflow_0000009467_.net_rest_web_services.txt
Q: RaisePostBackEvent not firing I have a custom control that implements IPostBackEventHandler. Some client-side events invoke __doPostBack(controlID, eventArgs). The control is implemented in two different user controls. In one control, RaisePostBackEvent is fired on the server-side when __doPostBack is invoked. In ...
RaisePostBackEvent not firing
I have a custom control that implements IPostBackEventHandler. Some client-side events invoke __doPostBack(controlID, eventArgs). The control is implemented in two different user controls. In one control, RaisePostBackEvent is fired on the server-side when __doPostBack is invoked. In the other control, RaisePostBackEve...
[ "There's a lot of ways this can fall apart. Are you adding the control to the page dynamically in code behind? If so alot of times your UniqueID can be off - even though the client id's are equal. Do you have a code sample that might demonstrate what you're doing?\n", "Double check that it is indeed a derivati...
[ 1, 0 ]
[]
[]
[ "asp.net", "postback" ]
stackoverflow_0000009473_asp.net_postback.txt
Q: Generate sitemap on the fly I'm trying to generate a sitemap.xml on the fly for a particular asp.net website. I found a couple solutions: chinookwebs cervoproject newtonking Chinookwebs is working great but seems a bit inactive right now and it's impossible to personalize the "priority" and the "changefreq" tags...
Generate sitemap on the fly
I'm trying to generate a sitemap.xml on the fly for a particular asp.net website. I found a couple solutions: chinookwebs cervoproject newtonking Chinookwebs is working great but seems a bit inactive right now and it's impossible to personalize the "priority" and the "changefreq" tags of each and every page, they all...
[ "Usually you'll use an HTTP Handler for this. Given a request for...\n\nhttp://www.yoursite.com/sitemap.axd\n\n...your handler will respond with a formatted XML sitemap. Whether that sitemap is generated on the fly, from a database, or some other method is up to the HTTP Handler implementation.\nHere's roughly what...
[ 7, 0, 0 ]
[]
[]
[ ".net", "asp.net", "sitemap" ]
stackoverflow_0000009336_.net_asp.net_sitemap.txt
Q: Replicating load related crashes in non-production environments We're running a custom application on our intranet and we have found a problem after upgrading it recently where IIS hangs with 100% CPU usage, requiring a reset. Rather than subject users to the hangs, we've rolled back to the previous release while ...
Replicating load related crashes in non-production environments
We're running a custom application on our intranet and we have found a problem after upgrading it recently where IIS hangs with 100% CPU usage, requiring a reset. Rather than subject users to the hangs, we've rolled back to the previous release while we determine a solution. The first step is to reproduce the problem ...
[ "You can find some information about troubleshooting this kind of problem at this blog entry. Her blog is generally a good debugging resource.\n", "I have an article about debugging ASP.NET in production which may provide some pointers.\n", "Is your test env the same really as live? \ni.e\n2 separate vm instanc...
[ 1, 1, 0 ]
[]
[]
[ "asp.net", "cpu", "crash", "memory", "performance" ]
stackoverflow_0000009501_asp.net_cpu_crash_memory_performance.txt
Q: C# 2.0 code consuming assemblies compiled with C# 3.0 This should be fine seeing as the CLR hasn't actually changed? The boxes running the C# 2.0 code have had .NET 3.5 rolled out. The background is that we have a windows service (.NET 2.0 exe built with VS2005, deployed to ~150 servers) that dynamically loads ass...
C# 2.0 code consuming assemblies compiled with C# 3.0
This should be fine seeing as the CLR hasn't actually changed? The boxes running the C# 2.0 code have had .NET 3.5 rolled out. The background is that we have a windows service (.NET 2.0 exe built with VS2005, deployed to ~150 servers) that dynamically loads assemblies (almost like plug-ins) to complete various work ite...
[ "C#3 and .Net 3.5 adds new assemblies, but the IL is unchanged.\nThis means that with .Net 2 assemblies you can compile and use C#3, as long as you don't use Linq or anything else that references System.Linq or System.Core\nyield, var, lambda syntax, anon types and initialisers are all compiler cleverness. The IL t...
[ 6, 2, 1 ]
[]
[]
[ ".net", ".net_3.5", "c#" ]
stackoverflow_0000009508_.net_.net_3.5_c#.txt
Q: Visual Studio 2008 Window layout annoyance I'm having a weird issue with Visual Studio 2008. Every time I fire it up, the solution explorer is about an inch wide. It's like it can't remember it's layout settings. Every un-docked window is in the position I place it. But if I dock a window, it's position is saved, ...
Visual Studio 2008 Window layout annoyance
I'm having a weird issue with Visual Studio 2008. Every time I fire it up, the solution explorer is about an inch wide. It's like it can't remember it's layout settings. Every un-docked window is in the position I place it. But if I dock a window, it's position is saved, but it's size will be reset to very-narrow (arou...
[ "I had the same problem. It turned out that if the VS window was non-maximized, it was really\nsmall. So after making the non-maximized wider, the problem disappeared.\n", "I occasionally get this bug, and others related to layout/fonts/colouring etc. A little trick I've found is use the Tools -> Import and Expor...
[ 11, 3, 0 ]
[]
[]
[ "visual_studio" ]
stackoverflow_0000009601_visual_studio.txt
Q: Bidirectional outer join Suppose we have a table A: itemid mark 1 5 2 3 and table B: itemid mark 1 3 3 5 I want to join A*B on A.itemid=B.itemid both right and left ways. i.e. result: itemid A.mark B.mark 1 5 3 2 3 NULL 3 NULL 5 Is there a way to do it in one query...
Bidirectional outer join
Suppose we have a table A: itemid mark 1 5 2 3 and table B: itemid mark 1 3 3 5 I want to join A*B on A.itemid=B.itemid both right and left ways. i.e. result: itemid A.mark B.mark 1 5 3 2 3 NULL 3 NULL 5 Is there a way to do it in one query in MySQL?
[ "It's called a full outer join and it's not supported natively in MySQL, judging from its docs. You can work around this limitation using UNION as described in the comments to the page I linked to.\n[edit] Since others posted snippets, here you go. You can see explanation on the linked page.\nSELECT *\nFROM A LEFT ...
[ 8, 2 ]
[ "This works for me on SQL Server:\nselect isnull(a.id, b.id), a.mark, b.mark\nfrom a \nfull outer join b on b.id = a.id\n\n" ]
[ -1 ]
[ "mysql", "sql" ]
stackoverflow_0000009614_mysql_sql.txt
Q: Validating a Win32 Window Handle Given a handle of type HWND is it possible to confirm that the handle represents a real window? A: There is a function IsWindow which does exactly what you asked for. BOOL isRealHandle = IsWindow(unknwodnHandle); Look at this link for more information. A: Generally no. By the ...
Validating a Win32 Window Handle
Given a handle of type HWND is it possible to confirm that the handle represents a real window?
[ "There is a function IsWindow which does exactly what you asked for.\nBOOL isRealHandle = IsWindow(unknwodnHandle);\n\nLook at this link for more information.\n", "Generally no. By the time you've got confirmation that a Window is valid another process/thread my come along and remove it for you.\n" ]
[ 16, 4 ]
[]
[]
[ "c++", "winapi", "windows" ]
stackoverflow_0000009667_c++_winapi_windows.txt
Q: Enterprise Library CacheFactory.GetCacheManager Throws Null Ref I'm trying to convert an application using the 1.1 version of the Enterprise Library Caching block over to the 2.0 version. I think where I'm really having a problem is that the configuration for the different EntLib pieces was split out over several...
Enterprise Library CacheFactory.GetCacheManager Throws Null Ref
I'm trying to convert an application using the 1.1 version of the Enterprise Library Caching block over to the 2.0 version. I think where I'm really having a problem is that the configuration for the different EntLib pieces was split out over several files. Apparently, this used to be handled by the ConfigurationMana...
[ "Looks like it was the configuration. I found a good example of the normal, one-file approach here: http://www.devx.com/dotnet/Article/31158/0/page/2\nUsing an external config file is actually trivial once you figure out the syntax for it. Ex.:\nIn Web.config:\n<cachingConfiguration configSource=\"cachingconfigu...
[ 4 ]
[]
[]
[ "c#", "configuration", "enterprise_library" ]
stackoverflow_0000009136_c#_configuration_enterprise_library.txt
Q: How to prevent the mouse cursor from being hidden after calling CComboBox::ShowDropDown? In my MFC application, when I call CComboBox::ShowDropDown(), the mouse cursor is hidden until interaction with the combo box completes (when the combo box loses focus.) It doesn't reappear when the mouse is moved, like it do...
How to prevent the mouse cursor from being hidden after calling CComboBox::ShowDropDown?
In my MFC application, when I call CComboBox::ShowDropDown(), the mouse cursor is hidden until interaction with the combo box completes (when the combo box loses focus.) It doesn't reappear when the mouse is moved, like it does with edit boxes. How can I keep the mouse cursor from being hidden?
[ "Call\nSetCursor(LoadCursor(NULL, IDC_ARROW));\nimmediately after the ShowDropDown() call.\n" ]
[ 2 ]
[]
[]
[ "ccombobox", "mfc", "mouse", "visibility" ]
stackoverflow_0000009704_ccombobox_mfc_mouse_visibility.txt
Q: Visual Studio 2005 Macros stop working when Visual Studio 2008 is installed I have a number of macros written for Visual Studio 2005, but they have since stopped working once I installed Visual Studio 2008 on my computer. No error is returned by the macro when I try and run it, and the environment merely shows the...
Visual Studio 2005 Macros stop working when Visual Studio 2008 is installed
I have a number of macros written for Visual Studio 2005, but they have since stopped working once I installed Visual Studio 2008 on my computer. No error is returned by the macro when I try and run it, and the environment merely shows the hourglass for a second and then returns to the normal cursor. Currently uninstal...
[ "You may need to install (reinstall) VS 2005 SP1, since a security update from Microsoft (KB928365) on July 10 may have caused the issue.\n" ]
[ 3 ]
[]
[]
[ "ide", "macros", "visual_studio", "visual_studio_2005", "visual_studio_2008" ]
stackoverflow_0000009693_ide_macros_visual_studio_visual_studio_2005_visual_studio_2008.txt
Q: How to obtain good concurrent read performance from disk I'd like to ask a question then follow it up with my own answer, but also see what answers other people have. We have two large files which we'd like to read from two separate threads concurrently. One thread will sequentially read fileA while the other thr...
How to obtain good concurrent read performance from disk
I'd like to ask a question then follow it up with my own answer, but also see what answers other people have. We have two large files which we'd like to read from two separate threads concurrently. One thread will sequentially read fileA while the other thread will sequentially read fileB. There is no locking or comm...
[ "The problem seems to be in Windows I/O scheduling policy. According to what I found here there are many ways for an O.S. to schedule disk requests. While Linux and others can choose between different policies, before Vista Windows was locked in a single policy: a FIFO queue, where all requests where splitted in 64...
[ 12, 6, 1, 0, 0, 0 ]
[]
[]
[ "file_io", "multithreading", "windows" ]
stackoverflow_0000009191_file_io_multithreading_windows.txt
Q: SharePoint - Connection String dialog box during FeatureActivated event Does anyone know if it is possible to display a prompt to a user/administrator when activating or installing a sharepoint feature? I am writing a custom webpart and it is connecting to a separate database, I would like to allow the administr...
SharePoint - Connection String dialog box during FeatureActivated event
Does anyone know if it is possible to display a prompt to a user/administrator when activating or installing a sharepoint feature? I am writing a custom webpart and it is connecting to a separate database, I would like to allow the administrator to select or type in a connection string when installing the .wsp file o...
[ "Unfortunately there is no way to swap to a screen where you can get user via the feature activation process. Couple of comments for you:\n\nI'm assuming the connection string is going to be different for every installation, so there is no way you can include it directly in the Solution. \nI'm assuming that you cou...
[ 1, 0 ]
[]
[]
[ "connection_string", "sharepoint" ]
stackoverflow_0000008849_connection_string_sharepoint.txt
Q: Calculate DateTime Weeks into Rows I am currently writing a small calendar in ASP.Net C#. Currently to produce the rows of the weeks I do the following for loop: var iWeeks = 6; for (int w = 0; w < iWeeks; w++) { This works fine, however, some month will only have 5 weeks and in some rare cases, 4. How can I calc...
Calculate DateTime Weeks into Rows
I am currently writing a small calendar in ASP.Net C#. Currently to produce the rows of the weeks I do the following for loop: var iWeeks = 6; for (int w = 0; w < iWeeks; w++) { This works fine, however, some month will only have 5 weeks and in some rare cases, 4. How can I calculate the number of rows that will be re...
[ "Here is the method that does it:\npublic int GetWeekRows(int year, int month)\n{\n DateTime firstDayOfMonth = new DateTime(year, month, 1);\n DateTime lastDayOfMonth = new DateTime(year, month, 1).AddMonths(1).AddDays(-1);\n System.Globalization.Calendar calendar = System.Threading.Thread.CurrentThread.Cu...
[ 6, 2, 0, 0, 0, 0, 0, 0, 0 ]
[]
[]
[ "asp.net", "c#" ]
stackoverflow_0000009805_asp.net_c#.txt
Q: Document Server: Handling Concurrent Saves I'm implementing a document server. Currently, if two users open the same document, then modify it and save the changes, the document's state will be undefined (either the first user's changes are saved permanently, or the second's). This is entirely unsatisfactory. I con...
Document Server: Handling Concurrent Saves
I'm implementing a document server. Currently, if two users open the same document, then modify it and save the changes, the document's state will be undefined (either the first user's changes are saved permanently, or the second's). This is entirely unsatisfactory. I considered two possibilities to solve this problem:...
[ "The first option you describe is essentially a pessimistic locking model whilst the second is an optimistic model.\nWhich one to choose really comes down to a number of factors but essentially boils down to how the business wants to work. For example, would it unduly inconvenience the users if a document they need...
[ 1, 0, 0 ]
[]
[]
[ "concurrency", "locking", "versioning" ]
stackoverflow_0000009675_concurrency_locking_versioning.txt
Q: Access a SQL Server 2005 Express Edition from a network computer How do you access a SQL Server 2005 Express Edition from a application in a network computer? The access I need is both from application (Linq-to-SQL and ODBC) and from Management Studio A: See this KB Article. How to configure SQL Server 2005 to a...
Access a SQL Server 2005 Express Edition from a network computer
How do you access a SQL Server 2005 Express Edition from a application in a network computer? The access I need is both from application (Linq-to-SQL and ODBC) and from Management Studio
[ "See this KB Article. How to configure SQL Server 2005 to allow remote connections.\nOh, and remember that the SQLServer name will probably be MyMachineName\\SQLExpress\n", "If you're running it on a 2k3 box, you need to install all updates for Sql Server and the 2003 server. \nCheck the event logs after you sta...
[ 5, 1 ]
[]
[]
[ "sql_server", "sql_server_2005_express" ]
stackoverflow_0000009383_sql_server_sql_server_2005_express.txt
Q: What do you look for from a User Group? I'm in the process of starting a User Group in my area related to .NET development. The format of the community will be the average free food, presentation, and then maybe free swag giveaway. What would you, as a member of a user community, look for in order to keep you com...
What do you look for from a User Group?
I'm in the process of starting a User Group in my area related to .NET development. The format of the community will be the average free food, presentation, and then maybe free swag giveaway. What would you, as a member of a user community, look for in order to keep you coming back month to month?
[ "I always like talks on different subjects. The real hard thing about talking to a specialized community is keeping the detail level high and the scope narrow. What's the point of talking to a bunch of .NET programmers about the benefits of Polymorphism? It always kills me when I go to a meeting on a particular ...
[ 4, 4, 1 ]
[]
[]
[ ".net" ]
stackoverflow_0000009977_.net.txt
Q: What is a good way to open large files across a WAN? I have an application deployed into multiple zones and there are some issues with opening larger documents (20-50MB) across the WAN. Currently the documents are stored in Zone 1 (Americas) and a link stored in the database to the docs. I have heard some thin...
What is a good way to open large files across a WAN?
I have an application deployed into multiple zones and there are some issues with opening larger documents (20-50MB) across the WAN. Currently the documents are stored in Zone 1 (Americas) and a link stored in the database to the docs. I have heard some things about blobs in oracle and store binary in MS SQL Server...
[ "Your best option here may be caching the document in the requested zone the first time it is requested, and pinging the source document's last modified each time the cached document is requested in order to determine if it needs refreshed. In this case you're only requesting a small piece of information (a date) a...
[ 2, 1 ]
[]
[]
[ "database", "oracle", "sql_server" ]
stackoverflow_0000009932_database_oracle_sql_server.txt
Q: .NET: How do I find the Desktop path when Folder Redirection is on? I have been using Environment.GetFolderPath(Environment.SpecialFolder.Desktop) to get the path to the user's desktop for ages now, but since we changed our setup here at work so we use Folder Redirection to map our users' Desktop and My Docume...
.NET: How do I find the Desktop path when Folder Redirection is on?
I have been using Environment.GetFolderPath(Environment.SpecialFolder.Desktop) to get the path to the user's desktop for ages now, but since we changed our setup here at work so we use Folder Redirection to map our users' Desktop and My Documents folders to the server, it no-longer works. It still points to the De...
[ "You need to use the DesktopDirectory special folder instead:\nEnvironment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)\nshould give you the redirected directory.\n" ]
[ 9 ]
[]
[]
[ ".net" ]
stackoverflow_0000010043_.net.txt
Q: Use for the phppgadmin Reports Database? Phppgadmin comes with instructions for creating a reports database on the system for use with phppgadmin. The instructions describe how to set it up, but do not really give any indication of what its purpose is, and the phppgadmin site was not very helpful either. It seems ...
Use for the phppgadmin Reports Database?
Phppgadmin comes with instructions for creating a reports database on the system for use with phppgadmin. The instructions describe how to set it up, but do not really give any indication of what its purpose is, and the phppgadmin site was not very helpful either. It seems to allow you to store SQL queries, so is it fo...
[ "This is just a standard location to store frequently used SQL scripts. The reports-pgsql.sql script creates a table for storing these queries, the database they are intended to be run on, a title and some descriptive text about what they do. PhpPgAdmin has functionality to browse and execute these reports. It's...
[ 6 ]
[]
[]
[ "database", "php", "phppgadmin", "postgresql" ]
stackoverflow_0000008894_database_php_phppgadmin_postgresql.txt
Q: Where is TFS work item help text displayed? I'm creating some custom work items in TFS and the helptext field seems handy but I don't see where it is being displayed in Team Explorer or Team System Web Access. Where is this information displayed? A: When you hover over the type of the field. For instance crea...
Where is TFS work item help text displayed?
I'm creating some custom work items in TFS and the helptext field seems handy but I don't see where it is being displayed in Team Explorer or Team System Web Access. Where is this information displayed?
[ "When you hover over the type of the field. For instance create a new bug and hover over the \"rank\" and you should see \"Stack rank used to prioritize work\"\n" ]
[ 2 ]
[]
[]
[ "tfs", "visual_studio" ]
stackoverflow_0000010088_tfs_visual_studio.txt
Q: C#.Net case-insensitive string Why does C#.Net allow the declaration of the string object to be case-insensitive? String sHello = "Hello"; string sHello = "Hello"; Both the lower-case and upper-case S of the word String are acceptable and this seems to be the only object that allows this. Can anyone explain why? ...
C#.Net case-insensitive string
Why does C#.Net allow the declaration of the string object to be case-insensitive? String sHello = "Hello"; string sHello = "Hello"; Both the lower-case and upper-case S of the word String are acceptable and this seems to be the only object that allows this. Can anyone explain why?
[ "string is a language keyword while System.String is the type it aliases.\nBoth compile to exactly the same thing, similarly:\n\nint is System.Int32\nlong is System.Int64\nfloat is System.Single\ndouble is System.Double\nchar is System.Char\nbyte is System.Byte\nshort is System.Int16\nushort is System.UInt16\nuint ...
[ 21, 6, 2, 1, 1, 0, 0 ]
[]
[]
[ ".net", "c#" ]
stackoverflow_0000009734_.net_c#.txt
Q: Interfaces on different logic layers Say you have an application divided into 3-tiers: GUI, business logic, and data access. In your business logic layer you have described your business objects: getters, setters, accessors, and so on... you get the idea. The interface to the business logic layer guarantees safe u...
Interfaces on different logic layers
Say you have an application divided into 3-tiers: GUI, business logic, and data access. In your business logic layer you have described your business objects: getters, setters, accessors, and so on... you get the idea. The interface to the business logic layer guarantees safe usage of the business logic, so all the met...
[ "If I understand the question correctly, you've created a domain model and you would like to write an object-relational mapper to map between records in your database and your domain objects. However, you're concerned about polluting your domain model with the 'plumbing' code that would be necessary to read and wri...
[ 7, 5, 1, 0, 0, 0, 0, 0, 0 ]
[]
[]
[ "architecture" ]
stackoverflow_0000009240_architecture.txt
Q: Multithreading Design Best Practice Consider this problem: I have a program which should fetch (let's say) 100 records from a database, and then for each one it should get updated information from a web service. There are two ways to introduce parallelism in this scenario: I start each request to the web service ...
Multithreading Design Best Practice
Consider this problem: I have a program which should fetch (let's say) 100 records from a database, and then for each one it should get updated information from a web service. There are two ways to introduce parallelism in this scenario: I start each request to the web service on a new Thread. The number of simultaneo...
[ "Option 3 is the best:\nUse Async IO.\nUnless your request processing is complex and heavy, your program is going to spend 99% of it's time waiting for the HTTP requests.\nThis is exactly what Async IO is designed for - Let the windows networking stack (or .net framework or whatever) worry about all the waiting, an...
[ 6, 2, 0, 0 ]
[]
[]
[ ".net", "multithreading" ]
stackoverflow_0000010229_.net_multithreading.txt
Q: Regex Rejecting matches because of Instr What's the easiest way to do an "instring" type function with a regex? For example, how could I reject a whole string because of the presence of a single character such as :? For example: this - okay there:is - not okay because of : More practically, how can I match the ...
Regex Rejecting matches because of Instr
What's the easiest way to do an "instring" type function with a regex? For example, how could I reject a whole string because of the presence of a single character such as :? For example: this - okay there:is - not okay because of : More practically, how can I match the following string: //foo/bar/baz[1]/ns:foo2/@a...
[ "I'm still not sure whether you just wanted to detect if the Xpath contains a namespace, or whether you want to remove the references to the namespace. So here's some sample code (in C#) that does both.\nclass Program\n{\n static void Main(string[] args)\n {\n string withNamespace = @\"//foo/ns2:bar/ba...
[ 2, 1, 0, 0, 0 ]
[]
[]
[ "regex", "xpath" ]
stackoverflow_0000010158_regex_xpath.txt
Q: Using C# with OpenOffice through reflection I'm working on some code to paste into the currently active OpenOffice document directly from C#. I can't include any of the OpenOffice libraries, because we don't want to package them, so we're using reflection to get access to the OpenOffice API. My question involves ...
Using C# with OpenOffice through reflection
I'm working on some code to paste into the currently active OpenOffice document directly from C#. I can't include any of the OpenOffice libraries, because we don't want to package them, so we're using reflection to get access to the OpenOffice API. My question involves using a dispatcher through reflection. I can't f...
[ "Is it just me or are your parameters the wrong way around? Also, do you have the right number of parameters? I could be missing something though, so sorry if you've already checked this stuff:\nThe documentation says:\ndispatcher.executeDispatch(document, \".uno:Paste\", \"\", 0, Array())\n\nWhich would indicate t...
[ 1 ]
[]
[]
[ "c#", "reflection" ]
stackoverflow_0000010531_c#_reflection.txt
Q: Asynchronous Remoting calls We have a remoting singleton server running in a separate windows service (let's call her RemotingService). The clients of the RemotingService are ASP.NET instances (many many). Currently, the clients remoting call RemotingService and blocks while the RemotingService call is serviced. H...
Asynchronous Remoting calls
We have a remoting singleton server running in a separate windows service (let's call her RemotingService). The clients of the RemotingService are ASP.NET instances (many many). Currently, the clients remoting call RemotingService and blocks while the RemotingService call is serviced. However, the remoting service is g...
[ "The idea behind using the ThreadPool is that through it you can control the amount of synchronous threads, and if those get too many, then the thread pool automatically manages the waiting of newer threads.\nThe Asp.Net worked thread (AFAIK) doesn't come from the Thread Pool and shouldn't get affected by your call...
[ 0 ]
[]
[]
[ ".net_2.0", ".net_3.5", "c#", "remoting", "rpc" ]
stackoverflow_0000010670_.net_2.0_.net_3.5_c#_remoting_rpc.txt
Q: Best way to abstract season/show/episode data Basically, I've written an API to www.thetvdb.com in Python. The current code can be found here. It grabs data from the API as requested, and has to store the data somehow, and make it available by doing: print tvdbinstance[1][23]['episodename'] # get the name of episo...
Best way to abstract season/show/episode data
Basically, I've written an API to www.thetvdb.com in Python. The current code can be found here. It grabs data from the API as requested, and has to store the data somehow, and make it available by doing: print tvdbinstance[1][23]['episodename'] # get the name of episode 23 of season 1 What is the "best" way to abstra...
[ "OK, what you need is classobj from new module. That would allow you to construct exception classes dynamically (classobj takes a string as an argument for the class name). \nimport new\nmyexc=new.classobj(\"ExcName\",(Exception,),{})\ni=myexc(\"This is the exc msg!\")\nraise i\n\nthis gives you:\nTraceback (most r...
[ 7, 4, 0, 0, 0 ]
[]
[]
[ "data_structures", "python" ]
stackoverflow_0000005966_data_structures_python.txt
Q: Best format for displaying rendered time on a webpage I've started to add the time taken to render a page to the footer of our internal web applications. Currently it appears like this Rendered in 0.062 seconds Occasionally I get rendered times like this Rendered in 0.000 seconds Currently it's only meant to b...
Best format for displaying rendered time on a webpage
I've started to add the time taken to render a page to the footer of our internal web applications. Currently it appears like this Rendered in 0.062 seconds Occasionally I get rendered times like this Rendered in 0.000 seconds Currently it's only meant to be a guide for users to judge whether a page is quick to loa...
[ "\"Rendered instantly\" sounds way better than \"Rendered in less than a second\".\n", "Rather than relying on your users to look at the page footer and to let you know if the value exceeds some patience threshold, it might be a better idea to log the page render times in a log file on the server. Once you have a...
[ 2, 1, 1, 0 ]
[]
[]
[ "render" ]
stackoverflow_0000008624_render.txt
Q: Fast database access test from .NET What would be a very fast way to determine if your connectionstring lets you connect to a database? Normally a connection attempt keeps the user waiting a long time before notifying the attempt was futile anyway. A: You haven't mentioned what database you are connecting to, ho...
Fast database access test from .NET
What would be a very fast way to determine if your connectionstring lets you connect to a database? Normally a connection attempt keeps the user waiting a long time before notifying the attempt was futile anyway.
[ "You haven't mentioned what database you are connecting to, however. In SQL Server 2005, from .NET, you can specify a connection timeout in your connection string like so:\nserver=<server>;database=<database>;uid=<user>;password=<password>;Connect Timeout=3\n\nThis will try to connect to the server and if it doesn'...
[ 11, 2 ]
[]
[]
[ ".net", "connection", "connection_string", "database" ]
stackoverflow_0000010822_.net_connection_connection_string_database.txt
Q: Data Layer Best Practices I am in the middle of a "discussion" with a colleague about the best way to implement the data layer in a new application. One viewpoint is that the data layer should be aware of business objects (our own classes that represent an entity), and be able to work with that object natively. ...
Data Layer Best Practices
I am in the middle of a "discussion" with a colleague about the best way to implement the data layer in a new application. One viewpoint is that the data layer should be aware of business objects (our own classes that represent an entity), and be able to work with that object natively. The opposing viewpoint is that ...
[ "It really depends on your view of the world - I used to be in the uncoupled camp. The DAL was only there to supply data to the BAL - end of story.\nWith emerging technologies such as Linq to SQL and Entity Framework becoming a bit more popular, then the line between DAL and BAL have been blurred a bit. In L2S espe...
[ 5, 3, 1, 0, 0, 0 ]
[]
[]
[ ".net", "n_tier_architecture" ]
stackoverflow_0000010860_.net_n_tier_architecture.txt
Q: What libraries do I need to link my mixed-mode application to? I'm integrating .NET support into our C++ application. It's an old-school MFC application, with 1 extra file compiled with the "/clr" option that references a CWinFormsControl. I'm not allowed to remove the linker flag "/NODEFAULTLIB". (We have our own...
What libraries do I need to link my mixed-mode application to?
I'm integrating .NET support into our C++ application. It's an old-school MFC application, with 1 extra file compiled with the "/clr" option that references a CWinFormsControl. I'm not allowed to remove the linker flag "/NODEFAULTLIB". (We have our own build management system, not Visual Studio's.) This means I have to...
[ "As a bare minimum:\nmscoree.lib\nMSVCRT.lib\nmfc90.lib (adjust version appropriately)\nAnd iterate from there.\n", "Use the AppWizard to create a bare-bones MFC app in your style (SDI / MDI / dialog ) and then put on your depends.\n", "How I solved it: \n\nlink with \"/FORCE:MULTIPLE /verbose\" (that links ok)...
[ 1, 1, 1 ]
[]
[]
[ "c++_cli", "linker", "mixed_mode" ]
stackoverflow_0000009570_c++_cli_linker_mixed_mode.txt
Q: Best way to connect To Sql Server with MFC Soooo, I am starting this new job soon where most of the code is legacy MFC. The end goal is to convert/rewrite to C#. I'm a little rusty with MFC so writing some code so I can try and spark my memory. Anyway, was wondering the best way to connect to a SS2005 database wit...
Best way to connect To Sql Server with MFC
Soooo, I am starting this new job soon where most of the code is legacy MFC. The end goal is to convert/rewrite to C#. I'm a little rusty with MFC so writing some code so I can try and spark my memory. Anyway, was wondering the best way to connect to a SS2005 database with MFC. Back in the day CDatabase via ODBC was th...
[ "The ATL consumer templates for OleDb are an option - start here. The ClassWizard is still there to assist you so the verbosity isn't too much of a hurdle at first. Very soon you will need to hand-code though. There is a lot of careful twiddling, for example ensuring that your command string has exactly the right n...
[ 2 ]
[]
[]
[ "mfc", "sql_server" ]
stackoverflow_0000010891_mfc_sql_server.txt
Q: How do you measure SQL Fill Factor value Usually when I'm creating indexes on tables, I generally guess what the Fill Factor should be based on an educated guess of how the table will be used (many reads or many writes). Is there a more scientific way to determine a more accurate Fill Factor value? A: You could ...
How do you measure SQL Fill Factor value
Usually when I'm creating indexes on tables, I generally guess what the Fill Factor should be based on an educated guess of how the table will be used (many reads or many writes). Is there a more scientific way to determine a more accurate Fill Factor value?
[ "You could try running a big list of realistic operations and looking at IO queues for the different actions.\nThere are a lot of variables that govern it, such as the size of each row and the number of writes vs reads.\nBasically: high fill factor = quicker read, low = quicker write.\nHowever it's not quite that s...
[ 12, 2 ]
[]
[]
[ "fillfactor", "sql_server" ]
stackoverflow_0000010919_fillfactor_sql_server.txt
Q: What is a "reasonable" length of time to keep a SQL cursor open? In your applications, what's a "long time" to keep a transaction open before committing or rolling back? Minutes? Seconds? Hours? and on which database? A: I'm probably going to get flamed for this, but you really should try and avoid using curs...
What is a "reasonable" length of time to keep a SQL cursor open?
In your applications, what's a "long time" to keep a transaction open before committing or rolling back? Minutes? Seconds? Hours? and on which database?
[ "I'm probably going to get flamed for this, but you really should try and avoid using cursors as they incur a serious performance hit. If you must use it, you should keep it open the absolute minimum amount of time possible so that you free up the resources being blocked by the cursor ASAP.\n", "transactions: mi...
[ 8, 5, 3, 2, 2 ]
[]
[]
[ "cursors", "sql" ]
stackoverflow_0000010727_cursors_sql.txt
Q: Future proofing a large UI Application - MFC with 2008 Feature pack, or C# and Winforms? My company has developed a long standing product using MFC in Visual C++ as the defacto standard for UI development. Our codebase contains ALOT of legacy/archaic code which must be kept operational. Some of this code is older ...
Future proofing a large UI Application - MFC with 2008 Feature pack, or C# and Winforms?
My company has developed a long standing product using MFC in Visual C++ as the defacto standard for UI development. Our codebase contains ALOT of legacy/archaic code which must be kept operational. Some of this code is older than me (originally written in the late 70s) and some members of our team are still on Visual ...
[ "I'm a developer on an app that has a ton of legacy MFC code, and we have all of your same concerns. A big driver for our strategy was to eliminate as much risk and uncertainty as we could, which meant avoiding The Big Rewrite. As we all know, TBR fails most of the time. So we chose an incremental approach that all...
[ 9, 2, 2, 2, 1, 0 ]
[]
[]
[ "c#", "c++", "mfc", "user_interface", "winforms" ]
stackoverflow_0000010901_c#_c++_mfc_user_interface_winforms.txt
Q: MS Team Foundation Server in distributed environments - hints tips tricks needed Is anyone out there using Team Foundation Server within a team that is geographically distributed? We're in the UK, trying work with a team in Australia and we're finding it quite tough. Our main two issues are: Things are being che...
MS Team Foundation Server in distributed environments - hints tips tricks needed
Is anyone out there using Team Foundation Server within a team that is geographically distributed? We're in the UK, trying work with a team in Australia and we're finding it quite tough. Our main two issues are: Things are being checked out to us without us asking on a get latest. Even when using a proxy, most thin...
[ "Definitely upgrade to TFS 2008 and Visual Studio 2008, as it is the \"v2\" version of Team System in every way. Fixes lots of small and medium sized problems.\nAs for \"things being randomly checked out\" this is almost always due to Visual Studio deciding to edit files on your behalf. Try getting latest from the ...
[ 2, 1, 0 ]
[]
[]
[ "tfs", "visual_studio" ]
stackoverflow_0000010999_tfs_visual_studio.txt
Q: ASP.NET Caching Recently I have been investigating the possibilities of caching in ASP.NET. I rolled my own "Cache", because I didn't know any better, it looked a bit like this: public class DataManager { private static DataManager s_instance; public static DataManager GetInstance() { } ...
ASP.NET Caching
Recently I have been investigating the possibilities of caching in ASP.NET. I rolled my own "Cache", because I didn't know any better, it looked a bit like this: public class DataManager { private static DataManager s_instance; public static DataManager GetInstance() { } private Data[] ...
[ "I think the maxim \"let the computer do it; it's smarter than you\" applies here. Just like memory management and other complicated things, the computer is a lot more informed about what it's doing than your are; consequently, able to get more performance than you are.\nMicrosoft has had a team of engineers workin...
[ 4, 2, 1 ]
[]
[]
[ "asp.net", "caching", "sql" ]
stackoverflow_0000011141_asp.net_caching_sql.txt
Q: Best way to model Many-To-One Relationships in NHibernate When Dealing With a Legacy DB? Warning - I am very new to NHibernate. I know this question seems simple - and I'm sure there's a simple answer, but I've been spinning my wheels for some time on this one. I am dealing with a legacy db which really can't be a...
Best way to model Many-To-One Relationships in NHibernate When Dealing With a Legacy DB?
Warning - I am very new to NHibernate. I know this question seems simple - and I'm sure there's a simple answer, but I've been spinning my wheels for some time on this one. I am dealing with a legacy db which really can't be altered structurally. I have a details table which lists payment plans that have been accepted ...
[ "I'd steer away from having child object containing their logical parent, it can get very messy and very recursive pretty quickly when you do that. I'd take a look at how you're intending to use the domain model before you do that sort of thing. You can easily still have the ID references in the tables and just l...
[ 3, 1, 0, 0, 0, 0 ]
[]
[]
[ "c#", "nhibernate" ]
stackoverflow_0000010915_c#_nhibernate.txt
Q: How to create a tree-view preferences dialog type of interface in C#? I'm writing an application that is basically just a preferences dialog, much like the tree-view preferences dialog that Visual Studio itself uses. The function of the application is simply a pass-through for data from a serial device to a file. ...
How to create a tree-view preferences dialog type of interface in C#?
I'm writing an application that is basically just a preferences dialog, much like the tree-view preferences dialog that Visual Studio itself uses. The function of the application is simply a pass-through for data from a serial device to a file. It performs many, many transformations on the data before writing it to the...
[ "A tidier way is to create separate forms for each 'pane' and, in each form constructor, set\nthis.TopLevel = false;\nthis.FormBorderStyle = FormBorderStyle.None;\nthis.Dock = DockStyle.Fill;\n\nThat way, each of these forms can be laid out in its own designer, instantiated one or more times at runtime, and added t...
[ 11, 2, 0 ]
[]
[]
[ "c#", "user_interface" ]
stackoverflow_0000003725_c#_user_interface.txt
Q: How to run remote shell scripts from ASP pages? I need to create an ASP page (classic, not ASP.NET) which runs remote shell scripts on a UNIX server, then captures the output into variables in VBScript within the page itself. I have never done ASP or VBScipt before. I have tried to google this stuff, but all I fin...
How to run remote shell scripts from ASP pages?
I need to create an ASP page (classic, not ASP.NET) which runs remote shell scripts on a UNIX server, then captures the output into variables in VBScript within the page itself. I have never done ASP or VBScipt before. I have tried to google this stuff, but all I find are references to remote server side scripting, not...
[ "If the shell scripts are normally run on a telnet session then you could screen scrape and parse the responses. There are commercial COM components out there such as the Dart telnet library: http://www.dart.com/pttel.aspx that would let you do this.\nEither that or you could roll your own using AspSock http://www....
[ 0, 0 ]
[]
[]
[ "asp_classic", "vbscript" ]
stackoverflow_0000011135_asp_classic_vbscript.txt
Q: Automatically incremented revision number doesn't show up in the About Box I have a small VB.NET application that I'm working on using the full version of Visual Studio 2005. In the Publish properties of the project, I have it set to Automatically increment revision with each publish. The issue is that it's only i...
Automatically incremented revision number doesn't show up in the About Box
I have a small VB.NET application that I'm working on using the full version of Visual Studio 2005. In the Publish properties of the project, I have it set to Automatically increment revision with each publish. The issue is that it's only incrementing the revision in the Setup files. It doesn't seem to be updating the ...
[ "Change the code for the About box to \nMe.LabelVersion.Text = String.Format(\"Version {0}\", My.Application.Deployment.CurrentVersion.ToString)\n\nPlease note that all the other answers are correct for \"how do I get my assembly version\", not the stated question \"how do I show my publish version\".\n", "It too...
[ 1, 1, 0, 0, 0 ]
[]
[]
[ "vb.net", "visual_studio" ]
stackoverflow_0000011279_vb.net_visual_studio.txt
Q: How to encourage someone to learn programming? I have a friend that has a little bit of a holiday coming up and they want ideas on what they should do during the holiday, I plan to suggest programming to them, what are the pros and cons that I need to mention? I'll add to the list below as people reply, I apologis...
How to encourage someone to learn programming?
I have a friend that has a little bit of a holiday coming up and they want ideas on what they should do during the holiday, I plan to suggest programming to them, what are the pros and cons that I need to mention? I'll add to the list below as people reply, I apologise if I duplicate any entries. Pros I have so far Mi...
[ "I do it for the ladies :D\nSeriously though, for me\nPro's\n\nGreat challenge, every day really is a fresh challenge in some way, shape or form. Not many jobs can truly offer that.\nI like the way it makes me think.. I look at EVERYTHING more logically as my skills improve.. This helps with general living as well ...
[ 8, 6, 3, 3, 2, 1, 1, 0 ]
[]
[]
[ "language_agnostic" ]
stackoverflow_0000010872_language_agnostic.txt
Q: How to host a WPF form in a MFC application I'm looking for any resources on hosting a WPF form within an existing MFC application. Can anyone point me in the right direction on how to do this? A: From what I understand (haven't tried myself), it's almost as simple as just giving the WPF control the parent's ha...
How to host a WPF form in a MFC application
I'm looking for any resources on hosting a WPF form within an existing MFC application. Can anyone point me in the right direction on how to do this?
[ "From what I understand (haven't tried myself), it's almost as simple as just giving the WPF control the parent's handle. Here's a Walkthrough: Hosting WPF Content in Win32.\n" ]
[ 5 ]
[]
[]
[ "c#", "mfc", "wpf" ]
stackoverflow_0000011423_c#_mfc_wpf.txt