instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I have a DataGridView with one DataGridViewComboBoxColumn in my WinForms application. I need to drop down (open) this DataGridViewComboBoxColumn manually, let's say after a button is clicked. The reason I need this is I have set SelectionMode to FullRowSelect and I need to click 2-3 times to open the combo box. I want ...
To programmatically drop down the `DataGridViewComboBoxColumn` in a `DataGridView`, you'll need to handle the cell click event for that specific column and then manually invoke the drop-down. Unfortunately, there isn't a direct method to open the dropdown of a combo box cell, but you can achieve this by handling the `E...
26,572
[ { "from": "human", "value": "I have a DataGridView with one DataGridViewComboBoxColumn in my WinForms application. I need to drop down (open) this DataGridViewComboBoxColumn manually, let's say after a button is clicked.\nThe reason I need this is I have set SelectionMode to FullRowSelect and I need to clic...
I am looking for an addon that can say characters vocally. It is for non-commercial use, and it would be nice if it can vocalize more languages, like asian, english etc... I have googled it, but can't seem to find anything for free use. Update: This is for web use
If you're looking for a free web-based text-to-speech (TTS) solution that can vocalize characters in multiple languages, including English and various Asian languages, here are some options you might find useful: 1. **Google Text-to-Speech API**: Google provides a TTS API that supports a wide range of languages. While...
26,637
[ { "from": "human", "value": "I am looking for an addon that can say characters vocally. It is for non-commercial use, and it would be nice if it can vocalize more languages, like asian, english etc...\nI have googled it, but can't seem to find anything for free use.\nUpdate: This is for web use\n" }, { ...
I am just starting to fiddle with Excel via C# to be able to automate the creation, and addition to an Excel file. I can open the file and update its data and move through the existing worksheets. My problem is how can I add new sheets? I tried: Excel.Worksheet newWorksheet; newWorksheet = (Excel.Worksheet)excelApp.Thi...
It looks like you're trying to add a new worksheet to an existing workbook in Excel using C#. The issue you're encountering with the COM Exception `HRESULT: 0x800A03EC` typically arises from incorrect references or misuse of the Excel interop API. Here’s a refined approach to add a new worksheet to an existing workboo...
26,615
[ { "from": "human", "value": "I am just starting to fiddle with Excel via C# to be able to automate the creation, and addition to an Excel file.\nI can open the file and update its data and move through the existing worksheets. My problem is how can I add new sheets?\nI tried:\nExcel.Worksheet newWorksheet;\...
How do you change the CLASSPATH of a Java process from within the Java process? Before you ask me "Why would you want to do that?" I'll explain it shortly. When you have a Clojure REPL running it is common to need more jars in your CLASSPATH to load a Clojure source file, and I'd like to do it without having to rest...
Changing the `CLASSPATH` of a running Java process is not straightforward because the `CLASSPATH` is set when the JVM starts and it is not meant to be changed dynamically. However, there are some workarounds that you can use to achieve a similar effect. ### Possible Workarounds 1. **Dynamic Class Loading**: Instead o...
26,797
[ { "from": "human", "value": "How do you change the CLASSPATH of a Java process from within the Java process?\n\nBefore you ask me \"Why would you want to do that?\" I'll explain it shortly. \n\nWhen you have a Clojure REPL running it is common to need more jars in your CLASSPATH to load a Clojure source fil...
I am trying to setup tracd for the project I am currently working on. After creating a password file with the python script given in the site I am trying to start the server with authentication on. But it throws up warning saying No users found in the realm. What actually is a realm - I tried using trac as the value an...
In the context of Trac, a "realm" is a specific identifier that is used for grouping users and authentication. It allows you to define different sets of users for different parts of your application or different projects. When you set up authentication using a password file with `tracd`, the realm must match the one us...
27,113
[ { "from": "human", "value": "I am trying to setup tracd for the project I am currently working on.\nAfter creating a password file with the python script given in the site I am trying to start the server with authentication on. But it throws up warning saying No users found in the realm. What actually is a ...
My programming environment includes scripts for setting up my autobuild on a clean machine. One step uses a vbscript to configure a website on IIS that is used to monitor the build. On a particular machine I will be running apache on port 80 for a separate task. I would like my vbscript to set the port to 8080 for the ...
You can use VBScript to configure a website on IIS to use port 8080 instead of the default port 80. Below is an example of how you can create a VBScript that does this. This script assumes you have the appropriate permissions to create and modify websites in IIS. Here's a sample VBScript for creating a new website on ...
28,989
[ { "from": "human", "value": "My programming environment includes scripts for setting up my autobuild on a clean machine.\nOne step uses a vbscript to configure a website on IIS that is used to monitor the build.\nOn a particular machine I will be running apache on port 80 for a separate task.\nI would like ...
This drop down list, displaying all the files from a folder, one of which will be selected for use. Is there a way to show which file is selected when you load the page? At the moment it says "select a file" every time. <select name="image" type="text" class="box" id="image" value="<?=$image;?>"> <option value='empty'>...
To display a selected file in your dropdown list when the page loads, you need to set the `selected` attribute on the corresponding `<option>` tag. This can be achieved by comparing each file with the `$image` variable that presumably holds the name of the currently selected file. Here’s how you can modify your existi...
27,616
[ { "from": "human", "value": "This drop down list, displaying all the files from a folder, one of which will be selected for use. Is there a way to show which file is selected when you load the page? At the moment it says \"select a file\" every time.\n<select name=\"image\" type=\"text\" class=\"box\" id=\"...
Our testers are in the process of evaluating Visual Studio Team System 2008 Test Edition. As they are unfamiliar with the use of Visual Studio, I would like to give them as much help as I can. I have had a look on Amazon for books on the Test edition of VS.Net, but there is only one VS.Net 2005 test edition book. Does ...
While resources specifically dedicated to Visual Studio Team System 2008 Test Edition may be limited compared to more recent versions of Visual Studio, there are still several avenues you can explore to help your testers get acquainted with it: ### Books: 1. **"Professional Visual Studio Team System" by Bruce F. Tagga...
30,439
[ { "from": "human", "value": "Our testers are in the process of evaluating Visual Studio Team System 2008 Test Edition. As they are unfamiliar with the use of Visual Studio, I would like to give them as much help as I can.\nI have had a look on Amazon for books on the Test edition of VS.Net, but there is onl...
I need a little help on this subject. I have a Web application written in ASP.NET plus I have the .bak file of the SQL Express database, my question is: How can I install this in a simple click and go way in the client? how can I write a script that will create a new database, restore the bak file into that database, s...
Certainly! Automating the deployment of an ASP.NET application along with its SQL Server database can greatly simplify your process. Below is a script that covers the key steps for setting up your environment, which includes creating a new database, restoring from a `.bak` file, and configuring IIS. This example assume...
22,668
[ { "from": "human", "value": "I need a little help on this subject.\nI have a Web application written in ASP.NET plus I have the .bak file of the SQL Express database, my question is: How can I install this in a simple click and go way in the client?\nhow can I write a script that will create a new database,...
Connection.close() may throw SqlException, but I have always assumed that it is safe to ignore any such exceptions (and I have never seen code that does not ignore them). Normally I would write: try{ connection.close(); }catch(Exception e) {} Or try{ connection.close(); }catch(Exception e) { logger....
Ignoring exceptions is generally considered bad practice in programming, and that applies to `Connection.close()` as well. While it may seem harmless to disregard exceptions when closing a database connection, there are several reasons why this is not advisable: ### Why Ignoring Exceptions is Bad Practice: 1. **Debug...
25,433
[ { "from": "human", "value": "Connection.close() may throw SqlException, but I have always assumed that it is safe to ignore any such exceptions (and I have never seen code that does not ignore them). \nNormally I would write:\n try{\n connection.close();\n }catch(Exception e) {}\n\nOr \n try{\n connec...
Object-relational mapping has been well discussed, including on here. I have experience with a few approaches and the pitfalls and compromises. True resolution seems like it requires changes to the OO or relational models themselves. If using a functional language, does the same problem present itself? It seems to m...
The interplay between functional programming languages and relational databases is indeed an interesting topic, and many developers and researchers have explored how these paradigms can work together effectively. Here are some insights and thoughts on this subject: ### Compatibility of Functional Paradigms with RDBMS ...
24,413
[ { "from": "human", "value": "Object-relational mapping has been well discussed, including on here. I have experience with a few approaches and the pitfalls and compromises. True resolution seems like it requires changes to the OO or relational models themselves.\nIf using a functional language, does the s...
I am trying to get a definitive answer regarding the way COM behaves on a x64 machine. Does Windows use the normal x64 calling convention when dispatching calls to COM interfaces on x64 machines (assuming the COM implementation is 64 bits)? Specifically, I dynamically generate my vtbl entries to point to a chunk of ass...
Yes, when you are working with COM (Component Object Model) on a 64-bit Windows machine, the standard x64 calling convention is indeed used for dispatching calls to COM interfaces, assuming that the COM implementation is also 64-bit. ### x64 Calling Convention Overview On x64 Windows systems, the calling convention u...
25,494
[ { "from": "human", "value": "I am trying to get a definitive answer regarding the way COM behaves on a x64 machine. Does Windows use the normal x64 calling convention when dispatching calls to COM interfaces on x64 machines (assuming the COM implementation is 64 bits)? Specifically, I dynamically generate m...
I'd like to invoke bash using a string as input. Something like: sh -l -c "./foo" I'd like to do this from Java. Unfortunately, when I try to invoke the command using getRuntime().exec, I get the following error: foo": -c: line 0: unexpected EOF while looking for matching `"' foo": -c: line 1: syntax er...
The issue you are encountering with `getRuntime().exec` in Java is likely due to how the command is being constructed and passed to the shell. The `-c` option tells the shell to execute the commands that follow it, but if the command is not formatted correctly, it can lead to syntax errors. Here are a few approaches y...
28,388
[ { "from": "human", "value": "I'd like to invoke bash using a string as input. Something like:\nsh -l -c \"./foo\"\n\nI'd like to do this from Java. Unfortunately, when I try to invoke the command using getRuntime().exec, I get the following error: \n foo\": -c: line 0: unexpected EOF while looking for...
If its dead, is there a successor? For those who didn't know: The Network News Transfer Protocol or NNTP is an Internet application protocol used primarily for reading and posting Usenet articles (aka netnews), as well as transferring news among news servers.
The Network News Transfer Protocol (NNTP) has indeed seen a decline in usage as the landscape of internet communication has evolved. With the rise of modern social media platforms, blogs, and other forms of instant communication, traditional Usenet newsgroups have lost much of their user base. While NNTP itself does ...
30,150
[ { "from": "human", "value": "If its dead, is there a successor?\nFor those who didn't know:\nThe Network News Transfer Protocol or NNTP is an Internet application protocol used primarily for reading and posting Usenet articles (aka netnews), as well as transferring news among news servers.\n" }, { "...
I've got menu items that look like this <ul> <li>Item1<span class="context-trigger"></span></li> <li>Item2<span class="context-trigger"></span></li> <li>Item3<span class="context-trigger"></span></li> </ul> with CSS that turns the above into a horizontal menu, and JS that turns the [spans] into buttons that brin...
To prevent line breaks from occurring before the `<span>` elements while allowing the menu to wrap correctly between `<li>` items, you can use a combination of CSS properties. The main strategy here is to control the display properties of the `<li>` elements and ensure that the `<span>` elements don't disrupt the flow....
29,471
[ { "from": "human", "value": "I've got menu items that look like this\n<ul>\n <li>Item1<span class=\"context-trigger\"></span></li>\n <li>Item2<span class=\"context-trigger\"></span></li>\n <li>Item3<span class=\"context-trigger\"></span></li>\n</ul>\n\nwith CSS that turns the above into a horizontal menu...
What I'd like to accomplish is to present charts on webpages. For example aspx pages gridviews that present a two column table are able to be copied & placed into Excel then a chart created. The pages I currently use most are ASP.NET 3.0 or SharePoint team sites with stored procedures. People are very interested in how...
Hi Catto, To present charts on webpages, especially in the context of ASP.NET 3.0 or SharePoint, you have several options that can integrate smoothly with your existing workflows. Here’s a high-level overview of different approaches you can take to create charts directly on your ASP.NET pages: ### 1. Use ASP.NET Char...
21,546
[ { "from": "human", "value": "What I'd like to accomplish is to present charts on webpages. For example aspx pages gridviews that present a two column table are able to be copied & placed into Excel then a chart created. The pages I currently use most are ASP.NET 3.0 or SharePoint team sites with stored proc...
I have a PHP script that can encode a PNG image to a Base64 string. I'd like to do the same thing using JavaScript. I know how to open files, but I'm not sure how to do the encoding. I'm not used to working with binary data.
You can encode a PNG image to a Base64 string in JavaScript using the FileReader API. Here's a step-by-step guide on how to achieve this: 1. **Create an HTML file input** to allow the user to select a PNG image. 2. **Use JavaScript's FileReader** to read the file as a data URL. 3. **Extract the Base64 string** from th...
27,152
[ { "from": "human", "value": "I have a PHP script that can encode a PNG image to a Base64 string.\nI'd like to do the same thing using JavaScript. I know how to open files, but I'm not sure how to do the encoding. I'm not used to working with binary data.\n" }, { "from": "gpt", "value": "You can ...
I have some files stored in a SQL Server 2005 table in a VARBINARY(MAX) column. I need to email these files to users on a schedule, and though I can write a C# service to extract and send the email sp_send_dbmail would seem to be perfect for my purpose. The code I'm using looks like this: EXEC msdb.dbo.sp_send_dbmail @...
It appears that you're encountering an issue with `sp_send_dbmail` where the file content is being truncated when it's being sent as an email attachment. The `varbinary(MAX)` data type is used for binary data (like PDF files), and when you cast it to `varchar(MAX)`, you're converting it to a string representation, whic...
28,782
[ { "from": "human", "value": "I have some files stored in a SQL Server 2005 table in a VARBINARY(MAX) column. I need to email these files to users on a schedule, and though I can write a C# service to extract and send the email sp_send_dbmail would seem to be perfect for my purpose. The code I'm using looks ...
We use GNU Make for our system. At the end of our makefiles, we have an include called Makedepends which generates a bunch of .d files using -MM switch on gcc. We then include the .d file for each .cc file using an include $(CXXFILES:.cc=.d) line. But when we delete file or move files, the dependancies step breaks a...
The issue you're facing with `.d` files generated for dependencies is common when using GNU Make. When you move or delete header files, the corresponding dependency files might still list those missing headers, which can cause `make` to fail. Here are some strategies to address this problem: ### 1. Modify the `.d` Fil...
26,847
[ { "from": "human", "value": "We use GNU Make for our system. At the end of our makefiles, we have an include called Makedepends which generates a bunch of .d files using -MM switch on gcc. We then include the .d file for each .cc file using an include $(CXXFILES:.cc=.d) line. But when we delete file or m...
How do I convert TIS-620 (the extended ASCII Thai Character code page) string to UTF-8 string in Java?
To convert a TIS-620 encoded string to a UTF-8 string in Java, you can use the `Charset` class from the `java.nio.charset` package. TIS-620 is an encoding used for Thai characters, and you need to read the byte data as TIS-620 and then convert it to UTF-8. Here’s how you can do this: 1. Convert the TIS-620 byte array...
29,094
[ { "from": "human", "value": "How do I convert TIS-620 (the extended ASCII Thai Character code page) string to UTF-8 string in Java?\n" }, { "from": "gpt", "value": "To convert a TIS-620 encoded string to a UTF-8 string in Java, you can use the `Charset` class from the `java.nio.charset` package....
I want to be able to generate slickedit tags on the commmand line, as soon as I sync a project from revision control - so via a script. Any way to do this?
Yes, you can generate SlickEdit tags on the command line using the `sed` command provided by SlickEdit. This is typically done through the `slickedit` executable with the appropriate arguments. Here's a general approach on how to do this via a script, assuming you're using a Unix-like environment (Linux, macOS). ### S...
26,121
[ { "from": "human", "value": "I want to be able to generate slickedit tags on the commmand line, as soon as I sync a project from revision control - so via a script. Any way to do this? \n" }, { "from": "gpt", "value": "Yes, you can generate SlickEdit tags on the command line using the `sed` comm...
I am writing a web application that will run in kiosk mode on a touch screen. I am currently only targeting it for running on Firefox 3. A few of the use cases I have need to visit external sites. I wish to do so with an embedded browser, which I'm tackling with the help of an <iframe>. I need back/forward buttons for ...
When you use an `<iframe>` in your web application, the history of the parent window and the `<iframe>` are linked together. This means that when you use `w.history.back()` on the `<iframe>`, it will navigate the entire history stack of the parent window, which is not what you want. To achieve independent navigation w...
25,384
[ { "from": "human", "value": "I am writing a web application that will run in kiosk mode on a touch screen. I am currently only targeting it for running on Firefox 3. A few of the use cases I have need to visit external sites. I wish to do so with an embedded browser, which I'm tackling with the help of an <...
I would like to find out where I would be able to find the MP3 library, for implementation in an Operating System.
To find an MP3 library for implementation in an operating system, there are several popular open-source libraries you can consider. Here are some of the most widely used MP3 libraries: 1. **LAME (Lame Ain't an MP3 Encoder)**: - LAME is a widely used MP3 encoder that is open-source and highly regarded for its qualit...
26,990
[ { "from": "human", "value": "I would like to find out where I would be able to find the MP3 library, for implementation in an Operating System.\n" }, { "from": "gpt", "value": "To find an MP3 library for implementation in an operating system, there are several popular open-source libraries you c...
Can Thread.getContextClassLoader() be null ? The javadoc is not really clear. Should a library take this case into account ? Update: the reason I asked is that beansbinding.dev.java.net does not work in this case (and my code does setContextClassLoader(null)
Yes, `Thread.getContextClassLoader()` can indeed return `null`. The Java documentation does not explicitly state that it cannot return `null`, which can lead to some confusion. The context class loader for a thread is intended to be used by the thread to load classes and resources. When a thread is created, it may no...
30,404
[ { "from": "human", "value": "Can Thread.getContextClassLoader() be null ? The javadoc is not really clear.\nShould a library take this case into account ?\nUpdate: the reason I asked is that beansbinding.dev.java.net does not work in this case (and my code does setContextClassLoader(null)\n" }, { "f...
For some reason Eclipse is no longer showing me Java compilation Errors in the Problems View. It is still showing Warnings. This has suddenly happened and I cannot think of anything that I have changed which would affect this. I am using the "Maven Integration for Eclipse" plugin but I have been for some time - not sur...
If Eclipse is no longer showing Java compilation errors in the Problems View, but is still displaying warnings, here are several steps you can take to troubleshoot and resolve the issue: 1. **Check Error Settings**: - Go to `Window` > `Preferences` > `Java` > `Compiler` > `Errors/Warnings`. - Ensure that the set...
27,330
[ { "from": "human", "value": "For some reason Eclipse is no longer showing me Java compilation Errors in the Problems View.\nIt is still showing Warnings.\nThis has suddenly happened and I cannot think of anything that I have changed which would affect this.\nI am using the \"Maven Integration for Eclipse\" ...
I want to add a drupal form to the top of a view. The view does not need to receive the results of the form but the _submit hook of the form should be able to read the first argument of the view that the form was on. Where is the best place to add this? Custom module or template file and what are the necessary filena...
To add a Drupal form to the top of a view, the best approach is to use a custom module. This allows for greater flexibility and reusability, as well as better adherence to Drupal's best practices. Here’s how to implement this in a custom module: ### Steps to Create the Custom Module 1. **Create a Custom Module Direct...
24,497
[ { "from": "human", "value": "I want to add a drupal form to the top of a view. The view does not need to receive the results of the form but the _submit hook of the form should be able to read the first argument of the view that the form was on.\nWhere is the best place to add this? Custom module or templ...
Since Object Initializers are very similar to JSON, and now there are Anonymous Types in .NET. It would be cool to be able to take a string, such as JSON, and create an Anonymous Object that represents the JSON string. Use Object Initializers to create an Anonymous Type: var person = new { FirstName = "Chris", ...
Your idea of creating an anonymous type from a JSON string in C# reflects a desire for more dynamic capabilities similar to JavaScript. As you pointed out, C# is a statically typed language, which means that the type of a variable must be known at compile time. However, there are approaches to achieve a similar outcome...
21,201
[ { "from": "human", "value": "Since Object Initializers are very similar to JSON, and now there are Anonymous Types in .NET. It would be cool to be able to take a string, such as JSON, and create an Anonymous Object that represents the JSON string.\nUse Object Initializers to create an Anonymous Type:\nvar p...
What are the problems that calling this method can help with? Do you ever use it in debugging you data access?
It seems like you might be referring to a specific method in a programming or debugging context, though you haven't specified which method you mean. However, I can provide a general overview of common debugging methods and techniques that are frequently used in data access contexts. ### Common Problems Addressed by De...
26,341
[ { "from": "human", "value": "What are the problems that calling this method can help with?\nDo you ever use it in debugging you data access?\n" }, { "from": "gpt", "value": "It seems like you might be referring to a specific method in a programming or debugging context, though you haven't specif...
Let's say that a class has a public int counter field that is accessed by multiple threads. This int is only incremented or decremented. To increment this field, which approach should be used, and why? lock(this.locker) this.counter++;, Interlocked.Increment(ref this.counter);, Change the access modifier of counter to...
When accessing shared variables like `counter` in a multi-threaded environment, it's critical to ensure that operations on the variable are done safely to prevent race conditions and ensure data integrity. Let's analyze the options you've presented for incrementing the `counter` field: 1. **`lock(this.locker) this.cou...
21,996
[ { "from": "human", "value": "Let's say that a class has a public int counter field that is accessed by multiple threads. This int is only incremented or decremented.\nTo increment this field, which approach should be used, and why?\n\nlock(this.locker) this.counter++;,\nInterlocked.Increment(ref this.counte...
My custom homebrew photography processing software, running on 64 bit Linux/GNU, writes out PNG and TIFF files. These are to be sent to a quality printing shop to be made into fine art. Working with interior designers - it's important to get the colors just right! The print shops usually have no trouble with TIF...
It sounds like you're dealing with a complex issue regarding color management in your homebrew photography processing software. Proper color calibration is critical for print quality, especially when collaborating with print shops and designers. Here are some suggestions and resources to help you implement color manage...
13,362
[ { "from": "human", "value": "My custom homebrew photography processing software, running on 64 bit Linux/GNU, writes out PNG and TIFF files. These are to be sent to a quality printing shop to be made into fine art. Working with interior designers - it's important to get the colors just right! \nThe pr...
I'm probably missing something very obvious here. I have files with the extension .st that contain (mostly) C++ code. I want the C++ in there to be highlighted when I open it with Visual Studio. I go to Tools->Options->Text Editor->File Extension. I type 'st' in the 'extension' box and select 'Microsoft Visual C++' as ...
It sounds like you're on the right track by trying to associate the `.st` file extension with the C++ editor in Visual Studio. However, if you're not seeing the syntax highlighting you expect, here are some additional steps you can take to troubleshoot and resolve the issue: 1. **Restart Visual Studio**: Sometimes cha...
27,690
[ { "from": "human", "value": "I'm probably missing something very obvious here. I have files with the extension .st that contain (mostly) C++ code. I want the C++ in there to be highlighted when I open it with Visual Studio. I go to Tools->Options->Text Editor->File Extension. I type 'st' in the 'extension' ...
I am developing some client side Javascript that is using some JSON web services on a different domain. I have read that some browsers do not allow cross-domain scripting and that I should create a proxy on my local server to serve the data. Can someone please point me to a simple example of how to do this in ASP.Net?...
Sure! To create a simple proxy for your client-side JavaScript to access JSON web services from a different domain in ASP.NET, you can create a simple ASP.NET Web API controller or a simple ASP.NET page. Below, I'll provide an example using ASP.NET Web API, which is a modern and straightforward way to build HTTP servic...
26,818
[ { "from": "human", "value": "I am developing some client side Javascript that is using some JSON web services on a different domain. I have read that some browsers do not allow cross-domain scripting and that I should create a proxy on my local server to serve the data.\nCan someone please point me to a si...
I have a dropdown list that stores name/value pairs. The dropdown appears in each row of a gridview. The values in the dropdown correspond to a third attribute (data type) not persisted in the dropdown list. I'd like to create a client-side "lookup" table so that when a user chooses a dropdown value, the proper data ty...
To implement a client-side lookup for your dropdown lists in an ASP.NET application, you can follow these steps: ### Step 1: Create Your Data Structure You'll want to create a JavaScript object or an array that maps your dropdown values to their corresponding data types. For example, if you have a list of names and t...
27,748
[ { "from": "human", "value": "I have a dropdown list that stores name/value pairs. The dropdown appears in each row of a gridview.\nThe values in the dropdown correspond to a third attribute (data type) not persisted in the dropdown list. I'd like to create a client-side \"lookup\" table so that when a user ...
Should I be writing Doc Comments for all of my java methods?
Writing documentation comments (Doc Comments) for your Java methods is generally a good practice, but whether you should do it for all methods depends on several factors: ### When to Write Doc Comments: 1. **Public and Protected Methods**: - Always document public and protected methods, as these are part of the A...
29,686
[ { "from": "human", "value": "Should I be writing Doc Comments for all of my java methods? \n" }, { "from": "gpt", "value": "Writing documentation comments (Doc Comments) for your Java methods is generally a good practice, but whether you should do it for all methods depends on several factors:\n...
I want to start logging some custom messages into the ULS from my custom SharePoint code. My code is running inside list item receivers attached to some lists. I'd like to configure this logging mechanism within the application start event handler in global.asax. What's the best-practices way to deploy a SharePoint ...
Modifying the `global.asax` in a SharePoint solution is not a recommended practice. The `global.asax` file is specific to ASP.NET applications, and SharePoint has its own lifecycle management and infrastructure, making it less ideal to modify directly for custom logic. However, you can achieve logging custom messages ...
25,249
[ { "from": "human", "value": "I want to start logging some custom messages into the ULS from my custom SharePoint code. My code is running inside list item receivers attached to some lists. I'd like to configure this logging mechanism within the application start event handler in global.asax. What's the b...
I am looking for some stats on current browsers for how long it takes to render a table using plain HTML versus a hacked-up CSS puritan method that avoids using actual TABLE, TR, TD etc. tags. I am not looking for what's proper, only for what's faster, particularly on Firefox 3, although I am also interested in the sta...
Rendering performance between traditional `<table>` HTML elements and CSS-styled alternatives (like using `<div>` and CSS for layout) can vary significantly based on several factors, including the browser, the complexity of the table, and how the alternative markup is structured. ### Key Considerations for Performance...
27,178
[ { "from": "human", "value": "I am looking for some stats on current browsers for how long it takes to render a table using plain HTML versus a hacked-up CSS puritan method that avoids using actual TABLE, TR, TD etc. tags.\nI am not looking for what's proper, only for what's faster, particularly on Firefox 3...
Given a simple switch statement switch (int) { case 1 : { printf("1\n"); break; } case 2 : { printf("2\n"); } case 3 : { printf("3\n"); } } The absence of a break statement in case 2, implies that execution will continue inside the code for case 3...
The design of the switch statement in languages like C and C++ allows for "fall-through" behavior, where execution continues into the next case if no `break` statement is encountered. This choice, while potentially confusing to newcomers, serves several purposes and provides benefits in terms of flexibility and efficie...
26,251
[ { "from": "human", "value": "Given a simple switch statement\nswitch (int)\n{\n case 1 :\n {\n printf(\"1\\n\");\n break;\n }\n\n case 2 : \n {\n printf(\"2\\n\");\n }\n\n case 3 : \n {\n printf(\"3\\n\");\n }\n}\n\nThe absence of a break statement in c...
Objective-C is getting wider use due to its use by Apple for Mac OS X and iPhone development. What are some of your favourite "hidden" features of the Objective-C language? One feature per answer. Give an example and short description of the feature, not just a link to documentation. Label the feature using a title as...
### Dynamic Typing One of the standout features of Objective-C is its dynamic typing capability. Unlike many statically typed languages, where variable types are checked at compile time, Objective-C allows you to declare variables using the `id` type, which can hold any object regardless of its class. #### Example: `...
31,836
[ { "from": "human", "value": "Objective-C is getting wider use due to its use by Apple for Mac OS X and iPhone development. What are some of your favourite \"hidden\" features of the Objective-C language?\n\nOne feature per answer.\nGive an example and short description of the feature, not just a link to doc...
I would like to be able to perform some logic in the table.modifiedField method which compares the previous value of a field to the new value. How do I get to the previous value?
In many programming contexts, especially when working with frameworks and libraries that support reactive data or state management, you often want to compare the previous value of a field to its new value when it changes. The exact implementation can vary depending on the technology stack you're using. However, I can p...
21,871
[ { "from": "human", "value": "I would like to be able to perform some logic in the table.modifiedField method which compares the previous value of a field to the new value. How do I get to the previous value?\n" }, { "from": "gpt", "value": "In many programming contexts, especially when working ...
I'm looking for a library that can deal with RDF and OWL data. So far I have found: semweb (no owl support for all I know) rowlex (more of a 'browser' application) Your recommendations: LinqToRdf (very interesting, thanks mark!)
Here are some additional libraries and tools you might find useful for working with RDF and OWL data: 1. **Apache Jena**: A popular Java framework for building Semantic Web and Linked Data applications. It provides a comprehensive set of tools for creating and working with RDF data, including support for OWL reasoning...
28,554
[ { "from": "human", "value": "I'm looking for a library that can deal with RDF and OWL data.\nSo far I have found:\n\nsemweb (no owl support for all I know)\nrowlex (more of a 'browser' application)\n\nYour recommendations:\n\nLinqToRdf (very interesting, thanks mark!)\n\n" }, { "from": "gpt", "v...
I have been trying to parse Java exceptions that appear in a log for some code I'm working with. My question is, do you parse the exception trace from the top down, or the bottom up? It looks something like this: ERROR [main]</b> Nov/04 11:03:19,440 [localhost].[/BookmarksPortlet].[] - Exception sending context... org....
When dealing with Java exceptions in a log, particularly those that involve nested exceptions, it's generally best to approach the parsing from the **top down** while also considering the implications of the inner (nested) exceptions. ### Steps to Parse Java Exceptions: 1. **Identify the Top-Level Exception**: - ...
28,761
[ { "from": "human", "value": "I have been trying to parse Java exceptions that appear in a log for some code I'm working with. My question is, do you parse the exception trace from the top down, or the bottom up? It looks something like this:\nERROR [main]</b> Nov/04 11:03:19,440 [localhost].[/BookmarksPortl...
Are there official MIME types for the .cs (C# source), .resx, .aspx, etc. files in a .NET project? If no official types are defined, any recommendations on good MIME types? This will be exposed via Apache and the mod_dav_svn module when viewing a Subversion repository from a web browser, so anything that'll help Firef...
As of my last knowledge update in October 2023, there are no universally standardized MIME types specifically assigned to .cs (C# source), .resx (resource files), .aspx (ASP.NET pages), or other .NET specific file types. However, it's common practice to use generic or commonly accepted MIME types for these file types. ...
30,973
[ { "from": "human", "value": "Are there official MIME types for the .cs (C# source), .resx, .aspx, etc. files in a .NET project? \nIf no official types are defined, any recommendations on good MIME types? This will be exposed via Apache and the mod_dav_svn module when viewing a Subversion repository from a w...
I have something funky going on with MOSS & was wondering if anyone out there has seen anything like it: I have a document library in MOSS that has several custom columns added to it. I have a column of type choice. For one document in the library (a word document), the selected value does not get displayed for the o...
It sounds like you're experiencing a rather peculiar issue with your MOSS (Microsoft Office SharePoint Server) document library. Here are some potential causes and troubleshooting steps you might consider to resolve the problem: 1. **Corrupted Metadata**: Sometimes, the metadata for a specific document can become corr...
27,333
[ { "from": "human", "value": "I have something funky going on with MOSS & was wondering if anyone out there has seen anything like it:\nI have a document library in MOSS that has several custom columns added to it. I have a column of type choice. For one document in the library (a word document), the selec...
I am using a C lexer that is Flex-generated, and a C++ parser that is Bison-generated. I have modified the parser to acccept only string input. I am calling the parser function yyparse() in a loop, and reading line by line of user input. I stop the loop if the input is "quit". The problem I am facing is that when input...
To handle syntax errors gracefully and reset the parser state in a Flex/Bison setup, you need to make a few modifications to your Bison parser's error handling. ### Steps to Handle Errors and Reset State: 1. **Define the Error Token in Bison:** Ensure you have an error token defined in your Bison grammar. You typi...
22,732
[ { "from": "human", "value": "I am using a C lexer that is Flex-generated, and a C++ parser that is Bison-generated. I have modified the parser to acccept only string input.\nI am calling the parser function yyparse() in a loop, and reading line by line of user input. I stop the loop if the input is \"quit\"...
Looking for an attractive, highly customizable forum plugin to implement. Don't want to build one myself, but don't want to settle for usual crap. Something Ajax-y? Was leaning towards Community Server but would love to see what others had to reccomend. Thanks. EDIT: This is an ASP.NET/C#/SQL application
If you're looking for an attractive and highly customizable forum plugin for an ASP.NET/C#/SQL application, here are several recommendations that you may find appealing: 1. **ASP.NET Forums**: - This is a classic forum solution that's built on the ASP.NET framework. It’s flexible and integrates well with other ASP....
26,666
[ { "from": "human", "value": "Looking for an attractive, highly customizable forum plugin to implement. Don't want to build one myself, but don't want to settle for usual crap. Something Ajax-y? \nWas leaning towards Community Server but would love to see what others had to reccomend. \nThanks. \nEDIT: This ...
How can I dock a CControlBar derived window to the middle of a splitter window (CSplitterWnd)? I would like the bar to be repositioned whenever the splitter is moved. To make it a little clearer as to what I'm after, imagine the vertical ruler in the Dialog Editor in Visual Studio (MFC only). It gets repositioned whe...
To dock a `CControlBar` derived window to the middle of a `CSplitterWnd` and have it reposition itself when the splitter is moved, you can follow these general steps in an MFC application: ### Step 1: Create the CControlBar Derived Class First, you need to create your own `CControlBar` derived class. Here’s a simple ...
27,415
[ { "from": "human", "value": "How can I dock a CControlBar derived window to the middle of a splitter window (CSplitterWnd)? I would like the bar to be repositioned whenever the splitter is moved.\nTo make it a little clearer as to what I'm after, imagine the vertical ruler in the Dialog Editor in Visual St...
I'm trying to get more acquainted with problems that require Graphs to be solved (are are best solved by graphs). If someone has an old ACM Programming Competition problem that utilized graphs, or have another problem that they found particularly enlightening as they worked it out I would appreciate it. I want to fa...
Sure! Graph theory problems are common in programming contests, and working on them can greatly enhance your understanding of graph traversal algorithms. Here’s a classic problem that involves graph traversal, specifically Depth-First Search (DFS) or Breadth-First Search (BFS): ### Problem: Connected Components in a G...
24,635
[ { "from": "human", "value": "I'm trying to get more acquainted with problems that require Graphs to be solved (are are best solved by graphs). \nIf someone has an old ACM Programming Competition problem that utilized graphs, or have another problem that they found particularly enlightening as they worked i...
I have WPF ListBox which is bound to a ObservableCollection, when the collection changes, all items update their position. The new position is stored in the collection but the UI does not update. So I added the following: void scenarioItems_CollectionChanged(object sender, System.Collections.Specialized.NotifyColle...
Yes, setting the `ItemsSource` to `null` and then reassigning it is a common approach to force the ListBox to refresh its display, but it's generally not the best practice since it can lead to unnecessary performance overhead. Instead, you can update the UI more efficiently by making sure that the items themselves are ...
27,015
[ { "from": "human", "value": "I have WPF ListBox which is bound to a ObservableCollection,\nwhen the collection changes, all items update their position.\nThe new position is stored in the collection but the UI does not update.\nSo I added the following:\n void scenarioItems_CollectionChanged(object sende...
Here I have: Public Structure MyStruct Public Name as String Public Content as String End Structure Dim oStruct as MyStruct = New MyStruct() oStruct.Name = ... oStruct.Content = ... Dim alList as ArrayList = new ArrayList() alList.Add(oStruct) I'd like to convert the ArrayList to a static strongly-typed Array ...
To convert an `ArrayList` to a strongly-typed array of a specific structure (`MyStruct` in your case) in .NET Framework 2.0, you can use the `ToArray` method, but since `ArrayList` does not know the type of the items it holds, you need to specify the type explicitly. Here's how you can do it: ```vb Public Structure M...
30,909
[ { "from": "human", "value": "Here I have:\nPublic Structure MyStruct\n Public Name as String\n Public Content as String\nEnd Structure\n\nDim oStruct as MyStruct = New MyStruct()\noStruct.Name = ...\noStruct.Content = ...\n\nDim alList as ArrayList = new ArrayList()\nalList.Add(oStruct)\n\nI'd like to c...
Originally there was the DAL object which my BO's called for info and then passed to UI. Then I started noticing reduced code in UI and there were Controller classes. What's the decent recomendation. I currently structure mine Public Class OrderDAL Private _id Integer Private _order as Order Public Functi...
Your current architecture follows a common pattern seen in many applications, separating concerns among the Data Access Layer (DAL), the Controller, and the User Interface (UI). However, there are several considerations to keep in mind for maintainability, scalability, and best practices. ### Current Structure Review ...
19,804
[ { "from": "human", "value": "Originally there was the DAL object which my BO's called for info and then passed to UI. Then I started noticing reduced code in UI and there were Controller classes. What's the decent recomendation.\nI currently structure mine\nPublic Class OrderDAL\n\n Private _id Integer\n...
I have a solution that is deployed using ClickOnce. It consists of an application, several referenced assemblies and a SQL Server Compact database. There is also an assembly which is not referenced by the main application, but simply loaded at runtime. This assembly needs to be deployed along with the application, in t...
The behavior you're experiencing with ClickOnce deployment, where the updated version of `LibComposites.dll` is not being used, is likely due to the way ClickOnce manages file versions and how it distinguishes between application files and data files. Here’s a breakdown of the issues and solutions: ### Why It’s Happe...
27,658
[ { "from": "human", "value": "I have a solution that is deployed using ClickOnce.\nIt consists of an application, several referenced assemblies\nand a SQL Server Compact database.\nThere is also an assembly which is not referenced by the main application,\nbut simply loaded at runtime. This assembly needs to...
I want to append some nodes to an xml document using Linq2XML. The file in question is being used by other processes and they should be able to read the file while I update it. So I came up with this solution, which obviously isn't the correct way (The method doc.Save() fails and says that another process is using the ...
To update an XML document using LINQ to XML without blocking other processes, you should consider the following steps: 1. **Read the XML into memory**: Open the file with a file stream and read the XML into an `XDocument`. 2. **Modify the XML in memory**: Make your changes to the `XDocument` in memory. 3. **Write the ...
29,571
[ { "from": "human", "value": "I want to append some nodes to an xml document using Linq2XML. The file in question is being used by other processes and they should be able to read the file while I update it. So I came up with this solution, which obviously isn't the correct way (The method doc.Save() fails an...
I'm looking to utilize jQuery to handle a few very common requests we get for data tables of varying sizes: scrolling, sorting, and dynamic filtering. I've handled scrolling in the past by having two separate tables with fixed width columns, along with associated div containers for the "actual" scrolling. However, thi...
It sounds like you have a pretty clear idea of what you want to achieve with your data tables using jQuery. While there are several plugins available that handle sorting and scrolling, combining scrolling, dynamic filtering, and the ability to freeze columns can be a bit challenging. Here's a suggested approach using e...
23,029
[ { "from": "human", "value": "I'm looking to utilize jQuery to handle a few very common requests we get for data tables of varying sizes: scrolling, sorting, and dynamic filtering.\n\nI've handled scrolling in the past by having two separate tables with fixed width columns, along with associated div containe...
After delving into the world of opensource I have found implementation is emphasised over design. Version control allows for a project to branch off in many directions, which projects may do; this suggests lack of consensus or direction amongst the participants. What software or websites are useful for collaborative d...
Collaborative design is crucial for ensuring that all contributors can communicate effectively, share ideas, and create a cohesive vision for a project. Here are some software tools and websites that can be particularly useful for collaborative design: 1. **Figma**: A web-based interface design tool that allows multip...
21,192
[ { "from": "human", "value": "After delving into the world of opensource I have found implementation is emphasised over design. Version control allows for a project to branch off in many directions, which projects may do; this suggests lack of consensus or direction amongst the participants.\nWhat software ...
When you a set a property's value, you can either validate before or after updating the internal value. If validating before, you could throw an exception if the new value is invalid. The object is then always in a valid state. If validating after, undo is desired (i.e. via IEditableObject), so the user can cancel the...
Validating objects in the context of data binding and UI is indeed a nuanced subject that requires striking a balance between maintaining a clean domain model and ensuring proper user experience and data integrity. Here are several strategies to manage validation effectively: ### 1. **Separation of Concerns** - **Doma...
20,271
[ { "from": "human", "value": "When you a set a property's value, you can either validate before or after updating the internal value.\nIf validating before, you could throw an exception if the new value is invalid. The object is then always in a valid state.\nIf validating after, undo is desired (i.e. via I...
I'm struggling to get around the 404 errors from asp.net mvc beta when deploying on IIS 6. I had this working in one of the previews by mapping .mvc in IIS but this no longer works. I've read Omar's post and several others on the web and tried their solutions but no luck so far. The home page opens without a problem on...
Deploying ASP.NET MVC applications on IIS 6 can be a bit tricky due to its lack of support for certain features that make routing easier in later versions of IIS. Here are steps you can take to address the 404 errors you are experiencing while deploying your ASP.NET MVC beta application on IIS 6: ### 1. URL Mapping S...
27,084
[ { "from": "human", "value": "I'm struggling to get around the 404 errors from asp.net mvc beta when deploying on IIS 6. I had this working in one of the previews by mapping .mvc in IIS but this no longer works. I've read Omar's post and several others on the web and tried their solutions but no luck so far....
My users want data from my application in Excel. The data resides in a SQL Server database but I don't want the users to have direct access to the database, I would rather provide them a web service to get the data. What is the best way to move data from SQL Server to Excel via a web service?
To provide data from your SQL Server database to users in Excel via a web service, you can follow a multi-step approach. Here’s a general guideline: ### Step 1: Create the Web Service 1. **Choose a Technology**: Select a technology stack for your web service. Common choices include ASP.NET, Node.js, Python (Flask/Dja...
26,423
[ { "from": "human", "value": "My users want data from my application in Excel. The data resides in a SQL Server database but I don't want the users to have direct access to the database, I would rather provide them a web service to get the data. What is the best way to move data from SQL Server to Excel vi...
I have an unsorted list of noisy X, Y points. They do, however, form a path through the world. I would like an algorithm to draw an approximation of this data using line segments. This is similar to how you would use a line -fitting algorithm to pick an approximation of linear data. My problem is only harder because th...
To approximate a noisy set of points that form a path, you can use several techniques, each with its own strengths and weaknesses. Here are some commonly used algorithms that might work well for your scenario: 1. **Polynomial Regression**: Fit a polynomial function to the noisy data. This method can handle curves effe...
27,775
[ { "from": "human", "value": "I have an unsorted list of noisy X, Y points. They do, however, form a path through the world. I would like an algorithm to draw an approximation of this data using line segments.\nThis is similar to how you would use a line -fitting algorithm to pick an approximation of linear ...
We are trying to automate a build of one of our products which includes a step where it packages some things with WISE. At one point WISE pops up a window with a progress bar on it to show how it is doing. If one is connected to the machine with remote desktop the build works fine but if one is not connected the buil...
This issue is common when applications rely on a graphical user interface (GUI) and are run in a non-interactive session, such as through a scheduled task or a remote session where no desktop is connected. Here are several potential workarounds that you might consider to address this issue with the WISE packaging tool:...
29,230
[ { "from": "human", "value": "We are trying to automate a build of one of our products which includes a step where it packages some things with WISE. At one point WISE pops up a window with a progress bar on it to show how it is doing. If one is connected to the machine with remote desktop the build works ...
I have a Silverlight 2 application that validates data OnTabSelectionChanged. Immediately I began wishing that UpdateSourceTrigger allowed more than just LostFocus because if you click the tab without tabbing off of a control the LINQ object is not updated before validation. I worked around the issue for TextBoxes by ...
In Silverlight, especially with data-bound controls like a DataGrid, there are some limitations when it comes to handling events from elements in DataTemplates. Specifically, the `TextChanged` event may not fire as expected due to the way DataTemplates are instantiated. Here’s a workaround approach that you can use t...
27,745
[ { "from": "human", "value": "I have a Silverlight 2 application that validates data OnTabSelectionChanged. Immediately I began wishing that UpdateSourceTrigger allowed more than just LostFocus because if you click the tab without tabbing off of a control the LINQ object is not updated before validation. \nI...
I've got a large source tree (> 2 GB, WINCE build tree) that I would like to start managing with Subversion. Up to this point, 'versioning' has been managed through keeping multiple copies of the tree, and using Beyond Compare to find differences. The last big stumbling block I see to using Subversion is that it modifi...
Hi Dave, It sounds like you're in a situation where you want to leverage the benefits of version control without losing the efficiency of file timestamp comparisons. While Subversion does modify file timestamps during commits, there are a few strategies you can consider to work around this issue: 1. **Use an External...
27,565
[ { "from": "human", "value": "I've got a large source tree (> 2 GB, WINCE build tree) that I would like to start managing with Subversion. Up to this point, 'versioning' has been managed through keeping multiple copies of the tree, and using Beyond Compare to find differences.\nThe last big stumbling block I...
I have created a custom installer dll & everything is working fine. I just want to call another installer's Uninstall method from my current installation. When I do this, I get error code 1618 (signifies another installer is already running). However when I call the uninstall of the same product from a test project,...
Error code 1618 indicates that another installation is already in progress. Windows Installer does not allow multiple installations to run simultaneously, which is why you are encountering this issue when attempting to call another installer's Uninstall method from your custom installer. ### Here are some strategies y...
26,102
[ { "from": "human", "value": "I have created a custom installer dll & everything is working fine. I just want to call another installer's Uninstall method from my current installation. When I do this, I get error code 1618 (signifies another installer is already running). However when I call the uninstall...
I need to move entire tables from one MySQL database to another. I don't have full access to the second one, only phpMyAdmin access. I can only upload (compressed) sql files smaller than 2MB. But the compressed output from a mysqldump of the first database's tables is larger than 10MB. Is there a way to split the outpu...
To move entire tables from one MySQL database to another when you have size restrictions for uploads, you can follow this step-by-step approach: ### Step 1: Use mysqldump with Options Instead of trying to split a large dump file after it's created, you can use mysqldump with the `--extended-insert=FALSE` option. This ...
25,566
[ { "from": "human", "value": "I need to move entire tables from one MySQL database to another. I don't have full access to the second one, only phpMyAdmin access. I can only upload (compressed) sql files smaller than 2MB. But the compressed output from a mysqldump of the first database's tables is larger tha...
I am trying to create a new instance of Excel using VBA using: Set XlApp = New Excel.Application The problem is that this new instance of Excel doesn't load all the addins that load when I open Excel normally...Is there anything in the Excel Application object for loading in all the user-specified addins? I'm not tryi...
When you create a new instance of Excel using VBA, it doesn't automatically load the user-specified add-ins that would normally load when Excel is started normally. However, you can programmatically load all the add-ins that are listed in the Excel options. Here's how you can do that: 1. **Get a list of Add-ins:** You...
21,252
[ { "from": "human", "value": "I am trying to create a new instance of Excel using VBA using:\nSet XlApp = New Excel.Application\n\nThe problem is that this new instance of Excel doesn't load all the addins that load when I open Excel normally...Is there anything in the Excel Application object for loading in...
I have a scenario. (Windows Forms, C#, .NET) There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different th...
You're correct in your understanding of the problem, and your approach to use a `BackgroundWorker` is a good start. The `Cross-thread operation not valid` exception is raised when you attempt to access a UI element from a thread that didn't create it, which is what you're experiencing. When you check `InvokeRequired`,...
14,861
[ { "from": "human", "value": "I have a scenario. (Windows Forms, C#, .NET)\n\nThere is a main form which hosts some user control.\nThe user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution.\...
I've got to get a quick and dirty configuration editor up and running. The flow goes something like this: configuration (POCOs on server) are serialized to XML. The XML is well formed at this point. The configuration is sent to the web server in XElements. On the web server, the XML (Yes, ALL OF IT) is dumped into a t...
It looks like you're facing a common challenge when working with XML in web applications, particularly regarding the transformation and manipulation of XML data in a browser context. To address your needs, let's break down a possible solution into manageable steps that avoid the pitfalls you're encountering with escape...
25,196
[ { "from": "human", "value": "I've got to get a quick and dirty configuration editor up and running. The flow goes something like this:\nconfiguration (POCOs on server) are serialized to XML.\nThe XML is well formed at this point. The configuration is sent to the web server in XElements.\nOn the web server,...
I am preparing to use continuous integration for the first time. I will be using Nant for the automated build and testing tasks, and am trying to find the appropriate CI tool to poll the repository and execute the Nant script. I have so far loosely researched the following: Hudson Cruise Control Draco My sense so fa...
When you're looking to implement Continuous Integration (CI) with NAnt for your build and testing tasks, choosing the right CI tool is crucial. You’ve already narrowed it down to Hudson (now known as Jenkins), CruiseControl, and Draco, which is a good start. Here’s a breakdown of these options and some considerations f...
26,336
[ { "from": "human", "value": "I am preparing to use continuous integration for the first time. I will be using Nant for the automated build and testing tasks, and am trying to find the appropriate CI tool to poll the repository and execute the Nant script.\nI have so far loosely researched the following:\n\...
I am using the EMMA tool for code coverage yet despite my best efforts, EMMA is refusing to see the original .java files and generate coverage on a line-by-line basis. We are using ANT to build the code and debug is set to true. I know that EMMA is measuring coverage as the .emma files seem to be generating and merging...
The issue you're encountering with EMMA not being able to find the original `.java` files usually relates to the way the source paths are set up in your build configuration. Here are several steps you can take to troubleshoot and resolve the issue: 1. **Verify Source Paths**: Make sure that the source path specified f...
28,831
[ { "from": "human", "value": "I am using the EMMA tool for code coverage yet despite my best efforts, EMMA is refusing to see the original .java files and generate coverage on a line-by-line basis.\nWe are using ANT to build the code and debug is set to true. I know that EMMA is measuring coverage as the .em...
I just read the Wikipedia article on mock objects, but I'm still not entirely clear on their purpose. It appears they are objects that are created by a test framework when the actual object would be too complex or unpredictable (you know 100% sure what the values of the mock object are because you fully control them). ...
You're on the right track in understanding the purpose of mock objects, but let's clarify their role and how they differ from other types of objects used in testing. ### Purpose of Mock Objects 1. **Isolation**: One of the primary reasons for using mock objects is to isolate the unit of code being tested. When you're...
29,315
[ { "from": "human", "value": "I just read the Wikipedia article on mock objects, but I'm still not entirely clear on their purpose. It appears they are objects that are created by a test framework when the actual object would be too complex or unpredictable (you know 100% sure what the values of the mock obj...
Do you know a way to organize boolean expressions in a database while allowing infinite nesting of the expressions? Example: a = 1 AND (b = 1 OR b = 2) The expression as a whole shouldn't be stored as varchar to preserve data integrity.
To organize boolean expressions in a database while allowing for infinite nesting without storing them as a simple string (varchar), you can represent the expressions using a structured approach. Here are a few ways to achieve this: ### 1. **Use a Recursive Data Structure** You can create a table that represents nodes...
27,560
[ { "from": "human", "value": "Do you know a way to organize boolean expressions in a database while allowing infinite nesting of the expressions?\nExample:\na = 1 AND (b = 1 OR b = 2)\n\nThe expression as a whole shouldn't be stored as varchar to preserve data integrity.\n" }, { "from": "gpt", "v...
I track alot of things with RRD, eg, uptime, network throughput, etc. This works well when you can fit all the graphs on a single page, however, once you scale beyond a page it becomes difficult to use graphs to catch issues, you need to look at them to see that there is an issue, and if there is hundreds or thousands ...
There are several approaches and tools you can use to monitor RRD (Round Robin Database) databases for trend changes and alert you when there are significant deviations from expected patterns. Here are some methods and tools that you can consider: ### Methods for Monitoring Changes in Trends: 1. **Statistical Analysi...
26,929
[ { "from": "human", "value": "I track alot of things with RRD, eg, uptime, network throughput, etc. This works well when you can fit all the graphs on a single page, however, once you scale beyond a page it becomes difficult to use graphs to catch issues, you need to look at them to see that there is an issu...
What's the best way to implement a URL interpreter / dispatcher, such as found in Django and RoR, in PHP? It should be able to interpret a query string as follows: /users/show/4 maps to area = Users action = show Id = 4 /contents/list/20/10 maps to area = Contents action = list Start = 20 Count = 10 /toggle/pro...
To implement a URL interpreter/dispatcher in PHP that extracts parameters from a URL path without using `mod_rewrite`, you can follow these steps. Below is a simple solution that demonstrates how to achieve this: ### Step 1: Set Up Your PHP Router You can use the built-in PHP server or handle the URLs directly in you...
25,304
[ { "from": "human", "value": "What's the best way to implement a URL interpreter / dispatcher, such as found in Django and RoR, in PHP?\nIt should be able to interpret a query string as follows:\n\n/users/show/4 maps to\n\n\narea = Users\naction = show\nId = 4\n\n/contents/list/20/10 maps to \n\n\narea = Con...
I am using OpenOffice.org for most of my not so very frequent Office Suite needs and most of the time it is more than adequate replacement for it's commercial alternative. Where it falls short though is the scripting API. I am yet to find the documentation that would make sense of the API in a way that would let me con...
OpenOffice.org does indeed have a scripting API that can be a bit daunting to navigate, especially if you're not familiar with the UNO (Universal Network Objects) object model. Here are some resources and tips to help you get started with the OpenOffice API and make your scripting experience smoother: 1. **Official Do...
28,060
[ { "from": "human", "value": "I am using OpenOffice.org for most of my not so very frequent Office Suite needs and most of the time it is more than adequate replacement for it's commercial alternative.\nWhere it falls short though is the scripting API. I am yet to find the documentation that would make sense...
I'm writing an application using Qt4. I need to download a very short text file from a given http address. The file is short and is needed for my app to be able to continue, so I would like to make sure the download is blocking (or will timeout after a few seconds if the file in not found/not available). I wanted to us...
You're right that `QHttp::get()` is non-blocking, and using threads with signals and slots can indeed be tricky, especially with blocking waits. In your case, you're running into an issue where the `onRequestFinished` slot is never called because the event loop is blocked by the `wait()` call. Here’s how you can impl...
27,538
[ { "from": "human", "value": "I'm writing an application using Qt4.\nI need to download a very short text file from a given http address.\nThe file is short and is needed for my app to be able to continue, so I would like to make sure the download is blocking (or will timeout after a few seconds if the file ...
I am trying to create a sortable image matrix, 5x5 using scriptaculous javascript library by I can't make it work. I am trying using a table but I am having trouble linking the <td> into the Sortable object. Do you guys have any hint or documentation I can go through to create this ? Thanks
To create a sortable image matrix using the Scriptaculous library, you can use the `Sortable` class to enable drag-and-drop functionality on table cells (`<td>` elements). Here’s a basic implementation to get you started. ### Prerequisites Make sure you have included both Prototype.js and Scriptaculous in your HTML: ...
18,325
[ { "from": "human", "value": "I am trying to create a sortable image matrix, 5x5 using scriptaculous javascript library by I can't make it work. \nI am trying using a table but I am having trouble linking the <td> into the Sortable object.\nDo you guys have any hint or documentation I can go through to creat...
The javascript Date("mm-dd-yyyy") constructor doesn't work for FF. It works fine for IE. IE : new Date("04-02-2008") => "Wed Apr 2 00:00:00 EDT 2008" FF2 : new Date("04-02-2008") => Invalid Date So let's try another constructor: Date("yyyy", "mm", "dd"). IE: new Date("2008", "04", "02"); => "Fri May 2 00:00:00 EDT ...
You're correct that the JavaScript `Date` constructor can behave inconsistently across different browsers, especially with string formats. The constructor `new Date("yyyy", "mm", "dd")` expects the month to be zero-indexed (where January is 0 and December is 11). This can cause confusion, as it leads to unexpected resu...
23,249
[ { "from": "human", "value": "The javascript Date(\"mm-dd-yyyy\") constructor doesn't work for FF. It works fine for IE.\n\nIE : new Date(\"04-02-2008\") => \"Wed Apr 2 00:00:00 EDT 2008\"\nFF2 : new Date(\"04-02-2008\") => Invalid Date\n\nSo let's try another constructor: Date(\"yyyy\", \"mm\", \"dd\").\n\...
I have a hyper link like this : <A Href=My_Java_Servlet?User_Action=Admin_Download_Records&User_Id=Admin onClick=\"Check_Password();\" target=_blank>Download Records</A> When a user clicks on it, a password window will open, the user can try 3 times for the right password. The Javascript looks like this : <Script Lang...
To ensure that the new window only opens when the correct password is entered, you need to prevent the default behavior of the hyperlink when the password check fails. You can achieve this by modifying the `onClick` event handler to conditionally navigate to the URL based on the success of the password check. Here's h...
29,755
[ { "from": "human", "value": "I have a hyper link like this :\n<A Href=My_Java_Servlet?User_Action=Admin_Download_Records&User_Id=Admin onClick=\\\"Check_Password();\\\" target=_blank>Download Records</A>\n\nWhen a user clicks on it, a password window will open, the user can try 3 times for the right passwor...
This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together: Firstly: Given an established Java project, what are some decent ways to speed it up beyond just plain in-code optimization? Secondly: When writing a program from scratch in Java, what are some good wa...
Certainly! Java offers several opportunities for performance optimization that go beyond simple code improvements. Here are some Java-specific tips for both optimizing an established project and for improving performance when starting from scratch. ### Optimizing an Established Java Project 1. **Profiling and Monitor...
21,658
[ { "from": "human", "value": "This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:\n\nFirstly: Given an established Java project, what are some decent ways to speed it up beyond just plain in-code optimization?\nSecondly: When writing a program...
I am making a Python gui project that needs to duplicate the look of a Windows gui environment (ie Explorer). I have my own custom icons to draw but they should be selectable by the same methods as usual; click, ctrl-click, drag box etc. Are any of the gui toolkits going to help with this or will I have to implement ...
Creating a custom GUI that mimics the look and feel of Windows Explorer for displaying and selecting icons can indeed be a complex task. However, using the right GUI toolkit in Python can simplify the process considerably. Here are some options and advice on how to achieve your goal: ### GUI Toolkits 1. **Tkinter**: ...
23,302
[ { "from": "human", "value": "I am making a Python gui project that needs to duplicate the look of a Windows gui environment (ie Explorer). I have my own custom icons to draw but they should be selectable by the same methods as usual; click, ctrl-click, drag box etc. Are any of the gui toolkits going to he...
I have seen the official demos on lwjgl.org but I would like to see some more tutorial level examples.
Sure! LWJGL (Lightweight Java Game Library) is a popular Java library for game development that provides access to OpenGL, OpenAL, and other APIs. Here are some beginner-level tutorials and examples to help you get started with LWJGL. ### 1. Setting Up LWJGL Before diving into the tutorials, make sure you have LWJGL ...
15,031
[ { "from": "human", "value": "I have seen the official demos on lwjgl.org but I would like to see some more tutorial level examples.\n" }, { "from": "gpt", "value": "Sure! LWJGL (Lightweight Java Game Library) is a popular Java library for game development that provides access to OpenGL, OpenAL, ...
It seems like Info.plist file has an ability to declare different roles for the same application bundle through the UIRoleInfo key. SpringBoard can recognize these roles after installing an app and may display separate icons for each application role. For instance, iPhone shows MobileSlideShow.app as 2 different progra...
Using the `UIRoleInfo` key in the `Info.plist` file to declare different roles for the same application bundle is indeed a feature that allows you to present your app in multiple ways, with the possibility of having separate icons for each role in SpringBoard. While official Apple documentation on this specific feature...
25,952
[ { "from": "human", "value": "It seems like Info.plist file has an ability to declare different roles for the same application bundle through the UIRoleInfo key. SpringBoard can recognize these roles after installing an app and may display separate icons for each application role.\nFor instance, iPhone shows...
I want to create a subclass of TabPage that contains some control, and I want to control the layout and properties of those controls through the designer. However, if I open my subclass in the designer, I can't position them like I could on a UserControl. I don't want to have to create a TabPage with an UserControl i...
To create a subclass of `TabPage` that you can design directly with controls in the Windows Forms Designer, you need to follow a few steps to make sure your custom `TabPage` behaves similarly to a `UserControl` in terms of design-time behavior. Here's a concise guide on how to achieve that: ### Step 1: Create the Subc...
27,516
[ { "from": "human", "value": "I want to create a subclass of TabPage that contains some control, and I want to control the layout and properties of those controls through the designer. However, if I open my subclass in the designer, I can't position them like I could on a UserControl. I don't want to have ...
I see these two acronyms being thrown around and I was wondering if there are any differences between a GUID and a UUID?
Yes, there are differences between GUID and UUID, though they are often used interchangeably. 1. **Definition**: - **GUID** stands for **Globally Unique Identifier**. It is a specific implementation of a unique identifier that is commonly used in Microsoft technologies. - **UUID** stands for **Universally Unique...
28,058
[ { "from": "human", "value": "I see these two acronyms being thrown around and I was wondering if there are any differences between a GUID and a UUID?\n" }, { "from": "gpt", "value": "Yes, there are differences between GUID and UUID, though they are often used interchangeably.\n\n1. **Definition*...
In SQL Server given a Table/View how can you generate a definition of the Table/View in the form: C1 int, C2 varchar(20), C3 double The information required to do it is contained in the meta-tables of SQL Server but is there a standard script / IDE faciltity to output the data contained there in the form describe...
You can achieve this in SQL Server using a script that queries the system catalog views to extract the column definitions of a specified table or view. Below is a standard SQL script that generates the column definitions in the desired format: ```sql DECLARE @TableName NVARCHAR(256) = 'YourTableNameOrViewName'; -- Ch...
27,624
[ { "from": "human", "value": "In SQL Server given a Table/View how can you generate a definition of the Table/View in the form:\n\nC1 int,\n C2 varchar(20),\n C3 double\n\nThe information required to do it is contained in the meta-tables of SQL Server but is there a standard script / IDE faciltity to outpu...
So I feel I pretty well understand the application layer, and everything below (and including) the transport layer. The session and presentation layers, though, I don't fully understand. I've read the simplistic descriptions in Wikipedia, but it doesn't have an example of why separating out those layers is useful. So:...
Hi Adam, Your questions about the session and presentation layers of the OSI model are great, and I’d be happy to elaborate on both concepts, including their functions and the benefits of separating them out. ### Session Layer (Layer 5) **What is the Session Layer?** The session layer is responsible for establishing...
26,260
[ { "from": "human", "value": "So I feel I pretty well understand the application layer, and everything below (and including) the transport layer.\nThe session and presentation layers, though, I don't fully understand. I've read the simplistic descriptions in Wikipedia, but it doesn't have an example of why ...
Yesterday I was having a heated debate with a coworker on what would be the preferred error reporting method. Mainly we were discussing the usage of exceptions or error codes for reporting errors between application layers or modules. What rules do you use to decide if you throw exceptions or return error codes for err...
Deciding whether to use exceptions or error codes for error reporting involves several factors, including the programming language being used, the application's architecture, the expected use cases, and the nature of the errors that need to be handled. Here are some general rules and considerations for making this deci...
27,284
[ { "from": "human", "value": "Yesterday I was having a heated debate with a coworker on what would be the preferred error reporting method. Mainly we were discussing the usage of exceptions or error codes for reporting errors between application layers or modules.\nWhat rules do you use to decide if you thro...
I have 2-3 different column names that I want to look up in the entire database and list out all tables which have those columns. Is there any easy script?
Yes, you can achieve this using SQL queries to search for column names across all tables in a database. Here is an example script that can be used in SQL Server, MySQL, and PostgreSQL to list all tables that contain specific column names. ### SQL Server ```sql DECLARE @SearchColumns TABLE (ColumnName NVARCHAR(255)); ...
29,979
[ { "from": "human", "value": "I have 2-3 different column names that I want to look up in the entire database and list out all tables which have those columns. Is there any easy script?\n" }, { "from": "gpt", "value": "Yes, you can achieve this using SQL queries to search for column names across ...
My problem is that I can't seem to get the image from my bundle to display properly. This method is in the view controller that controls the tableview. headerView is loaded with the tableview in the .nib file and contains a few UILabels (not shown) that load just fine. Any ideas? - (void)viewDidLoad { [super viewDi...
It looks like you're correctly loading the image from your bundle, but you haven't added the `imageView` to the view hierarchy. After initializing `imageView` with the image, you need to add it to your header view (or another appropriate view) for it to be displayed. Here's an updated version of your `viewDidLoad` me...
30,204
[ { "from": "human", "value": "My problem is that I can't seem to get the image from my bundle to display properly. This method is in the view controller that controls the tableview. headerView is loaded with the tableview in the .nib file and contains a few UILabels (not shown) that load just fine. Any ideas...
I am a .Net programmer(both C# and VB.net) , and I want to go into F# area also, but can't find some good online article/pdf to start with. Please guide me through this.
Getting started with F# as a .NET programmer is a great choice! F# is a functional-first programming language that runs on the .NET platform, and its syntax and concepts may take some time to get used to if you’re coming from an object-oriented background. Here are some resources and a suggested learning path to help y...
25,676
[ { "from": "human", "value": "I am a .Net programmer(both C# and VB.net) , and I want to go into F# area also, but can't find some good online article/pdf to start with. Please guide me through this.\n" }, { "from": "gpt", "value": "Getting started with F# as a .NET programmer is a great choice! ...
I have the following JavaScript code to pop up a window in Internet Explorer. The code is executed from a page within a Microsoft CRM modal dialog box. (RequestID is a string that is always the same in the test system - at the moment it contains "abcdefg" - without the quotes). var cancelUrl = "CancelRequest.aspx?Reque...
It sounds like you're experiencing a common issue with pop-up windows in Internet Explorer, particularly with specific configurations or settings on different systems. Here are several steps and suggestions that may help you address the intermittent pop-up behavior: 1. **Compatibility Mode**: Ensure that your website ...
28,339
[ { "from": "human", "value": "I have the following JavaScript code to pop up a window in Internet Explorer. The code is executed from a page within a Microsoft CRM modal dialog box. (RequestID is a string that is always the same in the test system - at the moment it contains \"abcdefg\" - without the quotes)...
I am writing in C#. How can i find out which methods/functions I can use in an unmanaged dll that doesn't belong to windows? Exmaple : I have some installed software on my computer, it has a dll, and i want to know what my options are as to creating code to connect to that software?
To find out which functions are available in an unmanaged DLL, you can follow a few steps. Here are some methods you can use to explore the exported functions of a DLL: ### 1. Using Dependency Walker [Dependency Walker](http://www.dependencywalker.com/) is a free tool that you can use to view the exported functions f...
23,735
[ { "from": "human", "value": "I am writing in C#.\nHow can i find out which methods/functions I can use in an unmanaged dll that doesn't belong to windows?\nExmaple : I have some installed software on my computer, it has a dll, and i want to know what my options are as to creating code to connect to that sof...
So I have a control (a map) on an aspx page. I want to write some javascript to onload setup the following: when mouse stops on control = some code when mouse moves = some code (but only if the move is longer than 250 mil sec) This works to trigger code on stop and then on move... function setupmousemovement() { var...
The problem with your current implementation is that the `clearTimeout(thread2);` statement is inside the `onmousestop` function, but you are not actually calling this function when the mouse stops. Instead, you're only clearing the `thread` timeout in that case. The logic for handling mouse movements and mouse stops n...
29,373
[ { "from": "human", "value": "So I have a control (a map) on an aspx page. I want to write some javascript to onload setup the following:\n\nwhen mouse stops on control = some code\nwhen mouse moves = some code (but only if the move is longer than 250 mil sec)\n\nThis works to trigger code on stop and then ...
which are the best tutorials, books, software and practices to start and manage a new .net based Development Project in an Agile way with no experience with it. which methodology is easier to adopt XP|Scrum?
Starting a .NET-based development project using Agile methodologies can be a rewarding experience, especially if you're equipped with the right resources and practices. Here’s a breakdown of tutorials, books, software, and practices to help you get started, along with an overview of XP (Extreme Programming) and Scrum. ...
22,602
[ { "from": "human", "value": "which are the best tutorials, books, software and practices to start and manage a new .net based Development Project in an Agile way with no experience with it. which methodology is easier to adopt XP|Scrum? \n" }, { "from": "gpt", "value": "Starting a .NET-based de...
I am aware of the System.TimeZone class as well as the many uses of the DateTime.ToString() method. What I haven't been able to find is a way to convert a DateTime to a string that, in addition to the time and date info, contains the three-letter Time Zone abbreviation (in fact, much the same way StackOverflow's toolt...
You can achieve what you want by using the `TimeZoneInfo` class in .NET, which allows you to get more detailed information about the time zone, including the abbreviation. Here's how you can format a `DateTime` with the appropriate time zone abbreviation: 1. Get the local time zone of the server. 2. Determine if Dayli...
25,947
[ { "from": "human", "value": "I am aware of the System.TimeZone class as well as the many uses of the DateTime.ToString() method. What I haven't been able to find is a way to convert a DateTime to a string that, in addition to the time and date info, contains the three-letter Time Zone abbreviation (in fact...
I have a listbox, and I have the following ItemTemplate for it: <DataTemplate x:Key="ScenarioItemTemplate"> <Border Margin="5,0,5,0" Background="#FF3C3B3B" BorderBrush="#FF797878" BorderThickness="2" CornerRadius="5"> <DockPanel> <DockPanel DockPan...
To achieve the desired behavior where the `ContentControl`'s `Visibility` is set to "Visible" when the ListBox item is selected, you can use a `DataTrigger` in the `DataTemplate`. This can be accomplished by binding to the `IsSelected` property of the ListBoxItem, which is accessible through a `RelativeSource` binding....
25,703
[ { "from": "human", "value": "I have a listbox, and I have the following ItemTemplate for it:\n<DataTemplate x:Key=\"ScenarioItemTemplate\">\n <Border Margin=\"5,0,5,0\"\n Background=\"#FF3C3B3B\"\n BorderBrush=\"#FF797878\"\n BorderThickness=\"2\"\n CornerRadiu...
on any element in the webpage. I need to look at what the element and children elements are. For e.g.
To inspect an element and its children in a webpage, you can use the built-in developer tools available in most modern web browsers (like Chrome, Firefox, Safari, etc.). Here's how you can do it: ### Step-by-Step Guide 1. **Open Developer Tools:** - **Google Chrome:** Right-click on the element and select "Inspect...
25,720
[ { "from": "human", "value": "on any element in the webpage. I need to look at what the element and children elements are.\nFor e.g.\n" }, { "from": "gpt", "value": "To inspect an element and its children in a webpage, you can use the built-in developer tools available in most modern web browsers...
I have been looking at a few options for enabling localization and internationalization of a dynamic php application. There appears to be a variety of tools available such as gettext and Yahoo's R3 and I am interested in hearing from both developers and translators about which tools are good to use and what functionali...
When it comes to enabling localization (l10n) and internationalization (i18n) in a dynamic PHP application, there are indeed several tools and libraries available that can simplify the process for developers and translators. Here’s a breakdown of some popular options, along with their features and considerations: ### ...
21,591
[ { "from": "human", "value": "I have been looking at a few options for enabling localization and internationalization of a dynamic php application. There appears to be a variety of tools available such as gettext and Yahoo's R3 and I am interested in hearing from both developers and translators about which t...
So I'm porting an app from Windows to Mac, and part of the app deals with creating movie files. On Windows, there's a group of functions like ICOpen and ICConfigure, which signify to the video compression driver to open up a configuration box for the selected codec. Is there anything like that for QuickTime on Mac?
On macOS, particularly when working with QuickTime, there isn't a direct equivalent to the `ICOpen` and `ICConfigure` functions you find in the Windows Video for Windows (VFW) API. However, you can achieve similar functionality through the use of the `QTKit` or `AVFoundation` frameworks, which are designed for handling...
25,789
[ { "from": "human", "value": "So I'm porting an app from Windows to Mac, and part of the app deals with creating movie files. On Windows, there's a group of functions like ICOpen and ICConfigure, which signify to the video compression driver to open up a configuration box for the selected codec. Is there a...
No doubt I'm missing something really simple here but I just can't see the problem with this query which is producing the following error: SQL query: INSERT INTO ads( ad_id, author, ad_date, category, title, description, condition, price, fullname, telephone, email, status, photo, photothumb ) VALUES ( ...
The error message you're encountering typically indicates a syntax problem in your SQL query. However, the query you provided appears largely correct in terms of syntax. There are a couple of potential issues that might be causing the error: 1. **Quotes around column names**: In MySQL, column names should not be wrapp...
28,091
[ { "from": "human", "value": "No doubt I'm missing something really simple here but I just can't see the problem with this query which is producing the following error:\nSQL query:\n\nINSERT INTO ads(\n ad_id, author, ad_date, category, title,\n description, condition, price, fullname,\n telephone, ...
I have a DataGridView whose DataSource is a DataTable. This DataTable has a boolean column, which is interpreted as a checkbox in the DataGridView. employeeSelectionTable.Columns.Add("IsSelected", typeof(bool)); ... employeeSelectionTable.RowChanged += selectionTableRowChanged; dataGridViewSelectedEmployees.DataSource ...
Ignoring double-clicks by subclassing the `DataGridView` and overriding `WndProc` is certainly one way to tackle the problem. However, it can be cumbersome and may not provide the desired user experience, as double-clicks are a common interaction pattern. A more efficient approach would be to manage the checkbox state...
28,775
[ { "from": "human", "value": "I have a DataGridView whose DataSource is a DataTable.\nThis DataTable has a boolean column, which is interpreted as a checkbox in the DataGridView.\nemployeeSelectionTable.Columns.Add(\"IsSelected\", typeof(bool));\n...\nemployeeSelectionTable.RowChanged += selectionTableRowCha...