instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I need some help with WPF binding syntax:
public class ApplicationPresenter
{
public ObservableCollection<Quotes> PriceList {get;}
}
public class WebSitePricesView
{
private IApplicationPresenter presenter
{
get { return (ApplicationPresenter)DataContext; }
}
// public ObservableCollectio... | The issue you're experiencing stems from how the `Binding` syntax is structured in your XAML, specifically how the `DataGridCollectionViewSource` is set up.
When you want to bind the `DataGridCollectionViewSource` directly to the `PriceList` property of your `ApplicationPresenter` instance, you need to ensure that th... | 27,223 | [
{
"from": "human",
"value": "I need some help with WPF binding syntax:\npublic class ApplicationPresenter\n{\n public ObservableCollection<Quotes> PriceList {get;}\n}\n\n\npublic class WebSitePricesView\n{\n private IApplicationPresenter presenter\n {\n get { return (ApplicationPresenter)Dat... |
I'e been programming Java forever, but have been away from it for a while. Can anyone recommend a really good Java reference, where "really good" is defined by "Good coverage of the language, detailed coverage of recent extensions, and written for the technical reader (not a "for Dummies" sort of book)"?
| Certainly! Here are some highly regarded Java reference books that cover the language comprehensively, including recent extensions and advanced topics, tailored for a technical audience:
1. **"Effective Java" by Joshua Bloch** - This is a classic book that covers best practices for writing clean and efficient Java cod... | 35,005 | [
{
"from": "human",
"value": "I'e been programming Java forever, but have been away from it for a while. Can anyone recommend a really good Java reference, where \"really good\" is defined by \"Good coverage of the language, detailed coverage of recent extensions, and written for the technical reader (not a... |
If I have a usercontrol (in Silverlight) that I've written, that uses XAML to define it's appearance, how can I make a customised version of it?
i.e. I have MyControl.xaml & MyControl.xaml.cs
What do I need to do if I want a "SpecialisedControl" child class? I assume I just make a new code file, then inherit from MyCon... | To create a specialized version of a user control in Silverlight that inherits from your base control (`MyControl`), you'll indeed follow these steps:
1. **Create the Specialized Control Class:**
- Create a new code file for your specialized control.
- Inherit from `MyControl`.
Here’s an example:
```csha... | 31,714 | [
{
"from": "human",
"value": "If I have a usercontrol (in Silverlight) that I've written, that uses XAML to define it's appearance, how can I make a customised version of it?\ni.e. I have MyControl.xaml & MyControl.xaml.cs\nWhat do I need to do if I want a \"SpecialisedControl\" child class? I assume I just ... |
What is the recommended practice? Should I add the my sub-folder under the fitnesse folder to version control?
Context: working on a single developer rails pet project. I've my rails project under version-control (Subversion) however my fitnesse wiki pages lie under the fitnesse program folder.
Fitnesse seems to ha... | When working on a single-developer Rails pet project with FitNesse, the decision to include your FitNesse sub-folder in version control depends on several factors. Here’s a breakdown to help you determine the best approach:
### Recommended Practice
1. **Include FitNesse in Version Control**:
- **Consistency**: It ... | 30,239 | [
{
"from": "human",
"value": "What is the recommended practice? Should I add the my sub-folder under the fitnesse folder to version control? \nContext: working on a single developer rails pet project. I've my rails project under version-control (Subversion) however my fitnesse wiki pages lie under the fit... |
I am currently validating a client's HTML Source and I am getting a lot of validation errors for images and input files which do not have the Omittag. I would do it manually but this client literally has thousands of files, with a lot of instances where the is not .
This client has validated some img tags (for whateve... | To check for `img` and `input` tags that do not have an appropriate closing tag in a large number of HTML files, you can use a combination of `find`, `grep`, and `sed`. Below are steps to identify these instances and a method to insert an appropriate self-closing tag where needed.
### Step 1: Identify Files Without Va... | 32,266 | [
{
"from": "human",
"value": "I am currently validating a client's HTML Source and I am getting a lot of validation errors for images and input files which do not have the Omittag. I would do it manually but this client literally has thousands of files, with a lot of instances where the is not .\nThis clien... |
Using gnuplot 4.2, is it possible to obtain the value of a specific column/row and use that value somehow?
For example, let's say my datafile contains the following
#1 2
7 13
5 11
23 17
53 12
For a simple plot where column 1 is the x axis and column 2 is the y axis I would:-
plot 'datafile' using 1:2
What I'm tryi... | Yes, you can achieve this in gnuplot, but it requires a couple of steps to extract the specific value you want from the data file and then use it to normalize the data in column 2. Below is a method you can follow using gnuplot 4.2.
First, you'll want to find the value of the first element in column 2. You can do this... | 33,265 | [
{
"from": "human",
"value": "Using gnuplot 4.2, is it possible to obtain the value of a specific column/row and use that value somehow?\nFor example, let's say my datafile contains the following\n#1 2\n7 13\n5 11\n23 17\n53 12\n\nFor a simple plot where column 1 is the x axis and column 2 is the y axis I... |
Anyone use a language called Interactive Data Language, IDL? It is popular with scientists. I think it is a poor language because it is proprietary (every terminal running it has to have an expensive license purchased) and it has minimal support (try searching for IDL, the language, right now on stack) . I am trying... | It sounds like you're grappling with a common situation in scientific computing where a legacy tool, like IDL, is deeply embedded in a research community, but newer and more versatile programming languages offer significant advantages. Here are some points to consider when trying to convince your colleagues to move awa... | 27,824 | [
{
"from": "human",
"value": "Anyone use a language called Interactive Data Language, IDL? It is popular with scientists. I think it is a poor language because it is proprietary (every terminal running it has to have an expensive license purchased) and it has minimal support (try searching for IDL, the lan... |
I've got a solution which I setup / cleanup using batch files ...
- there are a pair of MSMQ ports, send and receive, with another application on the end of the queues
I'm finding I can't properly stop the orchestration in the batch file ... the error is the send port is unenlisted
- I'm using the StopOrch.vbs script ... | It sounds like you're dealing with an issue where the orchestration that interacts with MSMQ ports isn't stopping correctly when messages are present in the queues. This can lead to the send port becoming unenlisted, causing issues during your cleanup process.
Here are a few suggestions you can try to properly stop th... | 28,643 | [
{
"from": "human",
"value": "I've got a solution which I setup / cleanup using batch files ...\n- there are a pair of MSMQ ports, send and receive, with another application on the end of the queues\nI'm finding I can't properly stop the orchestration in the batch file ... the error is the send port is unenl... |
I would like to implement a command line interface for a Java application. This wouldn't be too difficult to do, except I would like the command line program to affect the state of another Java GUI program. So for example, I could type:
java CliMain arg1 arg2
And another running GUI instance would perform an appropria... | To implement a command line interface (CLI) that interacts with a running Java GUI application, you can use several approaches to communicate between the two. Below are a few common methods, along with their advantages and disadvantages:
### 1. **Sockets**
Using sockets is a robust way to allow two separate Java proce... | 26,229 | [
{
"from": "human",
"value": "I would like to implement a command line interface for a Java application. This wouldn't be too difficult to do, except I would like the command line program to affect the state of another Java GUI program. So for example, I could type:\njava CliMain arg1 arg2\n\nAnd another run... |
This is a question I have wondered about for quite some time, yet I have never found a suitable solution. If I run a script and I come across, let's say an IndexError, python prints the line, location and quick description of the error and exits. Is it possible to automatically start pdb when an error is encountered? I... | Yes, you can automatically start the Python debugger (`pdb`) when an unhandled exception occurs by using a try-except block in your main script. You can catch exceptions and then invoke `pdb` to debug the error. Here’s how you can do it:
1. **Import the necessary modules**: You'll need to import `pdb` and `sys`.
2. **... | 33,656 | [
{
"from": "human",
"value": "This is a question I have wondered about for quite some time, yet I have never found a suitable solution. If I run a script and I come across, let's say an IndexError, python prints the line, location and quick description of the error and exits. Is it possible to automatically ... |
I am trying to create a StringNameSpaceBinding using the wsadmin tool of Websphere 6.1
Here are the steps i take
set cell [$AdminConfig getid /Cell:cell/]
$AdminConfig create StringNameSpaceBinding $cell { {name bindname} {nameInNameSpace Bindings/string} {stringToBind "This is the String value that gets bound"} }
But... | The error you're encountering, specifically `WASX7444E: Invalid parameter value "" for parameter "parent config id" on command "create"`, suggests that the parent configuration ID you're passing to the `create` command might not be valid or is returning an empty value.
Here are a few steps you can take to troubleshoot... | 27,475 | [
{
"from": "human",
"value": "I am trying to create a StringNameSpaceBinding using the wsadmin tool of Websphere 6.1\nHere are the steps i take\nset cell [$AdminConfig getid /Cell:cell/]\n$AdminConfig create StringNameSpaceBinding $cell { {name bindname} {nameInNameSpace Bindings/string} {stringToBind \"Thi... |
I've create a maintenance plan on my SQL Server 2005 server. The backup should be written to another server. I'm using a UNC path for this. The user running the SQL Agent jobs has full access to the other server. It's admin on both servers.
The problem is that this statement fails ( has the correct server name ofcourse... | The error message you're encountering indicates that there is an issue with the path syntax you're using in the `xp_create_subdir` command. In SQL Server, particularly with older versions like SQL Server 2005, there are a few common reasons for this error when trying to create a directory on a UNC path.
Here are some ... | 33,502 | [
{
"from": "human",
"value": "I've create a maintenance plan on my SQL Server 2005 server. The backup should be written to another server. I'm using a UNC path for this. The user running the SQL Agent jobs has full access to the other server. It's admin on both servers.\nThe problem is that this statement fa... |
Duplicate of How do you make sure email you send programmatically is not automatically marked as spam?
Initially I planned to send emails from my website as html (i.e. content-type: text/html;) but I just thought about something today, won't it better to send emails as plain text, i.e. content-type: text/plain;, so tha... | Sending emails programmatically while minimizing the risk of them being marked as spam involves several factors, and the content type (HTML vs. plain text) is just one of them. Here are some considerations to keep in mind:
### 1. Content-Type: HTML vs. Plain Text
- **HTML Emails**: They can be visually appealing, incl... | 32,737 | [
{
"from": "human",
"value": "Duplicate of How do you make sure email you send programmatically is not automatically marked as spam?\nInitially I planned to send emails from my website as html (i.e. content-type: text/html;) but I just thought about something today, won't it better to send emails as plain te... |
I need to catch the HTML of a ASP.NET just before it is being sent to the client in order to do last minute string manipulations on it, and then send the modified version to the client.
e.g.
The Page is loaded
Every control has been rendered correctly
The Full html of the page is ready to be transferred back to the cli... | Yes, you can intercept the final HTML output in ASP.NET by using a technique called `Page.Render` override or by utilizing the `HttpApplication` class and its `EndRequest` event. Below are the methods you can employ to modify the HTML just before it is sent to the client.
### Method 1: Using `Page.Render`
You can cre... | 30,046 | [
{
"from": "human",
"value": "I need to catch the HTML of a ASP.NET just before it is being sent to the client in order to do last minute string manipulations on it, and then send the modified version to the client.\ne.g.\nThe Page is loaded\nEvery control has been rendered correctly\nThe Full html of the pa... |
Is it possible to run a XNA game compiled for XBOX 360 from a DVD or CD, or does it have to be copied onto the HD?
Is it possible to include a library which is not a part of the .net compact framework in a XBOX 360 project?
| Running an XNA game compiled for Xbox 360 from a DVD or CD is possible, but there are certain conditions. XNA games for Xbox 360 can be packaged for release as an Xbox Live Indie Game (XBLIG), and those games can be placed on a DVD or CD. However, when running the game, it may be necessary to install or copy it to the ... | 31,284 | [
{
"from": "human",
"value": "Is it possible to run a XNA game compiled for XBOX 360 from a DVD or CD, or does it have to be copied onto the HD?\nIs it possible to include a library which is not a part of the .net compact framework in a XBOX 360 project?\n"
},
{
"from": "gpt",
"value": "Running a... |
I'm binding a datatable to a gridview control, and when I format each column I need to format the data based on whether that column has a particular custom attribute. In this case, a column can represent:
a text box (in which case I just display the text from the textbox in the gridview),
a checkbox (in which case I ... | You're asking about customizing the display of a GridView control based on specific attributes for each column. In ASP.NET, this can be done by utilizing the `RowDataBound` event of the GridView to access the specific attributes and conditionally format the displayed data based on those attributes.
Here’s a step-by-st... | 31,113 | [
{
"from": "human",
"value": "I'm binding a datatable to a gridview control, and when I format each column I need to format the data based on whether that column has a particular custom attribute. In this case, a column can represent:\n\na text box (in which case I just display the text from the textbox in t... |
I have intermittent crashes occurring in my ActiveMQ libraries due to the way I'm using the activemq-cpp API. It'd be much easier to debug the issue if I could observe every function being called leading up to the crash. Are there any quick ways to trace the entry and exit of functions in a Visual Studio 2005 c++ mul... | Debugging intermittent crashes in a multithreaded application can be challenging, but there are several strategies you can use in Visual Studio 2005 to trace the function calls leading up to the crash. Here are some methods you can consider:
### 1. **Use Debugging Breakpoints**
You can set breakpoints at the entry of... | 24,290 | [
{
"from": "human",
"value": "I have intermittent crashes occurring in my ActiveMQ libraries due to the way I'm using the activemq-cpp API. It'd be much easier to debug the issue if I could observe every function being called leading up to the crash. Are there any quick ways to trace the entry and exit of ... |
I have a Winforms application created in Visual Studio 2005 Pro, it connects to an SQL Server 2005 database using the SqlConnection / SqlCommand / SqlDataAdapter classes to extract data. I have stored procedures in my database to return the data to me.
What is the best way to handle queries that take a "long time" to c... | Handling long-running queries in a WinForms application requires performing the database operations on a background thread, allowing the UI to remain responsive. You can achieve this using the `BackgroundWorker` class or by employing `async` and `await` for asynchronous programming (though `async/await` is not supporte... | 28,651 | [
{
"from": "human",
"value": "I have a Winforms application created in Visual Studio 2005 Pro, it connects to an SQL Server 2005 database using the SqlConnection / SqlCommand / SqlDataAdapter classes to extract data. I have stored procedures in my database to return the data to me.\nWhat is the best way to h... |
I have a DataGridView in a VB.NET app that I have limited to cell selection only. The control has two columns, the first is not editable, the second is editable. I have a ContextMenuStrip that provides some additional functionality and I am able to make it appear when an editable cell receives a right click and is not ... | In VB.NET, the default context menu for text boxes (and other editing controls) provides functionality such as cut, copy, paste, and select all. When you assign your own `ContextMenuStrip` to the editing control in the `EditingControlShowing` event, it replaces the default system context menu.
To merge your `ContextMe... | 29,506 | [
{
"from": "human",
"value": "I have a DataGridView in a VB.NET app that I have limited to cell selection only. The control has two columns, the first is not editable, the second is editable. I have a ContextMenuStrip that provides some additional functionality and I am able to make it appear when an editabl... |
OS (usually security-based) patches and hotfixes that Microsoft releases to the community normally consist of, in my understanding, a series of updated DLLs or other binaries.
How does Microsoft, and other companies like it, ensure that that hotfixes don't clash with each other? Do they always go for a cumulative patc... | Managing patch dependencies and ensuring that hotfixes don't clash with each other is a complex but crucial aspect of software development and maintenance, particularly for large systems like operating systems. Microsoft and other companies employ various strategies to handle this effectively. Here are some of the prac... | 30,241 | [
{
"from": "human",
"value": "OS (usually security-based) patches and hotfixes that Microsoft releases to the community normally consist of, in my understanding, a series of updated DLLs or other binaries.\nHow does Microsoft, and other companies like it, ensure that that hotfixes don't clash with each other... |
What to do automatic nightly build of .NET web application and upload to the test server.
Or, if this tool is overkill, please suggest something else.
| Automating the nightly build and deployment of a .NET web application can be achieved using various tools and approaches. Depending on your team's size, the complexity of the project, and budget, you can choose from several options. Below, I outline a common approach using CI/CD tools, as well as some simpler alternati... | 30,415 | [
{
"from": "human",
"value": "What to do automatic nightly build of .NET web application and upload to the test server. \nOr, if this tool is overkill, please suggest something else.\n"
},
{
"from": "gpt",
"value": "Automating the nightly build and deployment of a .NET web application can be ach... |
Given a result set, how can I determin the actual names of the fields specified in the query (NOT their aliases).
$query = "SELECT first AS First_Name, last AS Last_Name FROM people";
$dbResult = mysql_query($query);
$fieldCount = mysql_num_fields($dbResult);
for ($i=0; $i<$fieldCount; $i++) {
// Set som... | In your example, you're using `mysql_field_name()` which returns the alias name if one is provided in the query. Unfortunately, there is no direct function in the `mysql` extension (or its successors like `mysqli` or `PDO`) that allows you to get the original column names if they are aliased in the SELECT statement. Ho... | 31,004 | [
{
"from": "human",
"value": "Given a result set, how can I determin the actual names of the fields specified in the query (NOT their aliases).\n$query = \"SELECT first AS First_Name, last AS Last_Name FROM people\";\n$dbResult = mysql_query($query);\n\n$fieldCount = mysql_num_fields($dbResult);\nfor ($i=0; ... |
Can you use VMWare's Remote Console in Google Chrome? The main VMWare Infrastructure Web Access works fine, but the Remote Console shows an error "The VMware Remote Console Plug-in is not installed or could not be found." Does this plugin exist?
| As of my last knowledge update in October 2023, VMware Remote Console (VMRC) relies on a browser plugin that may not be compatible with modern browsers like Google Chrome due to changes in how browsers handle plugins and extensions.
### Here are a few points regarding this issue:
1. **Plugin Support**: Many modern b... | 32,184 | [
{
"from": "human",
"value": "Can you use VMWare's Remote Console in Google Chrome? The main VMWare Infrastructure Web Access works fine, but the Remote Console shows an error \"The VMware Remote Console Plug-in is not installed or could not be found.\" Does this plugin exist?\n"
},
{
"from": "gpt",
... |
Uhm I'm not sure if anyone has encountered this problem
a brief description is on IE6 any <select> objects get displayed over any other item, even div's... meaning if you have a fancy javascript effect that displays a div that's supposed to be on top of everything (e.g: lightbox, multibox etc..) onclick of a certain e... | This is a well-known issue with Internet Explorer 6 (IE6) where `<select>` elements, especially those that are dropdowns, are rendered on top of other elements, which can cause problems with z-index stacking. Here are a few alternatives to using the iframe shim solution that you can consider:
1. **CSS Hacks**: Sometim... | 29,485 | [
{
"from": "human",
"value": "Uhm I'm not sure if anyone has encountered this problem \na brief description is on IE6 any <select> objects get displayed over any other item, even div's... meaning if you have a fancy javascript effect that displays a div that's supposed to be on top of everything (e.g: lightb... |
I started web programming with raw PHP, gradually moving on to its various frameworks, then to Django and Rails. In every framework I've used, pretty much everything I need to do with a database (even involving relatively complex things like many-to-many relationships) could be taken care of by the automatically genera... | Your experience with web frameworks like Django, Rails, and others highlights a key difference in the design philosophy of various programming environments, especially when it comes to Java and its frameworks, such as Spring and Hibernate.
### Understanding Java and Its Frameworks
1. **Java's Verbosity**: Java is oft... | 27,626 | [
{
"from": "human",
"value": "I started web programming with raw PHP, gradually moving on to its various frameworks, then to Django and Rails. In every framework I've used, pretty much everything I need to do with a database (even involving relatively complex things like many-to-many relationships) could be ... |
A colleague recently asked me how to deep-clone a Map and I realized that I probably have never used the clone() method- which worries me.
What are the most common scenarios you have found where you need to clone an object?
| Cloning objects can be an important operation in various programming scenarios, especially when you want to create a new instance of an object with the same properties as the original without affecting the original object's state. Here are some common scenarios where cloning is useful:
1. **Immutable Data Structures**... | 29,941 | [
{
"from": "human",
"value": "A colleague recently asked me how to deep-clone a Map and I realized that I probably have never used the clone() method- which worries me.\nWhat are the most common scenarios you have found where you need to clone an object?\n"
},
{
"from": "gpt",
"value": "Cloning o... |
javaspec.org should contain a java-related wiki; but it seems down... Is this only temporary or is it down 'forever'?
| I don't have real-time access to the internet to check the current status of websites, including javaspec.org. If the site is down, it could be for various reasons, such as server maintenance, technical issues, or it may be permanently taken offline. To determine if it's a temporary issue or a more permanent situation,... | 33,856 | [
{
"from": "human",
"value": "javaspec.org should contain a java-related wiki; but it seems down... Is this only temporary or is it down 'forever'?\n"
},
{
"from": "gpt",
"value": "I don't have real-time access to the internet to check the current status of websites, including javaspec.org. If th... |
Is contract to interface as object is to class?
What is the need to differentiate identical things like this, from the code to the executing code? I sort of get the idea behind naming a class a class and the instantiated executing class an object, but overall, is that the only reason for these semi-redundant terms?
| The relationship between contracts and interfaces can be somewhat analogous to the relationship between classes and objects, but it's important to understand the distinctions involved.
### Contracts vs. Interfaces
- **Contract**: A contract specifies a set of rules, conditions, and behaviors that must be adhered to i... | 30,366 | [
{
"from": "human",
"value": "Is contract to interface as object is to class?\nWhat is the need to differentiate identical things like this, from the code to the executing code? I sort of get the idea behind naming a class a class and the instantiated executing class an object, but overall, is that the only... |
I have been interested in database developing for some time now and decided that MS SQL has a lot to offer in terms of T-SQL and generally much more functionality (not saying that Oracle or Postgres don't have that).
I would like to know:
What are the big paradigm changes I
should expect to see?
How much effort do ... | It’s great to hear that you’re interested in database development, particularly with MS SQL Server! Let’s break down your questions to give you a comprehensive overview.
### 1. Big Paradigm Changes in MS SQL
Transitioning to MS SQL, especially if you're familiar with other database systems, you might notice several p... | 25,072 | [
{
"from": "human",
"value": "I have been interested in database developing for some time now and decided that MS SQL has a lot to offer in terms of T-SQL and generally much more functionality (not saying that Oracle or Postgres don't have that).\nI would like to know: \n\nWhat are the big paradigm changes ... |
I always have found the open source space interesting but have never actually participated in any projects. I recently had what I thought was a great a idea that was different from other projects I had seen in the area (in case it matters it was a .NET DI framework).
My question is if I have a funky idea should I join... | It's great to hear that you're interested in contributing to the open source community! Your question touches on several important considerations when deciding how to proceed with your idea.
### Joining an Existing Project
1. **Collaboration**: If you join an existing project, you can benefit from the experience of e... | 28,691 | [
{
"from": "human",
"value": "I always have found the open source space interesting but have never actually participated in any projects. I recently had what I thought was a great a idea that was different from other projects I had seen in the area (in case it matters it was a .NET DI framework). \nMy questi... |
I'm using WinSNMP in c++ to send snmp traps. For backwards compatibility I’m required to send v1 snmp traps. WinSNMP works with v2 traps but is capable of converting those v2 traps to v1 when sending the trap. I use SnmpSetTranslateMode(SNMPAPI_UNTRANSLATED_V1) in order to do that. I also added the sysUpTime oid (1.3.6... | To address your issues with sending SNMP v1 traps using the WinSNMP API, let’s break down your concerns:
### Issue 1: Agent Address Field is 0.0.0.0
The agent-addr field in SNMP traps represents the IP address of the originating SNMP agent. When sending SNMP v1 traps, if the agent address is always reported as `0.0.0... | 28,044 | [
{
"from": "human",
"value": "I'm using WinSNMP in c++ to send snmp traps. For backwards compatibility I’m required to send v1 snmp traps. WinSNMP works with v2 traps but is capable of converting those v2 traps to v1 when sending the trap. I use SnmpSetTranslateMode(SNMPAPI_UNTRANSLATED_V1) in order to do th... |
I want to use Perl to extract information from a Certificate Signing Request, preferably without launching an external openssl process. Since a CSR is stored in a base64-encoded ASN.1 format, I tried the Convert::PEM module. But it requires an ASN.1 description of the content, which I haven't been able to put together ... | To extract information from a Certificate Signing Request (CSR) in Perl without invoking an external OpenSSL process, you can use the `Crypt::OpenSSL::PKCS10` module, which is specifically designed for handling PKCS#10 (the standard for CSRs).
Here's how you can use `Crypt::OpenSSL::PKCS10` to parse a CSR:
1. First, ... | 32,855 | [
{
"from": "human",
"value": "I want to use Perl to extract information from a Certificate Signing Request, preferably without launching an external openssl process. Since a CSR is stored in a base64-encoded ASN.1 format, I tried the Convert::PEM module. But it requires an ASN.1 description of the content, w... |
I was wondering if i could get some help with two questions I have:
Firstly, is is possible, assuming I have a random variable to load up two different registration screens? Ie. one with and without the captcha? or one with and without some other stuff i would like to use?
Secondly, is it possible to have a second log ... | Certainly! Here are answers to your questions:
### 1. Loading Different Registration Screens Based on a Random Variable
Yes, it is possible to load two different registration screens based on a random variable. This can be accomplished by using conditional rendering in your code. For example, in a web application, yo... | 33,190 | [
{
"from": "human",
"value": "I was wondering if i could get some help with two questions I have:\nFirstly, is is possible, assuming I have a random variable to load up two different registration screens? Ie. one with and without the captcha? or one with and without some other stuff i would like to use?\nSec... |
Are there any good professional associations for IT Managers that I could join and network with other managers to share ideas and information?
| Yes, there are several professional associations for IT managers that can provide networking opportunities, resources, and platforms to share ideas and information. Here are some of the prominent ones:
1. **IT Management Association (ITMA)**: This association focuses specifically on IT managers, providing resources, n... | 34,081 | [
{
"from": "human",
"value": "Are there any good professional associations for IT Managers that I could join and network with other managers to share ideas and information?\n"
},
{
"from": "gpt",
"value": "Yes, there are several professional associations for IT managers that can provide networkin... |
My rails app is in a svn repository, but several of the plugins are installed through git and later added to the svn repo. How can I update these plugins? I can't seem to get script/plugin update to do anything. I'd really like to update activemerchant to get rid of the Inflector warnings.
| Updating plugins that were originally installed via Git and later added to an SVN repository can be a bit tricky, especially if you're accustomed to using the `script/plugin` command, which might not be effective for Git-managed plugins. Here's a suggested approach to update your plugins, including ActiveMerchant:
###... | 25,751 | [
{
"from": "human",
"value": "My rails app is in a svn repository, but several of the plugins are installed through git and later added to the svn repo. How can I update these plugins? I can't seem to get script/plugin update to do anything. I'd really like to update activemerchant to get rid of the Infle... |
I am implementing NHibernate into an existing web application. However, we have some other processes that do bulk inserting and updating on the database. How can I make NHibernate aware that changes are occurring on the backend db that were not initiated through NHibernate?
Most of the info that I have read around NHib... | When using NHibernate in a web application, especially in the context of bulk inserts/updates happening outside of NHibernate, there are several considerations to ensure that your application remains consistent and performant.
### Managing Session Lifecycle
1. **Session Management**: Storing the NHibernate `ISession`... | 30,160 | [
{
"from": "human",
"value": "I am implementing NHibernate into an existing web application. However, we have some other processes that do bulk inserting and updating on the database. How can I make NHibernate aware that changes are occurring on the backend db that were not initiated through NHibernate?\nMos... |
As part of a JavaScript Profiler for IE 6/7 I needed to load a custom debugger that I created into IE. I got this working fine on XP, but couldn't get it working on Vista (full story here: http://damianblog.com/2008/09/09/tracejs-v2-rip/).
The call to GetProviderProcessData is failing on Vista. Anyone have any sugges... | The issue you are encountering with `GetProviderProcessData` failing on Windows Vista, even though it works on XP, might stem from various factors, such as differences in how the COM components are handled or security features introduced in Vista.
Here are a few suggestions to help you troubleshoot and potentially res... | 12,141 | [
{
"from": "human",
"value": "As part of a JavaScript Profiler for IE 6/7 I needed to load a custom debugger that I created into IE. I got this working fine on XP, but couldn't get it working on Vista (full story here: http://damianblog.com/2008/09/09/tracejs-v2-rip/).\nThe call to GetProviderProcessData is... |
My application is using struts 1.1.
I'm trying to group URL forwards, using wildcards.
For example, if the action is like this:
action path="/edit/product" type="classname"
forward
name="success"
path=".myapp.main"
action
Replacing the first line above with
action path="/edit/*" type="classname" d... | Struts 1.1 does not support wildcard patterns directly in the `action` element in `struts-config.xml`. The configuration syntax requires explicit mappings for each action path, and it does not allow wildcards to match multiple paths.
To achieve a similar effect as wildcard routing, you typically have a couple of opti... | 33,184 | [
{
"from": "human",
"value": "My application is using struts 1.1.\nI'm trying to group URL forwards, using wildcards. \nFor example, if the action is like this:\n \naction path=\"/edit/product\" type=\"classname\" \n forward \n name=\"success\" \n path=\".myapp.main\" \naction \nReplacing the first l... |
I have several databases for my applications that use SQL Server 2005 mirroring to keep a nice copy of the data somewhere else. Works like a charm, however, the log file just seems to be growing and growing, one is at 15GB for a 3GB database.
Normally, I can just shrink it - however an error pops up that this speci... | When using SQL Server 2005 mirroring, the behavior of the transaction log file can be somewhat different compared to databases that do not employ mirroring. Here are some key points to understand regarding your situation:
### Transaction Log Growth
1. **Recovery Model**: If your database is in Full Recovery Model (whi... | 32,745 | [
{
"from": "human",
"value": "I have several databases for my applications that use SQL Server 2005 mirroring to keep a nice copy of the data somewhere else. Works like a charm, however, the log file just seems to be growing and growing, one is at 15GB for a 3GB database. \nNormally, I can just shrink it ... |
I've got an ASP.NET app that runs against a SQL Server 2005 database. Once a day, I need to run a series of procs & SSIS packages in a SQL Agent job to update data in the tables. The SQL Agent job will run on a schedule unattended.
There are small windows of opportunity for the web app to fail when the SQL Agent Job s... | Hi Chris,
Your scenario is quite common when managing web applications that rely heavily on database updates through scheduled jobs. Both approaches you mentioned (using `app_offline.htm` and the `MAINTMODE` boolean) can work effectively, but each has its trade-offs. Here are some thoughts on your options and addition... | 30,552 | [
{
"from": "human",
"value": "I've got an ASP.NET app that runs against a SQL Server 2005 database. Once a day, I need to run a series of procs & SSIS packages in a SQL Agent job to update data in the tables. The SQL Agent job will run on a schedule unattended. \nThere are small windows of opportunity for th... |
I am coding in ColdFusion, but trying to stay in cfscript, so I have a function that allows me to pass in a query to run it with
<cfquery blah >
#query#
</cfquery>
Somehow though, when I construct my queries with sql = "SELECT * FROM a WHERE b='#c#'" and pass it in, ColdFusion has replaced the single quotes with ... | The issue you are facing with the single quotes being doubled when using the `cfquery` tag in ColdFusion is related to how ColdFusion processes string literals, particularly when they contain single quotes. In ColdFusion, single quotes within strings are often escaped by doubling them.
Here’s a clearer explanation and... | 32,022 | [
{
"from": "human",
"value": "I am coding in ColdFusion, but trying to stay in cfscript, so I have a function that allows me to pass in a query to run it with \n\n<cfquery blah >\n #query#\n</cfquery> \nSomehow though, when I construct my queries with sql = \"SELECT * FROM a WHERE b='#c#'\" and pass it in,... |
I have built the IronPythonIntegration solution that comes with the Visual Studio 2005 SDK (as explained at http://www.izume.com/2007/10/13/integrating-ironpython-with-visual-studio-2005), and I can now use IronPython projects inside Visual Studio 2005. However, to let a Python file import from the standard library I n... | To set up import paths for all IronPython projects in Visual Studio 2005, you can create a `site.py` file in your IronPython installation directory, which allows you to configure the `sys.path` automatically when any IronPython script is executed.
Here’s how you can do it:
1. **Locate your IronPython installation**: ... | 27,007 | [
{
"from": "human",
"value": "I have built the IronPythonIntegration solution that comes with the Visual Studio 2005 SDK (as explained at http://www.izume.com/2007/10/13/integrating-ironpython-with-visual-studio-2005), and I can now use IronPython projects inside Visual Studio 2005. However, to let a Python ... |
CString is quite handy, while std::string is more compatible with STL container. I am using hash_map. However, hash_map does not support CStrings as keys, so I want to convert the CString into a std::string.
Writing a CString hash function seems to take a lot of time.
CString -----> std::string
How can I do this?
std:... | Your understanding of converting between `CString` and `std::string`, as well as `CString` and `std::wstring`, is mostly correct, but there are some nuances to pay attention to. Let's go through each conversion and clarify any points that might lead to potential issues.
### CString to std::string
Your function to con... | 30,470 | [
{
"from": "human",
"value": "CString is quite handy, while std::string is more compatible with STL container. I am using hash_map. However, hash_map does not support CStrings as keys, so I want to convert the CString into a std::string.\nWriting a CString hash function seems to take a lot of time.\nCString ... |
We are using Oracle ADF Faces in a new web project. I am always looking for an unobtrusive user experience with progressive enhancement and valid XHTML output. It seems however that ADF Faces produce ugly, non-validating (table based) HTML output that reminds me of 1994 when using their standard components.
Is there a ... | Using Oracle ADF Faces indeed presents some challenges when it comes to generating clean, valid XHTML output, especially if you are aiming for a more modern, unobtrusive user experience. Here are some strategies to improve the situation:
### 1. **Custom Skin and Templates**
Oracle ADF Faces allows you to create custom... | 32,210 | [
{
"from": "human",
"value": "We are using Oracle ADF Faces in a new web project. I am always looking for an unobtrusive user experience with progressive enhancement and valid XHTML output. It seems however that ADF Faces produce ugly, non-validating (table based) HTML output that reminds me of 1994 when usi... |
I am trying to render a model in Direct3D using DrawIndexedPrimitives. However, I am not able to see it on screen. What are the usual methods used to debug a Direct3D model?
I've tried the following:
Switched off back face culling
Used PrimitiveType.LineStrip instead of PrimitiveType.TriangleStrip
Several combinations... | Debugging a model rendering issue in Direct3D can be quite challenging. Since you’ve already tried several common methods, here are some additional steps you can take to diagnose and resolve the rendering issue:
### 1. Check Vertex Buffer and Index Buffer
- **Correct Initialization**: Ensure your vertex and index buff... | 29,182 | [
{
"from": "human",
"value": "I am trying to render a model in Direct3D using DrawIndexedPrimitives. However, I am not able to see it on screen. What are the usual methods used to debug a Direct3D model?\nI've tried the following:\n\nSwitched off back face culling\nUsed PrimitiveType.LineStrip instead of Pri... |
/dev/random and /dev/urandom use environmental noise to generate randomness.
With a virtualised server there can be multiple instances of an Operating System on one hardware configuration. These operating systems will all be sourcing their randomness from the same environmental noise.
Does this mean as a group the ran... | The use of virtualized servers indeed presents some unique challenges regarding the generation of random numbers, particularly with respect to how systems like `/dev/random` and `/dev/urandom` function. Here’s a breakdown of the potential impacts of virtualization on cryptographically strong random number generators (C... | 29,275 | [
{
"from": "human",
"value": "/dev/random and /dev/urandom use environmental noise to generate randomness. \nWith a virtualised server there can be multiple instances of an Operating System on one hardware configuration. These operating systems will all be sourcing their randomness from the same environmenta... |
I am constructing a search page with a textbox and a button for now, and probably a dropdown to filter results later on. I have my button's PostBackUrl set to my search page (~/search.aspx). Is there an easy way to pass the value in the text box to the search page?
| Yes, you can easily pass the value from the text box to your search page using query string parameters. When the button is clicked, you can redirect to your search page with the value from the text box included in the URL. Here’s how you can do it:
### Steps to Pass TextBox Value to Search Page
1. **Add the TextBox a... | 33,123 | [
{
"from": "human",
"value": "I am constructing a search page with a textbox and a button for now, and probably a dropdown to filter results later on. I have my button's PostBackUrl set to my search page (~/search.aspx). Is there an easy way to pass the value in the text box to the search page?\n"
},
{... |
I have source in a bunch of subdirectories like:
src/widgets/apple.cpp
src/widgets/knob.cpp
src/tests/blend.cpp
src/ui/flash.cpp
In the root of the project I want to generate a single Makefile using a rule like:
%.o: %.cpp
$(CC) -c $<
build/test.exe: build/widgets/apple.o build/widgets/knob.o build/tests/blend.o s... | To generate object files in a different directory (like `build/widgets/`) from their source files (like `src/widgets/apple.cpp`), you'll need to modify the `Makefile` rules a bit. The implicit rule `%.o: %.cpp` only works when the object file is in the same directory as the source file.
You can achieve your goal by ex... | 32,992 | [
{
"from": "human",
"value": "I have source in a bunch of subdirectories like:\nsrc/widgets/apple.cpp\nsrc/widgets/knob.cpp\nsrc/tests/blend.cpp\nsrc/ui/flash.cpp\n\nIn the root of the project I want to generate a single Makefile using a rule like:\n%.o: %.cpp\n $(CC) -c $<\n\nbuild/test.exe: build/widgets... |
Say I have jquery code like this:
html += '<div class="index">' + item.index + '</div>';
// many more similar html += statements
// load items
$('div').append(html);
This html is getting too unmanageable, so I'd like to move it to an external file. What's the best way to pass variables to the HTML as i load it? Do i... | To manage your HTML more effectively and keep your JavaScript clean, you can use a templating engine or a front-end framework that supports components. However, if you prefer to stay with jQuery and plain JavaScript, you can use a simple approach by loading HTML from an external file using jQuery's AJAX capabilities an... | 27,873 | [
{
"from": "human",
"value": "Say I have jquery code like this:\nhtml += '<div class=\"index\">' + item.index + '</div>';\n\n// many more similar html += statements\n\n// load items\n$('div').append(html);\n\nThis html is getting too unmanageable, so I'd like to move it to an external file. What's the best w... |
I have an ASP.NET page which pulls a set of images from a database table, and using an enumerator, goes through all of them and displays then.
This all happens in the codebehind (VB.NET), where the code adds the placeholder and some controls inside tables (tables inside the placeholder).
I've added a button to this pla... | In ASP.NET, you can create buttons programmatically and attach event handlers to them. For your scenario, you want to create buttons that, when clicked, trigger a JavaScript function to show a large preview of an image using a lightbox.
Here's how you can do this:
1. **Creating the Button**: When you create the butto... | 28,120 | [
{
"from": "human",
"value": "I have an ASP.NET page which pulls a set of images from a database table, and using an enumerator, goes through all of them and displays then.\nThis all happens in the codebehind (VB.NET), where the code adds the placeholder and some controls inside tables (tables inside the pla... |
I'm looking to compute the Moore-Penrose pseudo-inverse of a matrix in C++, can someone point me to a library implementation or a numerical recipe?
Thanks!
| To compute the Moore-Penrose pseudo-inverse of a matrix in C++, you can use the Eigen library, which is a popular C++ template library for linear algebra. Eigen provides an easy way to compute the pseudo-inverse using Singular Value Decomposition (SVD).
### Using Eigen
First, you need to install Eigen. You can downlo... | 20,106 | [
{
"from": "human",
"value": "I'm looking to compute the Moore-Penrose pseudo-inverse of a matrix in C++, can someone point me to a library implementation or a numerical recipe?\nThanks!\n"
},
{
"from": "gpt",
"value": "To compute the Moore-Penrose pseudo-inverse of a matrix in C++, you can use t... |
This is a registered bug (Bug ID: 6515708) but does anyone have a workaround for it?
Scenario
javascript calls OpenDialog() method in applet
applet starts new thread which opens the AWT FileDialog
on completion, the file name is read and the javascript method OnDialogComplete is called
At this point the dialog is disp... | It sounds like you're encountering a known issue with Java applets and the way they interact with JavaScript and browser dialogs, particularly the AWT FileDialog in conjunction with Internet Explorer. Here are some workarounds you might consider:
1. **Delay the Dialog Disposal**: After the `OnDialogComplete` is called... | 31,069 | [
{
"from": "human",
"value": "This is a registered bug (Bug ID: 6515708) but does anyone have a workaround for it?\nScenario\n\njavascript calls OpenDialog() method in applet\napplet starts new thread which opens the AWT FileDialog\non completion, the file name is read and the javascript method OnDialogCompl... |
I've been developing a simple website using asp.net MVC and I'm starting to add some JQuery\JSON goodness.
My problem is up until now all my 'Views' have been strongly typed and I've been building the view based on data from ViewData.Model.MyViewsData. Now once the view has been rendered and I do a Ajax style reques... | When working with ASP.NET MVC and using jQuery/AJAX to update parts of your view dynamically, you have a couple of options to effectively manage your data and update your view.
### Option 1: Fetch Data with jQuery/AJAX
This approach involves using AJAX calls to fetch data from your server in JSON format. You can comp... | 24,776 | [
{
"from": "human",
"value": "I've been developing a simple website using asp.net MVC and I'm starting to add some JQuery\\JSON goodness. \nMy problem is up until now all my 'Views' have been strongly typed and I've been building the view based on data from ViewData.Model.MyViewsData. Now once the view has... |
I need to be able to compare some month names I have in an array.
It would be nice if there were some direct way like:
Month.toInt("January") > Month.toInt("May")
My Google searching seems to suggest the only way is to write your own method, but this seems like a common enough problem that I would think it would have ... | In .NET, while there isn't a built-in method in the `Month` structure or any direct method to convert month names to their corresponding integers, you can achieve this easily by leveraging the `DateTime` class. The `DateTime` class provides a method to parse a string representation of a date, which includes month names... | 34,036 | [
{
"from": "human",
"value": "I need to be able to compare some month names I have in an array.\nIt would be nice if there were some direct way like:\nMonth.toInt(\"January\") > Month.toInt(\"May\")\n\nMy Google searching seems to suggest the only way is to write your own method, but this seems like a common... |
currently I have the following code:
String select = qry.substring("select ".length(),qry2.indexOf(" from "));
String[] attrs = select.split(",");
which works for the most parts but fails if given the following:
qry = "select a,b,c,DATETOSTRING(date_attr_name,'mm/dd/yyyy') from tbl_a";
what I'm looking for is the reg... | To effectively handle the splitting of the columns in a SQL `SELECT` statement while accounting for possible edge cases (such as function calls, commas inside function parameters, and spaces), you can use a regular expression that captures the intended behavior. Specifically, you want to split the column list by commas... | 34,021 | [
{
"from": "human",
"value": "currently I have the following code:\nString select = qry.substring(\"select \".length(),qry2.indexOf(\" from \"));\nString[] attrs = select.split(\",\");\n\nwhich works for the most parts but fails if given the following:\nqry = \"select a,b,c,DATETOSTRING(date_attr_name,'mm/dd... |
Is there a way to exchange ERD diagram from one tool to other as XMI exists for exchanging UML documents?
| Yes, there is a way to exchange ERD (Entity-Relationship Diagram) models between different tools, though it may not be as standardized as XMI for UML. Several approaches and formats can be used to facilitate this exchange:
1. **XML-based Formats**: Some ERD tools support XML formats that can be exported and imported a... | 34,967 | [
{
"from": "human",
"value": "Is there a way to exchange ERD diagram from one tool to other as XMI exists for exchanging UML documents?\n"
},
{
"from": "gpt",
"value": "Yes, there is a way to exchange ERD (Entity-Relationship Diagram) models between different tools, though it may not be as standa... |
Are there any hard limits on the number of rows in a table in a sql server table? I am under the impression the only limit is based around physical storage.
At what point does performance significantly degrade, if at all, on tables with and without an index. Are there any common practicies for very large tables?
To giv... | In SQL Server, the theoretical limits on the number of rows in a table are largely dictated by factors like physical storage and the maximum size of the database itself. Here are the key points to consider:
### Limits on Rows in a SQL Server Table
1. **Maximum Database Size**: SQL Server has a maximum database size li... | 29,788 | [
{
"from": "human",
"value": "Are there any hard limits on the number of rows in a table in a sql server table? I am under the impression the only limit is based around physical storage.\nAt what point does performance significantly degrade, if at all, on tables with and without an index. Are there any commo... |
In some of our projects, there's an class hierarchy that adds more parameters as it goes down the chain. At the bottom, some of the classes can have up to 30 parameters, 28 of which are just being passed into the super constructor.
I'll acknowledge that using automated DI through something like Guice would be nice, but... | You've highlighted a common challenge in object-oriented programming, particularly when dealing with deep class hierarchies and constructors that require many parameters. There are several approaches you can consider to improve the situation, even while constrained to Java. Here are some potential solutions:
### 1. **... | 32,097 | [
{
"from": "human",
"value": "In some of our projects, there's an class hierarchy that adds more parameters as it goes down the chain. At the bottom, some of the classes can have up to 30 parameters, 28 of which are just being passed into the super constructor.\nI'll acknowledge that using automated DI throu... |
How do I pick/ delete all the documents from Solr using the boolean NOT notion?
i.e. How do I delete all the documents from Solr who's id does NOT start with A59?
| To delete documents from Apache Solr where the `id` does not start with a specific prefix (e.g., `A59`), you can use a query with the boolean NOT operator. Here's how to do it:
### Using the Solr Admin UI or CURL:
1. **Solr Admin UI**:
- Go to the "Query" section of the Solr Admin UI.
- Use the following synta... | 34,317 | [
{
"from": "human",
"value": "How do I pick/ delete all the documents from Solr using the boolean NOT notion?\ni.e. How do I delete all the documents from Solr who's id does NOT start with A59?\n"
},
{
"from": "gpt",
"value": "To delete documents from Apache Solr where the `id` does not start wit... |
It is often handy to have a canonical representation of a language (in my case they are usually domain specific languages); however, I believe there are strict limits on the expressiveness of the languages involved that determine whether a canonical form can be determined and/or created for an arbitrary program in that... | The question of whether a canonical representation can be generated for a given programming language or domain-specific language (DSL) is deeply rooted in the fields of formal languages, automata theory, and computational complexity. Here’s a breakdown of some important aspects related to your question:
### 1. **Expre... | 30,252 | [
{
"from": "human",
"value": "It is often handy to have a canonical representation of a language (in my case they are usually domain specific languages); however, I believe there are strict limits on the expressiveness of the languages involved that determine whether a canonical form can be determined and/or... |
I am having trouble with a very simple Perl process. I am basically querying an Oracle database and I want to load it into Excel. I have been able to use DBIx::Dump and it works. However, I need to be able to use a variety of Excel formatting tools. And I think Spreadsheet::WriteExcel is the best module that output... | You're facing an issue in your Perl script where you try to write data fetched from an Oracle database into an Excel file using the `Spreadsheet::WriteExcel` module. The error you're encountering indicates that the data being passed to the `write` method is not being handled correctly, specifically when trying to write... | 29,224 | [
{
"from": "human",
"value": "I am having trouble with a very simple Perl process. I am basically querying an Oracle database and I want to load it into Excel. I have been able to use DBIx::Dump and it works. However, I need to be able to use a variety of Excel formatting tools. And I think Spreadsheet::... |
When we perform a fork in Unix, open file handles are inherited, and if we don't need to use them we should close them. However, when we use libraries, file handles may be opened for which we do not have access to the handle. How do we check for these open file handles?
| In a Unix-like operating system, when a process forks, it inherits all open file descriptors from the parent process. While it's easy to manage file descriptors you explicitly open, it can be challenging to deal with file handles opened by libraries or other parts of your code that you do not directly control.
To chec... | 32,020 | [
{
"from": "human",
"value": "When we perform a fork in Unix, open file handles are inherited, and if we don't need to use them we should close them. However, when we use libraries, file handles may be opened for which we do not have access to the handle. How do we check for these open file handles?\n"
},
... |
We have a monolithic MFC GUI app that is nearing the end of it's life in C++. We are planning to build new functionality in C# and pass data between each app.
Question is: What is the best approach for passing data between C++ and C#?
Notes:
Both ends will have a GUI front end and will probably only need to pass simpl... | When it comes to passing data between a C++ MFC GUI application and a C# application, there are several viable inter-process communication (IPC) methods, each with its own advantages and disadvantages. Here’s a breakdown of some common approaches and considerations for your use case:
### 1. Named Pipes
**Advantages:**... | 27,859 | [
{
"from": "human",
"value": "We have a monolithic MFC GUI app that is nearing the end of it's life in C++. We are planning to build new functionality in C# and pass data between each app.\nQuestion is: What is the best approach for passing data between C++ and C#? \nNotes:\nBoth ends will have a GUI front e... |
I have a really large VB6 code base with a ton of 3rd party controls. Want to move it to .NET. Rewriting it is out of question - the client sees no value in spending money to get the same thing. Moving to .NET with the built-in upgrade wizard is basically a non-starter.
Has anyone tried the VB Migration Partner from... | Migrating a large VB6 codebase to .NET can indeed be a complex task, especially when dealing with numerous third-party controls and the limitations of the built-in upgrade wizard. The VB Migration Partner is a third-party tool designed specifically for this purpose, and many developers have reported positive experience... | 30,789 | [
{
"from": "human",
"value": "I have a really large VB6 code base with a ton of 3rd party controls. Want to move it to .NET. Rewriting it is out of question - the client sees no value in spending money to get the same thing. Moving to .NET with the built-in upgrade wizard is basically a non-starter.\nHas ... |
I want to subclass the built-in DropDownList in ASP.NET so that I can add functionality to it and use it in my pages. I tried doing this with a UserControl but found that it doesn't expose the internal DropDownList (logically, I guess). I've googled for the answer but can't find anything.
I've come as far as writing t... | To subclass the built-in `DropDownList` in ASP.NET, you need to create a custom control that inherits from `DropDownList` and then register this custom control in your ASP.NET pages. Here's a step-by-step guide on how to do this.
### Step 1: Create a Custom DropDownList Class
First, create your custom dropdown class ... | 28,724 | [
{
"from": "human",
"value": "I want to subclass the built-in DropDownList in ASP.NET so that I can add functionality to it and use it in my pages. I tried doing this with a UserControl but found that it doesn't expose the internal DropDownList (logically, I guess). I've googled for the answer but can't find... |
I am working on a single sign-on login page using Shibboleth that will be used for a variety of web applications. Obviously we would like to make this page as secure and usable as possible while limiting the effects of phishing scams.
What are the best practices to keep in mind when designing a login page?
Some questio... | Designing a secure and user-friendly login page using Shibboleth, or any single sign-on (SSO) solution, is essential for protecting users from phishing attacks and ensuring a good user experience. Here are best practices and considerations based on your questions:
### 1. Consistency in Design:
- **Always Look the Same... | 24,855 | [
{
"from": "human",
"value": "I am working on a single sign-on login page using Shibboleth that will be used for a variety of web applications. Obviously we would like to make this page as secure and usable as possible while limiting the effects of phishing scams.\nWhat are the best practices to keep in mind... |
Today someone asked me what was wrong with their source code. It was obvious. "Use double equals in place of that single equal in that if statement. Um, I think..." As I remember some languages actually take a single equals for comparison. Since I sometimes forget or mix up the syntax details among the several lang... | Keeping track of multiple programming languages and their syntax can indeed be a challenge, especially with so many languages sharing similar constructs yet differing in specific details. Here are some tips to help you manage these complexities:
### 1. **Create a Cheat Sheet**
- Compile a quick-reference cheat sheet w... | 29,446 | [
{
"from": "human",
"value": "Today someone asked me what was wrong with their source code. It was obvious. \"Use double equals in place of that single equal in that if statement. Um, I think...\" As I remember some languages actually take a single equals for comparison. Since I sometimes forget or mix u... |
Sometimes normal FTP doesn't quite cut it... When you need to do secure FTP via SSIS packages, which product would you recommend?
Before answering, please see if someone has already suggested the same thing and, if so, vote it up.
NOTE: Ideally, it needs to handle both SSH and SSL FTP connections, but I'd consider two... | For secure FTP via SSIS packages, you have a few solid options:
1. **WinSCP**: This is a popular choice for handling SFTP (SSH File Transfer Protocol) and FTPS (FTP Secure/SSL). WinSCP can be integrated into SSIS using a script task or by executing a command line. It has a wide range of features and supports both SSH ... | 26,693 | [
{
"from": "human",
"value": "Sometimes normal FTP doesn't quite cut it... When you need to do secure FTP via SSIS packages, which product would you recommend?\nBefore answering, please see if someone has already suggested the same thing and, if so, vote it up.\nNOTE: Ideally, it needs to handle both SSH an... |
So here I am just about to start a big project using LINQ to SQL and then I read this:
Is LINQ to SQL Truly Dead? by Jonathan Allen for InfoQ.com
Well, I don't want to be supporting LINQ to SQL indefinitely if it's a dead end. So, how should I get started learning about ADO.NET Entity Framework?
| It's understandable to be concerned about the longevity and support of the technologies you're using in a project. While LINQ to SQL is still functional and can be used in certain scenarios, many developers have shifted towards using Entity Framework (EF) or Entity Framework Core due to their more extensive feature set... | 31,208 | [
{
"from": "human",
"value": "So here I am just about to start a big project using LINQ to SQL and then I read this:\nIs LINQ to SQL Truly Dead? by Jonathan Allen for InfoQ.com\nWell, I don't want to be supporting LINQ to SQL indefinitely if it's a dead end. So, how should I get started learning about ADO.N... |
I put together a sample scenario of my issue and I hope its enough for someone to point me in the right direction.
I have two tables
Products
Product Meta
I need a result set of the following
| It looks like you started describing your scenario involving two tables, "Products" and "Product Meta," but didn't complete your thought. To help you effectively, could you please provide more details about the structure of these tables (i.e., the columns they contain), what specific information you're looking to retri... | 35,741 | [
{
"from": "human",
"value": "I put together a sample scenario of my issue and I hope its enough for someone to point me in the right direction.\nI have two tables\nProducts\n\nProduct Meta\n\nI need a result set of the following\n\n"
},
{
"from": "gpt",
"value": "It looks like you started descri... |
To use modular exponentiation as you would require when using the Fermat Primality Test with large numbers (100,000+), it calls for some very large calculations.
When I multiply two large numbers (eg: 62574 and 62574) PHP seems to cast the result to a float. Getting the modulus value of that returns strange values.
$x ... | In PHP, when you multiply two large numbers, the result can exceed the maximum value for integers, which is why PHP might cast it to a float. However, using floats for large integers can lead to precision issues, as you've discovered. To handle very large integers accurately, you can use the `BCMath` or `GMP` libraries... | 31,133 | [
{
"from": "human",
"value": "To use modular exponentiation as you would require when using the Fermat Primality Test with large numbers (100,000+), it calls for some very large calculations.\nWhen I multiply two large numbers (eg: 62574 and 62574) PHP seems to cast the result to a float. Getting the modulus... |
I have a ListView inside of an Update Panel and wanted to change the Select Query from the code behind fired by a button click event and then reload the ListView inside of the Update Panel. Does anyone know how to cause the Update Panel to refresh from the code behind?
| Certainly! In an ASP.NET Web Forms application, if you're using an `UpdatePanel`, you can trigger a partial postback to refresh its contents programmatically. Here's a general approach to updating a `ListView` inside an `UpdatePanel` in response to a button click:
1. **Define Your ListView and UpdatePanel in ASPX:**
... | 27,679 | [
{
"from": "human",
"value": "I have a ListView inside of an Update Panel and wanted to change the Select Query from the code behind fired by a button click event and then reload the ListView inside of the Update Panel. Does anyone know how to cause the Update Panel to refresh from the code behind?\n"
},
... |
What issues or refactoring did you have to do when you upgraded from ASP.NET MVC Preview 5 to the newly released Beta version?
| Upgrading from ASP.NET MVC Preview 5 to the Beta version typically involves several key changes and considerations due to enhancements and improvements made during the transition. Here are some common issues and refactoring steps you might encounter:
1. **Namespace Changes**: There may be updates to the namespaces. Yo... | 32,635 | [
{
"from": "human",
"value": "What issues or refactoring did you have to do when you upgraded from ASP.NET MVC Preview 5 to the newly released Beta version?\n"
},
{
"from": "gpt",
"value": "Upgrading from ASP.NET MVC Preview 5 to the Beta version typically involves several key changes and conside... |
I am creating a small web page using PHP that will be accessed as an IFRAME from a couple of sites. I'm wanting to restrict access to this site to work ONLY within the "approved" sites, and not other sites or accessed directly. Does anyone have any suggestions? Is this even possible? The PHP site will be Apache, an... | To restrict access to your PHP web page so that it can only be accessed as an IFRAME from approved sites, you can use a combination of techniques, including checking the `HTTP_REFERER` header and implementing a cookie-based verification. Here's a step-by-step outline on how to accomplish this:
### Step 1: Check the HT... | 25,775 | [
{
"from": "human",
"value": "I am creating a small web page using PHP that will be accessed as an IFRAME from a couple of sites. I'm wanting to restrict access to this site to work ONLY within the \"approved\" sites, and not other sites or accessed directly. Does anyone have any suggestions? Is this even... |
PHP (among others) will execute the deepest function first, working its way out. For example,
$text = strtoupper(str_replace('_', ' ', file_get_contents('file.txt')));
I'm doing something very similar to the above example for a template parser. It looks for the tags
{@tag_name}
and replaces it with a variable of the ... | What you're trying to achieve is a nested replacement mechanism where the placeholders in a string can themselves contain other placeholders. In your example, the placeholder `{@a{@b}}` should be resolved in two steps:
1. The innermost placeholder is processed first, `{@b}`, which gets replaced by its corresponding va... | 32,974 | [
{
"from": "human",
"value": "PHP (among others) will execute the deepest function first, working its way out. For example,\n$text = strtoupper(str_replace('_', ' ', file_get_contents('file.txt')));\n\nI'm doing something very similar to the above example for a template parser. It looks for the tags\n{@tag_n... |
Do you have a good ignore pattern for svn, git, etc. that handles an eclipse workspace? I want to version handle all projects in the workspace. It has to ignore all the eclipse configuration, compiled files, and output folders.
| Certainly! When using version control systems like Git or SVN for Eclipse workspaces, it’s essential to ignore specific files and directories that are not necessary for version control, such as IDE configuration files, compiled files, and output folders. Below are the recommended ignore patterns for both Git and SVN th... | 31,750 | [
{
"from": "human",
"value": "Do you have a good ignore pattern for svn, git, etc. that handles an eclipse workspace? I want to version handle all projects in the workspace. It has to ignore all the eclipse configuration, compiled files, and output folders.\n"
},
{
"from": "gpt",
"value": "Certai... |
I need to select a datetime column in a table. However, I want the select statement to return the datetime as a nvarchar with the format DD/MM/YYYY.
| To select a datetime column and convert it to an `nvarchar` format of `DD/MM/YYYY` in SQL Server, you can use the `FORMAT` function or the `CONVERT` function. Below are examples of both methods.
### Using FORMAT function (SQL Server 2012 and later)
```sql
SELECT FORMAT(your_datetime_column, 'dd/MM/yyyy') AS FormattedD... | 35,629 | [
{
"from": "human",
"value": "I need to select a datetime column in a table. However, I want the select statement to return the datetime as a nvarchar with the format DD/MM/YYYY.\n"
},
{
"from": "gpt",
"value": "To select a datetime column and convert it to an `nvarchar` format of `DD/MM/YYYY` in... |
if you pay like 25% of the license cost as a annual maintenance fee for software, that usually gives you free upgrades (even major releases).
this should mean that the software company has to release a major version right? otherwise why would you pay for the annual maintenance fee?
| It's a common expectation that when you pay an annual maintenance fee for software, especially one that covers a significant percentage of the license cost, you should receive updates and possibly new features, including major releases. However, whether or not a software company feels compelled to release major version... | 35,378 | [
{
"from": "human",
"value": "if you pay like 25% of the license cost as a annual maintenance fee for software, that usually gives you free upgrades (even major releases).\nthis should mean that the software company has to release a major version right? otherwise why would you pay for the annual maintenance ... |
I'm running VS2008's Code Coverage against a unit-tested DLL that I'm developing. For some of the functions it claims that 2 blocks are not covered and 50 or so are. When I view the function with the VS2008 highlighting it can't find the uncovered blocks.
The highlighting appears to work with some functions though as i... | It sounds like you're encountering a common issue with Visual Studio 2008's Code Coverage feature. The fact that the Code Coverage tool reports that there are uncovered blocks in some of your functions while not highlighting them appropriately can be confusing. Here are a few potential reasons for this inconsistency an... | 32,984 | [
{
"from": "human",
"value": "I'm running VS2008's Code Coverage against a unit-tested DLL that I'm developing. For some of the functions it claims that 2 blocks are not covered and 50 or so are. When I view the function with the VS2008 highlighting it can't find the uncovered blocks.\nThe highlighting appea... |
Really simple question - how do I do a search to find all records where the name starts with a certain string in ActiveRecord. I've seen all sorts of bits all over the internet where verbatim LIKE SQL clauses are used - but from what I've heard that isn't the 'correct' way of doing it.
Is there a 'proper' Rails way?
| Yes, there is a proper way to perform this search in ActiveRecord without using raw SQL. You can use the `where` method along with the `LIKE` SQL clause that ActiveRecord abstracts for you.
To find all records where a name starts with a certain string, you can use the following syntax:
```ruby
# Assuming you have a m... | 32,169 | [
{
"from": "human",
"value": "Really simple question - how do I do a search to find all records where the name starts with a certain string in ActiveRecord. I've seen all sorts of bits all over the internet where verbatim LIKE SQL clauses are used - but from what I've heard that isn't the 'correct' way of do... |
I recently started to develop using Flex 3 and Adobe Air and I wanted to know what features you want to be in futures releases of Adobe Air ?
The ones that I miss are:
Cross-systems way of launching a local file (shellExec) right from an Air application (although you can do this using workaround at least under Windows... | It's great to hear that you're diving into Flex 3 and Adobe AIR development! You've pointed out some valid limitations, and here are some thoughts on the features you're looking for, along with potential workarounds and additional features that could enhance Adobe AIR:
### Desired Features
1. **Cross-Platform Local F... | 29,291 | [
{
"from": "human",
"value": "I recently started to develop using Flex 3 and Adobe Air and I wanted to know what features you want to be in futures releases of Adobe Air ?\nThe ones that I miss are:\n\nCross-systems way of launching a local file (shellExec) right from an Air application (although you can do ... |
I know that there are a lot of CUDA language bindings, such as PyCUDA, but are there any good bindings for .Net? The only one I've seen is this one, but I'd like to know if there are any others.
| Yes, there are a few options for CUDA bindings in .NET, in addition to the one you've mentioned. Here are some notable ones:
1. **ManagedCUDA**: This is a popular and well-documented library that provides .NET bindings for CUDA. It allows you to call CUDA functions from C# and supports the use of CUDA kernels, memory ... | 22,610 | [
{
"from": "human",
"value": "I know that there are a lot of CUDA language bindings, such as PyCUDA, but are there any good bindings for .Net? The only one I've seen is this one, but I'd like to know if there are any others.\n"
},
{
"from": "gpt",
"value": "Yes, there are a few options for CUDA b... |
I am working in C#.net - .Net fx is 2.0 which doesnot support converting between different time zones. I have wrote a scheduler based on UTC but it is giving errors of 1 hour in the DTS periods for London. I need some solution so that I can gat the correct time in any timezone relative to UTC with correct DST adjustmen... | Dealing with time zones and Daylight Saving Time (DST) in .NET Framework 2.0 can indeed be tricky, especially since it lacks built-in support for timezone conversions and DST adjustments. However, there are some strategies you can implement to handle time zone conversions and DST manually.
### Manual DST Management
Si... | 29,607 | [
{
"from": "human",
"value": "I am working in C#.net - .Net fx is 2.0 which doesnot support converting between different time zones. I have wrote a scheduler based on UTC but it is giving errors of 1 hour in the DTS periods for London. I need some solution so that I can gat the correct time in any timezone r... |
I've heard the advice that you should avoid try catch blocks if possible since they're expensive.
My question is specifically about the .NET platform: Why are try blocks expensive?
Summary of Responses:
There are clearly two camps on this issue: those that say that try blocks are expensive, and those that say "maybe a ... | The debate over the performance implications of using try-catch blocks in .NET is nuanced and can be divided into a few key considerations:
### 1. **Performance of Exception Handling**
The assertion that try-catch blocks are "expensive" primarily arises from the way exceptions are handled in .NET. When an exception is... | 31,193 | [
{
"from": "human",
"value": "I've heard the advice that you should avoid try catch blocks if possible since they're expensive.\nMy question is specifically about the .NET platform: Why are try blocks expensive?\nSummary of Responses:\nThere are clearly two camps on this issue: those that say that try blocks... |
There is small system, where a database table as queue on MSSQL 2005. Several applications are writing to this table, and one application is reading and processing in a FIFO manner.
I have to make it a little bit more advanced to be able to create a distributed system, where several processing application can run. The ... | Your approach to creating a distributed processing system using a queue table in SQL Server 2005 has some merit, but there are several considerations and potential improvements to enhance effectiveness and manageability. Let's break down your questions:
### 1. Can this work in this form?
Yes, your approach can work, ... | 30,156 | [
{
"from": "human",
"value": "There is small system, where a database table as queue on MSSQL 2005. Several applications are writing to this table, and one application is reading and processing in a FIFO manner.\nI have to make it a little bit more advanced to be able to create a distributed system, where se... |
Ignoring the IE case, are there any other browsers that can't understand the application/xhtml+xml content type? And what about the search engine spiders?
I could not find any answers on the web that would not be a few years old and thus possibly inaccurate.
Edit:
Somehow related question: What problem does XHTML stric... | As of my last knowledge update in October 2023, most modern web browsers are capable of understanding the `application/xhtml+xml` content type, which is used to serve XHTML documents. However, there are still a few cases to consider:
1. **Older Browsers**: Browsers that are no longer maintained or significantly outdat... | 33,551 | [
{
"from": "human",
"value": "Ignoring the IE case, are there any other browsers that can't understand the application/xhtml+xml content type? And what about the search engine spiders?\nI could not find any answers on the web that would not be a few years old and thus possibly inaccurate.\nEdit:\nSomehow rel... |
I'm collecting metadata using the sys.* views, and according to the documentation, the sys.identity_columns view will return the seed and increment values like so.
CREATE TABLE ident_test (
test_id int IDENTITY(1000,10),
other int
)
SELECT name, seed_value, increment_value
FROM sys.identity_columns
WHERE object... | It seems that you're encountering an issue where the `sys.identity_columns` view is only returning one column instead of the expected multiple columns, including the `seed_value` and `increment_value`. This could be due to several reasons, including the specific context of your query or the state of your database.
1. ... | 32,574 | [
{
"from": "human",
"value": "I'm collecting metadata using the sys.* views, and according to the documentation, the sys.identity_columns view will return the seed and increment values like so.\nCREATE TABLE ident_test (\n test_id int IDENTITY(1000,10),\n other int\n)\n\nSELECT name, seed_value, increment_... |
I have a delay activity with an interval set to 1 day.
For some reason the workflow Timer is not activating the workflow once the time has elapsed.
I have installed the SharePoint infrastructure update, but it did not resolve the issue.
The workflow is also set to listen for an item change event, if I change the item a... | It sounds like you're dealing with a workflow in SharePoint that uses a delay activity but is not triggering as expected after the specified interval. Here are some potential reasons and troubleshooting steps to consider:
1. **Workflow Timer Settings**:
- Ensure that the SharePoint Timer Service is running. The tim... | 31,654 | [
{
"from": "human",
"value": "I have a delay activity with an interval set to 1 day.\nFor some reason the workflow Timer is not activating the workflow once the time has elapsed.\nI have installed the SharePoint infrastructure update, but it did not resolve the issue.\nThe workflow is also set to listen for ... |
For example, I'm trying to convert 2008-09-26T01:51:42.000Z to 09/26/2008. What's the simplest way of accomplishing this?
| You can convert the date format using various programming languages or tools. Below are examples in Python and JavaScript:
### Python
You can use the `datetime` module:
```python
from datetime import datetime
# Original date string
date_str = "2008-09-26T01:51:42.000Z"
# Parse the date string
date_obj = datetime.st... | 32,465 | [
{
"from": "human",
"value": "For example, I'm trying to convert 2008-09-26T01:51:42.000Z to 09/26/2008. What's the simplest way of accomplishing this?\n"
},
{
"from": "gpt",
"value": "You can convert the date format using various programming languages or tools. Below are examples in Python and J... |
I've had my first go at writing a DLL in Delphi. So far so good. By using a typelib I've been able to pass Widestrings to and from the DLL without difficulty.
What's curious at the moment is that I'm using VB6 as the testbed, and every time I run a test within the IDE, the program runs and then the IDE process suddenly... | The issue you're experiencing with the VB6 IDE crashing after calling your DLL function might be due to the handling of memory in the Delphi DLL, specifically with respect to how you're returning strings.
In Delphi, `WideString` is a reference-counted string type, which means it manages its memory automatically. Howe... | 28,848 | [
{
"from": "human",
"value": "I've had my first go at writing a DLL in Delphi. So far so good. By using a typelib I've been able to pass Widestrings to and from the DLL without difficulty.\nWhat's curious at the moment is that I'm using VB6 as the testbed, and every time I run a test within the IDE, the prog... |
I had the following line snippet of code that searches for a propery of an instance by name:
var prop = Backend.GetType().GetProperty(fieldName);
Now I want to ignore the case of fieldName, so I tried the following:
var prop = Backend.GetType().GetProperty(fieldName, BindingFlags.IgnoreCase);
... No dice. Now prop w... | To search for a property by name while ignoring case in .NET using reflection, you can use the `GetProperties` method in combination with LINQ to filter the properties based on the name while ignoring case sensitivity. The `GetProperty` method does not directly support case-insensitive searches, which is why your attem... | 33,590 | [
{
"from": "human",
"value": "I had the following line snippet of code that searches for a propery of an instance by name:\nvar prop = Backend.GetType().GetProperty(fieldName);\n\nNow I want to ignore the case of fieldName, so I tried the following:\nvar prop = Backend.GetType().GetProperty(fieldName, Bindin... |
I am trying to do this...
<Image x:Name="imgGroupImage" Source="Images\unlock.png" Margin="0,0,5,0" />
But I get this error...
Cannot convert string 'Images\unlock.png' in attribute 'Source' to object of type 'System.Windows.Media.ImageSource'. Cannot locate resource 'forms/images/unlock.png'. Error at object 'Syste... | In WPF, the way you specify the path to your image resources can be a little tricky, especially with relative paths. The issue you're encountering is that the path you're using is not correctly structured for WPF to find the image file.
If your images are in a folder named `Images` and your XAML file is in a folder n... | 33,678 | [
{
"from": "human",
"value": "I am trying to do this...\n<Image x:Name=\"imgGroupImage\" Source=\"Images\\unlock.png\" Margin=\"0,0,5,0\" />\n\nBut I get this error...\n\nCannot convert string 'Images\\unlock.png' in attribute 'Source' to object of type 'System.Windows.Media.ImageSource'. Cannot locate resou... |
Does anyone have a simple, efficient way of checking that a string doesn't contain HTML? Basically, I want to check that certain fields only contain plain text. I thought about looking for the < character, but that can easily be used in plain text. Another way might be to create a new System.Xml.Linq.XElement using:... | If you need a simple and efficient way to check if a string contains any HTML tags, there are a few approaches you can take. Here's a straightforward method using a regular expression, which allows you to quickly identify if there are any HTML tags present in the string.
### Using Regular Expressions
You can use a re... | 32,583 | [
{
"from": "human",
"value": "Does anyone have a simple, efficient way of checking that a string doesn't contain HTML? Basically, I want to check that certain fields only contain plain text. I thought about looking for the < character, but that can easily be used in plain text. Another way might be to cre... |
I need to put the image from an NSProgressIndicator into an NSOutlineView Cell. I have written up code that does this for a determinate indicator and it works just great:
NSProgressIndicator *progressIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0, 0, 16, 16)];
[progressIndicator setStyle:NSProgress... | The behavior you're experiencing with the `NSProgressIndicator` in indeterminate mode is due to how the indeterminate progress indicator is rendered. Unlike the determinate indicator, which has a specific value and can render a graphic that represents that state, the indeterminate indicator is animated and doesn't actu... | 31,411 | [
{
"from": "human",
"value": "I need to put the image from an NSProgressIndicator into an NSOutlineView Cell. I have written up code that does this for a determinate indicator and it works just great:\nNSProgressIndicator *progressIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0, 0, 16, 16... |
I am creating a small silverlight widget which pronounces a word and highlights each syllable as it is pronounced.
As part of this, I am using the SpeechSynthesizer.PhonemeReached event to determine the start and end times of each phoneme (as a step in figuring out the start and end times of each syllable).
The weird t... | The issue you're experiencing with the `PhonemeReachedEventArgs.Phoneme` property sometimes returning control characters, such as U+0004 (END OF TRANSMISSION), is indeed a known occurrence when dealing with speech synthesis systems. In many speech synthesis APIs, certain phonemes may be used as placeholders or markers,... | 34,223 | [
{
"from": "human",
"value": "I am creating a small silverlight widget which pronounces a word and highlights each syllable as it is pronounced.\nAs part of this, I am using the SpeechSynthesizer.PhonemeReached event to determine the start and end times of each phoneme (as a step in figuring out the start an... |
I need to index a varchar field on my table in MS SQL Server 2005, but it's not clear to me how to do so. If I try to add a non-clustered index on the field, it says "Column 'xxxx' in table 'mytable' is of a type that is invalid for use as a key column in an index"
My table has an auto-increment int ID that is set as ... | In SQL Server, the restriction you’re encountering with indexing is due to the limitations on the types of columns that can be used as key columns in an index. In SQL Server 2005, certain data types, including VARCHAR columns if they exceed a specific length, cannot be used directly as key columns in an index. However,... | 26,025 | [
{
"from": "human",
"value": "I need to index a varchar field on my table in MS SQL Server 2005, but it's not clear to me how to do so. If I try to add a non-clustered index on the field, it says \"Column 'xxxx' in table 'mytable' is of a type that is invalid for use as a key column in an index\"\nMy table ... |
I've got a Repeater and its SqlDatasource nested inside a Gridview TemplatedField.
The Repeater's datasource SelectCommand is set using the FormatString of an Eval from the Gridview.
The SelectCommand has a WHERE clause which is to compare a string.
Because I have already used the single and double quotes, I am having ... | To properly include single quotes inside the SQL `SelectCommand` of the `SqlDataSource` while using the `Eval` function, you need to escape the single quotes within the string. In your case, you want to ensure that the value evaluated by `Eval("Bar")` is wrapped in single quotes for the SQL query.
You can achieve this... | 31,094 | [
{
"from": "human",
"value": "I've got a Repeater and its SqlDatasource nested inside a Gridview TemplatedField.\nThe Repeater's datasource SelectCommand is set using the FormatString of an Eval from the Gridview.\nThe SelectCommand has a WHERE clause which is to compare a string.\nBecause I have already use... |
My co-founder is currently asking on our blog for an embeddable code widget.
http://devver.net/blog/2008/10/someone-please-build-an-awesome-embeddable-code-widget/
Basically we want something like http://pastie.org/ or http://codepad.org/ but we really want to embed the code section in our blog. We know there are plugi... | As of my last knowledge update in October 2023, there are several solutions that could fulfill your requirement for an embeddable code widget. While specific offerings may evolve, here are some options you might consider:
1. **GitHub Gists**: You can create a Gist on GitHub, which allows you to share code snippets. On... | 31,893 | [
{
"from": "human",
"value": "My co-founder is currently asking on our blog for an embeddable code widget.\nhttp://devver.net/blog/2008/10/someone-please-build-an-awesome-embeddable-code-widget/\nBasically we want something like http://pastie.org/ or http://codepad.org/ but we really want to embed the code s... |
I have an ActiveX control in IE (7). When it shows a dialog box, the dialog box is not showing in XP visual style. I have tried embedding manifests to no avail. Anybody got any idea? by the way, the dialog boxes were implemented using wtl.
| When dealing with ActiveX controls and dialog boxes that do not adhere to the XP visual style, there are a few considerations and steps you can take to ensure that they render correctly in Windows XP with visual styles enabled. Here are some potential solutions:
1. **Manifest File**: Ensure that your ActiveX control's... | 31,439 | [
{
"from": "human",
"value": "I have an ActiveX control in IE (7). When it shows a dialog box, the dialog box is not showing in XP visual style. I have tried embedding manifests to no avail. Anybody got any idea? by the way, the dialog boxes were implemented using wtl.\n"
},
{
"from": "gpt",
"v... |
What are the pros and cons of using nested public C++ classes and enumerations? For example, suppose you have a class called printer, and this class also stores information on output trays, you could have:
class printer
{
public:
std::string name_;
enum TYPE
{
TYPE_LOCAL,
TYPE_NETWORK,
... | Using nested public classes and enumerations in C++ can be a matter of design philosophy and code organization. Both approaches have their own pros and cons, which can influence a developer's choice depending on the context and intended use of the classes and enums. Here's a breakdown of the pros and cons of each metho... | 21,799 | [
{
"from": "human",
"value": "What are the pros and cons of using nested public C++ classes and enumerations? For example, suppose you have a class called printer, and this class also stores information on output trays, you could have:\nclass printer\n{\npublic:\n std::string name_;\n\n enum TYPE\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.