instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I recently started a new webforms project and decided to separate the business classes from any DBML references. My business layer classes instead access discrete Data layer methods and are returned collections of DTO's. So the data layer might project DTO's like the following:
(from c in dataContext.Customers
where c.... | Your approach to separating the business layer from the data access layer by using DTOs (Data Transfer Objects) is indeed a good practice in software architecture. Here are several reasons why it is beneficial, along with some considerations and potential challenges you might encounter as your project progresses:
### ... | 8,926 | [
{
"from": "human",
"value": "I recently started a new webforms project and decided to separate the business classes from any DBML references. My business layer classes instead access discrete Data layer methods and are returned collections of DTO's. So the data layer might project DTO's like the following:\... |
I have a table that contains tasks and I want to give these an explicit ordering based on the priority of the task. The only way I can think to do this is via an unique int column that indexes where the task is in term of the priority (i.e. 1 is top 1000 is low).
The problem is that say I wanted to update task and set ... | Using a unique integer column to represent priority is a common approach, but as you've pointed out, it can lead to inefficient updates when the priorities of tasks change frequently. Here are some alternative approaches to managing task priority more efficiently:
### 1. Use a Floating-Point Priority Value
Instead of... | 10,430 | [
{
"from": "human",
"value": "I have a table that contains tasks and I want to give these an explicit ordering based on the priority of the task. The only way I can think to do this is via an unique int column that indexes where the task is in term of the priority (i.e. 1 is top 1000 is low).\nThe problem is... |
I'm looking for an .xsd schema file to drop into my Visual Studio directory to provide intellisense for the xml configuration file for the Castle Windsor IoC container. I've looked in the downloaded code for Windsor, as well as googled several different ways. I see many people asking the same question, but no answers. ... | As of my last knowledge update in October 2023, there is no official XSD schema file for the XML configuration of the Castle Windsor IoC container provided with the library itself. However, you can create a custom XSD schema for your specific configuration needs based on the structure of your XML configuration file.
H... | 10,340 | [
{
"from": "human",
"value": "I'm looking for an .xsd schema file to drop into my Visual Studio directory to provide intellisense for the xml configuration file for the Castle Windsor IoC container. I've looked in the downloaded code for Windsor, as well as googled several different ways. I see many people a... |
I am curious as to what others are using in this situation. I know a couple of the options that are out there like a memcached port or ScaleOutSoftware. The memcached ports don't seem to be actively worked on (correct me if I'm wrong). ScaleOutSoftware is too expensive for me (I don't doubt it is worth it). This is... | It's great to hear that you've found success with ScaleOut Software's solution! Distributed caching can greatly enhance application performance, especially when managing load on a database. Here are some other popular distributed caching solutions that you might want to consider, along with some insights and considerat... | 8,366 | [
{
"from": "human",
"value": "I am curious as to what others are using in this situation. I know a couple of the options that are out there like a memcached port or ScaleOutSoftware. The memcached ports don't seem to be actively worked on (correct me if I'm wrong). ScaleOutSoftware is too expensive for me... |
This is a bit of a weird one, and I could well be coding this completely wrong - hence why I've hit the same error twice in two days, in completely different parts of a script. The code I'm using is below:
public function findAll( $constraints = array() ) {
// Select all records
$SQL = 'SELECT * F... | The issue you're experiencing is likely due to how you are binding the parameters with `bindParam`. In your code, you're binding `$field` and `$value`, but since `$value` is a variable that could change in the foreach loop, it will always reference the last value after the loop finishes. This is a common pitfall when u... | 12,682 | [
{
"from": "human",
"value": "This is a bit of a weird one, and I could well be coding this completely wrong - hence why I've hit the same error twice in two days, in completely different parts of a script. The code I'm using is below:\n\n public function findAll( $constraints = array() ) {\n\n // ... |
I know that the name of the user account can be retrieved from the built in variable User!UserID but how can I get the full user name of the user?
I guess it would be possible to hook up some .NET code and do a Active Directory look up but are there any alternatives?
| If you're looking to retrieve the full name of a user in a Windows environment without directly hooking into .NET code and Active Directory, there are a couple of alternative approaches you can consider:
### 1. Using Environment Variables
You can access the full name of the current user by utilizing the `Environment.... | 10,147 | [
{
"from": "human",
"value": "I know that the name of the user account can be retrieved from the built in variable User!UserID but how can I get the full user name of the user?\nI guess it would be possible to hook up some .NET code and do a Active Directory look up but are there any alternatives?\n"
},
... |
I need to extract data from a .mpp file on the network and combine it with other data from several different databases. The application can be written in Perl, VB6, VB.net or C# but must be easily scheduled from a Windows based server.
What would you recommend to extract the MS Project data with no user intervention?
... | To extract data from an MS Project (.mpp) file with minimal user intervention, you have a few options available, especially if you're looking to integrate this with other data from various databases. Here's an outline of the approaches you can take:
### 1. **Using C# with Microsoft Project Interop**
One effective way... | 6,868 | [
{
"from": "human",
"value": "I need to extract data from a .mpp file on the network and combine it with other data from several different databases. The application can be written in Perl, VB6, VB.net or C# but must be easily scheduled from a Windows based server.\nWhat would you recommend to extract the MS... |
We're using a third-party middleware product that allows us to write code in an embedded Python interpreter, and which exposes an API that we can call into. Some of these API calls allow us to load various kinds of file, and the loading code is implemented in C. File loading happens in a separate thread, and calls back... | You’ve highlighted an important challenge when working with locales in a multi-threaded environment: changing the global locale can have wide-reaching implications for all threads in the application, particularly with respect to string-to-number conversions.
### Common Practices for Locale Handling
1. **Thread-Local ... | 11,676 | [
{
"from": "human",
"value": "We're using a third-party middleware product that allows us to write code in an embedded Python interpreter, and which exposes an API that we can call into. Some of these API calls allow us to load various kinds of file, and the loading code is implemented in C. File loading hap... |
I have a stored procedure that consists of a single select query used to insert into another table based on some minor math that is done to the arguments in the procedure. Can I generate the plan used for this query by referencing the procedure somehow, or do I have to copy and paste the query and create bind variable... | You can obtain the execution plan of a query within a stored procedure without copying and pasting the entire query by using a few different methods. Here are some common approaches depending on the database system you're using:
### 1. **Using Database-Specific Tools**
Many database systems have built-in tools or comm... | 11,802 | [
{
"from": "human",
"value": "I have a stored procedure that consists of a single select query used to insert into another table based on some minor math that is done to the arguments in the procedure. Can I generate the plan used for this query by referencing the procedure somehow, or do I have to copy and... |
I have a databound TextBox in my application like so: (The type of Height is decimal?)
<TextBox Text="{Binding Height, UpdateSourceTrigger=PropertyChanged,
ValidatesOnExceptions=True,
Converter={StaticResource NullConverter}}" />
public class NullableCo... | To achieve your goals of preventing the `TextBox` from losing focus until a valid value is entered, or reverting the value back to the last valid state, you have a couple of different approaches. Let's address both requirements:
### Option 1: Preventing Focus Loss (Not Recommended)
While preventing a control from los... | 11,918 | [
{
"from": "human",
"value": "I have a databound TextBox in my application like so: (The type of Height is decimal?)\n <TextBox Text=\"{Binding Height, UpdateSourceTrigger=PropertyChanged, \n ValidatesOnExceptions=True, \n Converter={StaticResource Nul... |
Previously I have asked to strip text from a field and convert it to an int, this works successfully. But now, I would like to do an INNER JOIN on this new value.
So I have this:
SELECT CONVERT(int, SUBSTRING(accountingTab.id, PATINDEX('%[0-9]%', accountingTab.id), 999))
AS 'memId', userDetails.title, userDetails.lna... | The issue you are experiencing arises from the fact that SQL does not allow you to reference an alias (in this case, `memId`) in the `ON` clause of the `JOIN` statement because the alias is defined in the `SELECT` clause which is evaluated after the `JOIN` clause.
To resolve this issue, you can either repeat the calcu... | 9,849 | [
{
"from": "human",
"value": "Previously I have asked to strip text from a field and convert it to an int, this works successfully. But now, I would like to do an INNER JOIN on this new value.\nSo I have this:\nSELECT CONVERT(int, SUBSTRING(accountingTab.id, PATINDEX('%[0-9]%', accountingTab.id), 999)) \nAS ... |
I have a problem to connect to my WCF service if customer is using proxy with credentials. I'm unable to find the way to set credential to generated client proxy.
If I use the web service, then it is possible to set proxy.
| When working with a WCF service that requires a proxy with credentials, you can configure the proxy settings in the generated client proxy class. Here's how you can do that:
### Step 1: Add the necessary using directives
Ensure you have the following namespaces:
```csharp
using System;
using System.Net;
using System... | 11,353 | [
{
"from": "human",
"value": "I have a problem to connect to my WCF service if customer is using proxy with credentials. I'm unable to find the way to set credential to generated client proxy. \nIf I use the web service, then it is possible to set proxy. \n"
},
{
"from": "gpt",
"value": "When wor... |
While refactoring some old code I have stripped out a number of public methods that should actually of been statics as they a) don't operate on any member data or call any other member functions and b) because they might prove useful elsewhere.
This led me to think about the best way to group 'helper' functions togethe... | In C++, both approaches—using a class with static member functions and using a namespace—are valid for grouping helper functions. Each has its pros and cons, and the choice often depends on the context and specific requirements of your project. Let's explore the advantages and disadvantages of each:
### Namespace Appr... | 12,300 | [
{
"from": "human",
"value": "While refactoring some old code I have stripped out a number of public methods that should actually of been statics as they a) don't operate on any member data or call any other member functions and b) because they might prove useful elsewhere.\nThis led me to think about the be... |
If I want to use the validation framework that you can use with ASP.NET MVC, will the JavaScript conflict with other JavaScript frameworks like jQuery or YUI?
| The ASP.NET MVC validation framework primarily relies on unobtrusive JavaScript, which is designed to work seamlessly with jQuery. If you are using jQuery as your JavaScript library, the integration should be smooth, and there should be no conflicts as long as you follow best practices.
However, if you are also using ... | 12,451 | [
{
"from": "human",
"value": "If I want to use the validation framework that you can use with ASP.NET MVC, will the JavaScript conflict with other JavaScript frameworks like jQuery or YUI?\n"
},
{
"from": "gpt",
"value": "The ASP.NET MVC validation framework primarily relies on unobtrusive JavaSc... |
I need to allow other Python applications to register callback functions for events in my application. These need to have priorities associated with them (so a callback with a priority of 10 runs before a callback with a priority of 1) and callback functions need to be able to signal errors to the dispatcher.
These ar... | There are a few Python libraries that can help you manage callbacks with priorities and error signaling, but if you need more customization, you might also consider writing your own.
Here are some libraries that can help with your requirement:
1. **`blinker`**: This is a signal management library that allows you to d... | 10,780 | [
{
"from": "human",
"value": "I need to allow other Python applications to register callback functions for events in my application. These need to have priorities associated with them (so a callback with a priority of 10 runs before a callback with a priority of 1) and callback functions need to be able to ... |
Is there a way to "align" columns in a data repeater control?
I.E currently it looks like this:
user1 - colA colB colC colD colE
user2 - colD colE
I want it to look like:
user1
-colA
-colB
-colC
-colD
-colE
user1
-colD
-colE
I need to columns for each record to align properly when addi... | To align columns properly in a data repeater control when some records might not have data for certain columns, you can use a combination of layout techniques and conditional rendering. Since you need to use a data repeater and not a grid control, here's a general approach you could take:
### 1. Use Nested Containers
... | 9,924 | [
{
"from": "human",
"value": "Is there a way to \"align\" columns in a data repeater control? \nI.E currently it looks like this:\nuser1 - colA colB colC colD colE\nuser2 - colD colE\n\nI want it to look like:\n user1\n -colA\n -colB\n -colC\n -colD\n -colE\n\n\n user1\n\n\n\n -colD\n -colE\... |
Being relatively new to the .net game, I was wondering, has anyone had any experience of the pros / cons between the use of LINQ and what could be considered more traditional methods working with lists / collections?
For a specific example of a project I'm working on : a list of unique id / name pairs are being retri... | Both LINQ and traditional methods of working with lists/collections in .NET have their own pros and cons. Let's take a closer look at each approach and then discuss which might be better suited for your specific use case.
### Traditional Iteration
#### Pros:
1. **Simplicity**: Traditional loops are straightforward an... | 6,252 | [
{
"from": "human",
"value": "Being relatively new to the .net game, I was wondering, has anyone had any experience of the pros / cons between the use of LINQ and what could be considered more traditional methods working with lists / collections? \nFor a specific example of a project I'm working on : a list... |
After you've let the VS.NET (2008 in this case) wizard upgrade your solution, do you perform any manual steps to upgrade specific properties of your solution and projects? For instance, you have to go to each project and target a new version of the framework (from 2.0 to 3.5 in this case). Even after targeting a new ve... | Yes, after using the Visual Studio 2008 upgrade wizard to upgrade your solution from .NET Framework 2.0 to 3.5, there are several manual steps you should consider to ensure that your projects are correctly configured and taking full advantage of the new framework features. Here are some key steps you might want to foll... | 11,615 | [
{
"from": "human",
"value": "After you've let the VS.NET (2008 in this case) wizard upgrade your solution, do you perform any manual steps to upgrade specific properties of your solution and projects? For instance, you have to go to each project and target a new version of the framework (from 2.0 to 3.5 in ... |
In C# you can make a block inside of a method that is not attached to any other statement.
public void TestMethod()
{
{
string x = "test";
string y = x;
{
int z = 42;
int zz = z;
}
}
}
This code compiles and ru... | In C#, the use of blocks inside methods that aren't attached to any statements can be valuable in several scenarios, primarily related to scope, readability, and organization of code. Here are some cases where this could be beneficial:
1. **Scoped Variables**:
- Blocks can create local scopes, allowing variables to... | 4,767 | [
{
"from": "human",
"value": "In C# you can make a block inside of a method that is not attached to any other statement.\n public void TestMethod()\n {\n {\n string x = \"test\";\n string y = x;\n\n {\n int z = 42;\n int zz = z;\n ... |
Is it possible to hide or exclude certain data from a report if it's being rendered in a particular format (csv, xml, excel, pdf, html).
The problem is that I want hyperlinks to other reports to not be rendered when the report is generated in Excel format - but they should be there when the report is rendered in HTML f... | Yes, it is possible to conditionally hide or exclude certain data from a report based on the format in which it is being rendered. This is commonly done in reporting tools and frameworks that support multi-format outputs. The implementation depends on the specific technology or library you are using for report generati... | 10,588 | [
{
"from": "human",
"value": "Is it possible to hide or exclude certain data from a report if it's being rendered in a particular format (csv, xml, excel, pdf, html).\nThe problem is that I want hyperlinks to other reports to not be rendered when the report is generated in Excel format - but they should be t... |
I have two code bases of an application. I need to copy all the files in all the directories with .java from the newer code base, to the older (so I can commit it to svn).
How can I write a batch files to do this?
| To achieve your goal of copying all `.java` files from the newer codebase to the older codebase using a batch file, you can use the following script. This script will search through the directories of the newer codebase and copy any `.java` files it finds to the corresponding directory in the older codebase.
### Step-... | 9,325 | [
{
"from": "human",
"value": "I have two code bases of an application. I need to copy all the files in all the directories with .java from the newer code base, to the older (so I can commit it to svn).\nHow can I write a batch files to do this?\n"
},
{
"from": "gpt",
"value": "To achieve your go... |
Are there any tools available for calculating Cyclomatic Complexity in Javascript?
I've found it a very helpful metric in the past while working on server side code, and would like to be able to use it for the client side Javascript I write.
| Yes, there are several tools available for calculating Cyclomatic Complexity in JavaScript, which can be particularly useful for assessing the complexity of your client-side code. Here are some popular options:
1. **ESLint with Cyclomatic Complexity Plugin**:
- ESLint is a widely used linting tool for JavaScript. Y... | 9,648 | [
{
"from": "human",
"value": "Are there any tools available for calculating Cyclomatic Complexity in Javascript? \nI've found it a very helpful metric in the past while working on server side code, and would like to be able to use it for the client side Javascript I write.\n"
},
{
"from": "gpt",
... |
If I am iterating over each file using :
@echo off
FOR %%f IN (*\*.\**) DO (
echo %%f
)
how could I print the extension of each file? I tried assigning %%f to a temporary variable, and then using the code : echo "%t:~-3%" to print but with no success.
| You can easily extract the file extension in a batch script by using string manipulation. The `FOR` loop in your script iterates over each file, and you can utilize the `~` operator to extract the extension from the variable representing the file.
Here’s how you can modify your script to print the extension of each fi... | 13,476 | [
{
"from": "human",
"value": "If I am iterating over each file using :\n@echo off\n\nFOR %%f IN (*\\*.\\**) DO (\n echo %%f\n)\n\nhow could I print the extension of each file? I tried assigning %%f to a temporary variable, and then using the code : echo \"%t:~-3%\" to print but with no success.\n"
},
... |
A Java6 application sits in the system tray. It needs to be activated using a hotkey (e.g. Super-G or Ctrl-Shift-L etc) and do something (e.g. showing an input box).
How do I do that on:
Windows (XP or Vista)
OS/X
Linux (Gnome or KDE)
| To create a Java application that can be activated with a hotkey and perform an action (like showing an input box), you'll need to handle global keyboard shortcuts. Below, I'll outline how to approach this for Windows, OS X, and Linux (Gnome or KDE) separately.
### Windows
1. **Using JNativeHook**: You can use the J... | 8,668 | [
{
"from": "human",
"value": "A Java6 application sits in the system tray. It needs to be activated using a hotkey (e.g. Super-G or Ctrl-Shift-L etc) and do something (e.g. showing an input box).\nHow do I do that on:\n\nWindows (XP or Vista)\nOS/X\nLinux (Gnome or KDE)\n\n"
},
{
"from": "gpt",
"... |
I'm new to the WCSF and can't seem to find anything related to "building a custom template" for creating the views/presenters/code-behinds/etc with your own flavor ...
Can anyone point me in the right direction?
| Welcome to the world of WCSF (Web Client Software Factory)! Customizing templates for views, presenters, and other components can help streamline your development process and maintain consistency throughout your application.
Here's a general guide on how you can create custom templates in WCSF:
### 1. Understand WCSF... | 10,011 | [
{
"from": "human",
"value": "I'm new to the WCSF and can't seem to find anything related to \"building a custom template\" for creating the views/presenters/code-behinds/etc with your own flavor ...\nCan anyone point me in the right direction?\n"
},
{
"from": "gpt",
"value": "Welcome to the worl... |
I have a dropdownlist with the autopostback set to true. I want the
user to confirm if they really want to change the value,
which on post back fires a server side event (selectedindexchanged).
I have tried adding an onchange attribute "return confirm('Please click OK to change. Otherwise click CANCEL?';") but it will ... | To achieve the desired behavior of confirming the change in a dropdown list while still allowing for the postback in ASP.NET, you'll want to handle the confirmation in JavaScript and manage the postback accordingly.
Here’s a strategy you can use to accomplish this:
1. Set the `OnClientClick` property of your dropdown... | 10,775 | [
{
"from": "human",
"value": "I have a dropdownlist with the autopostback set to true. I want the\nuser to confirm if they really want to change the value,\nwhich on post back fires a server side event (selectedindexchanged).\nI have tried adding an onchange attribute \"return confirm('Please click OK to cha... |
I am getting the following error when running a reporting services report.
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: XmlException
Exception message: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the Pr... | The error message you are encountering indicates that the XML data being processed by your report contains a Document Type Definition (DTD), which is prohibited for security reasons when reading XML in .NET applications. Here are some steps you can take to address this issue:
### 1. Identify the Source of the XML
- De... | 11,520 | [
{
"from": "human",
"value": "I am getting the following error when running a reporting services report.\nProcess name: w3wp.exe\nAccount name: NT AUTHORITY\\NETWORK SERVICE \nException information: \n Exception type: XmlException \n Exception message: For security reasons DTD is prohibited in this XML... |
I'm creating a small database application to teach myself the following concepts
C# programming
.Net 3.5 framework
WPF
LINQ ORM
I want to use Microsoft Access as the database but I can't seem to find any mention of whether its possible to use SQLMetal to generate the ORM code from a Microsoft Access database.
Does an... | Using SQLMetal to generate ORM code specifically for a Microsoft Access database is not supported. SQLMetal is primarily designed to work with SQL Server databases, and it won't be able to generate code from Access database structures.
However, there are a few alternative options you can consider for small or embedded... | 10,485 | [
{
"from": "human",
"value": "I'm creating a small database application to teach myself the following concepts\n\nC# programming\n.Net 3.5 framework\nWPF\nLINQ ORM\n\nI want to use Microsoft Access as the database but I can't seem to find any mention of whether its possible to use SQLMetal to generate the OR... |
This question borders between the world of the audio designer and the programmer. While this question might have to be partially answered by that domain of an audio designer, it is sure a problem for the programmer. In our project, we want to loop a sound (background music) while the game timer is greater than one minu... | It sounds like you’re dealing with a classic audio design scenario in game development, where you need to manage audio playback dynamically based on game events. XACT (Cross-platform Audio Creation Tool) can be a bit challenging to work with, but it does provide ways to manage your audio events. Below are some strategi... | 8,679 | [
{
"from": "human",
"value": "This question borders between the world of the audio designer and the programmer. While this question might have to be partially answered by that domain of an audio designer, it is sure a problem for the programmer. In our project, we want to loop a sound (background music) whil... |
When using feature descriptors [like SIFT, SURF] - is Approximate Nearest Neighbour the fastest method to do matching between images?
| When using feature descriptors like SIFT (Scale-Invariant Feature Transform) or SURF (Speeded-Up Robust Features), the matching of features between images can indeed benefit from the use of Approximate Nearest Neighbour (ANN) search algorithms.
### Key Points:
1. **Feature Matching Complexity**: The traditional brut... | 12,455 | [
{
"from": "human",
"value": "When using feature descriptors [like SIFT, SURF] - is Approximate Nearest Neighbour the fastest method to do matching between images?\n"
},
{
"from": "gpt",
"value": "When using feature descriptors like SIFT (Scale-Invariant Feature Transform) or SURF (Speeded-Up Rob... |
"Evidence-based scheduling" in FogBugz is interesting, but how do I use it w/ an Agile methodology?
| Evidence-based scheduling (EBS) in FogBugz is designed to help teams make informed decisions about project timelines and resource allocation based on actual historical data. When using EBS alongside Agile methodologies, here are some steps and tips to effectively integrate the two:
1. **Track Historical Performance**:... | 11,404 | [
{
"from": "human",
"value": "\"Evidence-based scheduling\" in FogBugz is interesting, but how do I use it w/ an Agile methodology?\n"
},
{
"from": "gpt",
"value": "Evidence-based scheduling (EBS) in FogBugz is designed to help teams make informed decisions about project timelines and resource al... |
I have a web application that receives messages through an HTTP interface, e.g.:
http://server/application?source=123&destination=234&text=hello
This request contains the ID of the sender, the ID of the recipient and the text of the message.
This message should be processed like:
finding the matching User object for ... | To optimize your JPA and Toplink usage for better insert performance, you can employ several strategies, including batch processing, connection pooling, and optimizing entity lifecycle management. Here are some specific approaches to improve your application's performance:
### 1. Batch Inserts with JPA
Although JPA do... | 10,451 | [
{
"from": "human",
"value": "I have a web application that receives messages through an HTTP interface, e.g.:\nhttp://server/application?source=123&destination=234&text=hello\n\nThis request contains the ID of the sender, the ID of the recipient and the text of the message.\nThis message should be processed... |
What is a good command line tool to create screenshots of websites on Linux? I need to automatically generate screenshots of websites without human interaction. The only tool that I found was khtml2png, but I wonder if there are others that aren't based on khtml (i.e. have good JavaScript support, ...).
| There are several command-line tools for taking screenshots of websites on Linux that offer good JavaScript support and do not rely on khtml. Here are a few popular options:
1. **Puppeteer**:
- Puppeteer is a Node.js library that provides a high-level API to control Chrome or Chromium over the DevTools Protocol. It... | 10,745 | [
{
"from": "human",
"value": "What is a good command line tool to create screenshots of websites on Linux? I need to automatically generate screenshots of websites without human interaction. The only tool that I found was khtml2png, but I wonder if there are others that aren't based on khtml (i.e. have good ... |
This might be a bit on the silly side of things but I need to send the contents of a DataTable (unknown columns, unknown contents) via a text e-mail. Basic idea is to loop over rows and columns and output all cell contents into a StringBuilder using .ToString().
Formatting is a big issue though. Any tips/ideas on how ... | Formatting a `DataTable` for text output can indeed be tricky, especially when you want it to be both readable and structured. Here are a few steps and tips on how to achieve this while handling the variable column widths and potential multi-line cells effectively.
### Step-by-Step Formatting Guide
1. **Determine Max... | 7,325 | [
{
"from": "human",
"value": "This might be a bit on the silly side of things but I need to send the contents of a DataTable (unknown columns, unknown contents) via a text e-mail. Basic idea is to loop over rows and columns and output all cell contents into a StringBuilder using .ToString(). \nFormatting is ... |
Are there any tools available that will calculate code metrics (for example number of code lines, cyclomatic complexity, coupling, cohesion) for your project and over time produce a graph showing the trends?
| Yes, there are several tools available that can help you calculate code metrics such as lines of code, cyclomatic complexity, coupling, and cohesion, and many of them also provide functionality to track these metrics over time and visualize trends. Here are some popular ones:
1. **SonarQube**:
- SonarQube is a wide... | 12,067 | [
{
"from": "human",
"value": "Are there any tools available that will calculate code metrics (for example number of code lines, cyclomatic complexity, coupling, cohesion) for your project and over time produce a graph showing the trends? \n"
},
{
"from": "gpt",
"value": "Yes, there are several t... |
The current system that I am working on makes use of Castle Activerecord to provide ORM (Object Relational Mapping) between the Domain objects and the database. This is all well and good and at most times actually works well!
The problem comes about with Castle Activerecords support for asynchronous execution, well, mo... | To address the challenge of mapping Domain objects to DTOs in a manner that is both efficient and clean, especially in a scenario involving asynchronous execution with Castle ActiveRecord, there are a few approaches you might consider. Here’s an overview of some strategies that could work for your needs, focusing on mi... | 7,273 | [
{
"from": "human",
"value": "The current system that I am working on makes use of Castle Activerecord to provide ORM (Object Relational Mapping) between the Domain objects and the database. This is all well and good and at most times actually works well!\nThe problem comes about with Castle Activerecords su... |
This is sort of SQL newbie question, I think, but here goes.
I have a SQL Query (SQL Server 2005) that I've put together based on an example user-defined function:
SELECT
CASEID,
GetNoteText(CASEID)
FROM
(
SELECT
CASEID
FROM
ATTACHMENTS
GROUP BY
CASEID
) i
GO
the U... | In SQL, the "i" in your query serves as an alias for the derived table (the subquery in the FROM clause). Every derived table in SQL must have an alias, and the alias can be any valid identifier.
Here's a breakdown of your query:
```sql
SELECT
CASEID,
GetNoteText(CASEID)
FROM
(
SELECT
CASEID
... | 13,547 | [
{
"from": "human",
"value": "This is sort of SQL newbie question, I think, but here goes.\nI have a SQL Query (SQL Server 2005) that I've put together based on an example user-defined function:\nSELECT \n CASEID,\n GetNoteText(CASEID)\nFROM \n( \n SELECT \n CASEID \n FROM \n ATTACH... |
I've been having tons of problems getting the non-xml configuration for Castle Windsor set up working properly. In the meantime I've seen more and more people giving advice via the Windsor Container fluent interface. I've been Gooogling about for the last day and I cannot find this API anywhere.
I am talking about th... | It sounds like you've been on quite the journey trying to get Castle Windsor's fluent interface to work! For others who may face similar challenges, here’s a quick summary and some helpful resources regarding Castle Windsor and its fluent API.
### Key Points:
1. **Fluent Interface Overview**:
Castle Windsor provi... | 11,907 | [
{
"from": "human",
"value": "I've been having tons of problems getting the non-xml configuration for Castle Windsor set up working properly. In the meantime I've seen more and more people giving advice via the Windsor Container fluent interface. I've been Gooogling about for the last day and I cannot find... |
Is the edit control I'm typing in now, with all its buttons and rules freely available for use?
My web project is also .Net based.
| Yes, the edit control you're typing in is an implementation of a web-based text editor, often referred to as a rich text editor or WYSIWYG (What You See Is What You Get) editor. There are many libraries and frameworks available that you can integrate into your .NET-based web project to achieve similar functionality. So... | 14,356 | [
{
"from": "human",
"value": "Is the edit control I'm typing in now, with all its buttons and rules freely available for use? \nMy web project is also .Net based.\n"
},
{
"from": "gpt",
"value": "Yes, the edit control you're typing in is an implementation of a web-based text editor, often referre... |
Is it possible to disable a trigger for a batch of commands and then enable it when the batch is done?
I'm sure I could drop the trigger and re-add it but I was wondering if there was another way.
| Yes, you can disable and enable a trigger for a batch of commands without dropping it and re-adding it, depending on the database management system (DBMS) you are using.
For example, in SQL Server, you can use the following commands:
- To disable the trigger:
```sql
DISABLE TRIGGER trigger_name ON table_name;
`... | 14,859 | [
{
"from": "human",
"value": "Is it possible to disable a trigger for a batch of commands and then enable it when the batch is done?\nI'm sure I could drop the trigger and re-add it but I was wondering if there was another way.\n"
},
{
"from": "gpt",
"value": "Yes, you can disable and enable a tr... |
I want to read the contents of a URL but don't want to "hang" if the URL is unresponsive. I've created a BufferedReader using the URL...
URL theURL = new URL(url);
URLConnection urlConn = theURL.openConnection();
urlConn.setDoOutput(true);
BufferedReader urlReader = new BufferedReader(newInputStreamReader(urlConn.getI... | Yes, you can set a read timeout on the `URLConnection` to prevent your application from hanging indefinitely while waiting to read data from an unresponsive URL. By configuring the read timeout, you can specify a maximum amount of time to wait for input before throwing a `SocketTimeoutException`. Here's how you can do ... | 10,362 | [
{
"from": "human",
"value": "I want to read the contents of a URL but don't want to \"hang\" if the URL is unresponsive. I've created a BufferedReader using the URL...\nURL theURL = new URL(url);\nURLConnection urlConn = theURL.openConnection();\nurlConn.setDoOutput(true);\nBufferedReader urlReader = new B... |
If I use mod_rewrite to control all my 301 redirects, does this happen before my page is served? so if I also have a bunch of redirect rules in a php script that runs on my page, will the .htaccess kick in first?
| Yes, if you use mod_rewrite in your `.htaccess` file to set up 301 redirects, these rules will be processed before your PHP script runs. The Apache server processes the `.htaccess` file at the beginning of the request handling process. If a redirect rule matches a request, Apache will execute that redirect and will not... | 13,886 | [
{
"from": "human",
"value": "If I use mod_rewrite to control all my 301 redirects, does this happen before my page is served? so if I also have a bunch of redirect rules in a php script that runs on my page, will the .htaccess kick in first?\n"
},
{
"from": "gpt",
"value": "Yes, if you use mod_r... |
I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts to a special email address. The email data is then processed and store... | Implementing an email-to-data feature on a public website using ASP.NET and SQL Server while on a shared hosting environment is definitely possible, but it comes with some challenges. Here are some steps and considerations to help you set this up:
### 1. Email Receiving Setup
To implement email processing, you need a... | 10,825 | [
{
"from": "human",
"value": "I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts to a special email address. T... |
I have a stored procedure in SQL 2005. The Stored Procedure is actually creating temporary tables in the beginning of SP and deleting it in the end. I am now debugging the SP in VS 2005. In between the SP i would want to know the contents into the temporary table. Can anybody help in in viewing the contents of the temp... | To view the contents of a temporary table in SQL Server during the execution of a stored procedure (SP), you can follow these general steps, especially since you are debugging in Visual Studio 2005.
### Steps to View Temporary Table Contents
1. **Breakpoints in Visual Studio**:
- Set breakpoints in your stored pro... | 10,785 | [
{
"from": "human",
"value": "I have a stored procedure in SQL 2005. The Stored Procedure is actually creating temporary tables in the beginning of SP and deleting it in the end. I am now debugging the SP in VS 2005. In between the SP i would want to know the contents into the temporary table. Can anybody he... |
I'd like to trigger an event when a link is clicked both by clicking on it normally or by opening it in a new tab (e.g., middle click, ctrl + click, etc)
I've tried the following so far:
$('a').click(myfunc) Doesn't capture middle clicks.
$('a').mousedown(myfunc) works, but it seems to be preventing the link from bein... | To trigger an event when a link is clicked, whether it's a normal click or a middle-click (or Ctrl + click), you can use a combination of both `mousedown` and `click` events. The key is to prevent any default behavior only when necessary.
Here’s how you can achieve that without interfering with the link's default beha... | 13,151 | [
{
"from": "human",
"value": "I'd like to trigger an event when a link is clicked both by clicking on it normally or by opening it in a new tab (e.g., middle click, ctrl + click, etc)\nI've tried the following so far:\n$('a').click(myfunc) Doesn't capture middle clicks.\n$('a').mousedown(myfunc) works, but ... |
Are there some principles of organizing classes into namespaces?
For example is it OK if classes from namespace N depends on classes from N.X?
And if classes from N.X depends on classes from N?
| Organizing classes into namespaces is an important aspect of software design and architecture. It helps improve code readability, maintainability, and reduces potential naming conflicts. Here are some principles to consider when organizing classes into namespaces:
### Principles of Organizing Classes into Namespaces
... | 11,767 | [
{
"from": "human",
"value": "Are there some principles of organizing classes into namespaces?\nFor example is it OK if classes from namespace N depends on classes from N.X?\nAnd if classes from N.X depends on classes from N?\n"
},
{
"from": "gpt",
"value": "Organizing classes into namespaces is ... |
What is the Java analogue of .NET's XML serialization?
| In Java, the analogue of .NET's XML serialization can be achieved using several approaches. Unlike .NET, which has built-in support for XML serialization through attributes and the `XmlSerializer` class, Java provides a more flexible but also more manual way to handle XML serialization.
Here are some common approaches... | 7,730 | [
{
"from": "human",
"value": "What is the Java analogue of .NET's XML serialization?\n"
},
{
"from": "gpt",
"value": "In Java, the analogue of .NET's XML serialization can be achieved using several approaches. Unlike .NET, which has built-in support for XML serialization through attributes and th... |
I have heard there is a way to cheat single inheritance and implement multiple inheritance in Java. Does anyone know how to implement this(with out using interface)?
Just out of curiosity ;-)
| In Java, the language does not support multiple inheritance with classes directly due to the potential for ambiguity and complexity (the "Diamond Problem"). However, you can achieve a form of multiple inheritance through composition or by using other design patterns. While you asked not to use interfaces, the most comm... | 9,212 | [
{
"from": "human",
"value": "I have heard there is a way to cheat single inheritance and implement multiple inheritance in Java. Does anyone know how to implement this(with out using interface)?\nJust out of curiosity ;-)\n"
},
{
"from": "gpt",
"value": "In Java, the language does not support mu... |
How can UTF-8 strings (i.e. 8-bit string) be converted to/from XML-compatible 7-bit strings (i.e. printable ASCII with numeric entities)?
i.e. an encode() function such that:
encode("“£”") -> "“£”"
decode() would also be useful:
decode("“£”") -> "“£”"
PHP's htmlenties()/html_entity_d... | To achieve the conversion of UTF-8 strings to XML-compatible 7-bit strings with numeric entities, you can create custom `encode` and `decode` functions in PHP. The `encode` function will convert special characters to their respective numeric entity representations, while the `decode` function will convert those numeric... | 11,065 | [
{
"from": "human",
"value": "How can UTF-8 strings (i.e. 8-bit string) be converted to/from XML-compatible 7-bit strings (i.e. printable ASCII with numeric entities)?\ni.e. an encode() function such that:\nencode(\"“£”\") -> \"“£”\"\n\ndecode() would also be useful:\ndecode(\"“£&... |
I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using the following code:
Dim Winsock1 As Winsock 'Object type definition
Sub Init()
Set Winsock1 = CreateObject("MSWinsock.Winsock") 'Object initialization
Winsock1.RemoteHost = "MyHost"
Winsock1.RemotePort = "22"
Winsock1.... | The issue you are encountering is due to the fact that VBA (Visual Basic for Applications), particularly in Excel, does not directly support asynchronous event handling for objects created with `CreateObject`, such as the Winsock control. This means that the event handler `Winsock1_Connect` will not be triggered as exp... | 10,712 | [
{
"from": "human",
"value": "I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using the following code:\nDim Winsock1 As Winsock 'Object type definition\n\nSub Init()\n Set Winsock1 = CreateObject(\"MSWinsock.Winsock\") 'Object initialization\n Winsock1.RemoteHost = \"MyH... |
What's the best way for determining whether the user's browser can view PDF files?
Ideally, it shouldn't matter on the browser or the operating system.
Is there a specific way of doing it in ASP.NET, or would the answer be just JavaScript?
| Determining whether a user's browser can view PDF files directly is not straightforward, as PDF viewing capabilities depend on multiple factors such as the browser, installed plugins, and the operating system. Generally, modern browsers have built-in PDF viewers, but users may still face limitations based on their spec... | 8,450 | [
{
"from": "human",
"value": "What's the best way for determining whether the user's browser can view PDF files? \nIdeally, it shouldn't matter on the browser or the operating system.\nIs there a specific way of doing it in ASP.NET, or would the answer be just JavaScript?\n"
},
{
"from": "gpt",
"... |
I'm using netbeans on ubuntu, I would like to add some fonts to it. Could anyone tell me how this is done ?
| Adding fonts to NetBeans on Ubuntu can be done by following these steps:
### Step 1: Install Fonts on Ubuntu
1. **Download Fonts**: First, download the font files you want to use (e.g., `.ttf` or `.otf` files) from a reputable font website.
2. **Copy Fonts to Fonts Directory**:
- Open a terminal and create a dir... | 11,648 | [
{
"from": "human",
"value": "I'm using netbeans on ubuntu, I would like to add some fonts to it. Could anyone tell me how this is done ?\n"
},
{
"from": "gpt",
"value": "Adding fonts to NetBeans on Ubuntu can be done by following these steps:\n\n### Step 1: Install Fonts on Ubuntu\n1. **Download... |
I'm using a lat/long SRID in my PostGIS database (-4326). I would like to find the nearest points to a given point in an efficient manner. I tried doing an
ORDER BY ST_Distance(point, ST_GeomFromText(?,-4326))
which gives me ok results in the lower 48 states, but up in Alaska it gives me garbage. Is there a way ... | When working with geographic data in PostGIS using the EPSG:4326 coordinate reference system (which represents latitude and longitude), you need to be aware that distance calculations using `ST_Distance()` with this SRID will not return great-circle distances, but rather "naive" planar distances. This is why you're see... | 11,568 | [
{
"from": "human",
"value": "I'm using a lat/long SRID in my PostGIS database (-4326). I would like to find the nearest points to a given point in an efficient manner. I tried doing an\nORDER BY ST_Distance(point, ST_GeomFromText(?,-4326))\n\nwhich gives me ok results in the lower 48 states, but up in ... |
I'm primarily a designer, with a fairly high level of understanding of CSS and HTML. I have an idea for a very simple iPhone app, largely involving a timer, an animated graphic, and some sound. If I get more advanced there could be some simple customization settings
I have no understanding of Objective C, or C of any ... | Creating an iPhone app with your background in design and knowledge of HTML and CSS is definitely possible, especially if you're willing to learn some new skills. Here are some approaches and resources to help you get started:
### 1. **Learn Swift**
Swift is the primary programming language for iOS development and is ... | 7,709 | [
{
"from": "human",
"value": "I'm primarily a designer, with a fairly high level of understanding of CSS and HTML. I have an idea for a very simple iPhone app, largely involving a timer, an animated graphic, and some sound. If I get more advanced there could be some simple customization settings \nI have no ... |
I'm using Amazon's tools to build a web app. I'm very happy with them, but I have a security concern.
Right now, I'm using multiple EC2 instances, S3, SimpleDB and SQS. In order to authenticate requests to the different services, you include your Access Identifiers (login required).
For example, to upload a file to S3... | You're right to be concerned about the security of your AWS resources, especially when using Access Keys on EC2 instances. Compromising those credentials can lead to significant issues. However, there are several best practices and strategies you can employ to minimize your risks and improve security:
1. **Use IAM Rol... | 13,387 | [
{
"from": "human",
"value": "I'm using Amazon's tools to build a web app. I'm very happy with them, but I have a security concern.\nRight now, I'm using multiple EC2 instances, S3, SimpleDB and SQS. In order to authenticate requests to the different services, you include your Access Identifiers (login requi... |
Since the release of Adobe AIR I am wondering why Java Web Start has not gained more attention in the past as to me it seems to be very similar, but web start is available for a much longer time.
Is it mainly because of bad marketing from Sun, or are there more technical concerns other than the need of having the right... | Java Web Start and Adobe AIR do indeed serve similar purposes in enabling the deployment of applications via the web, but there are several reasons why Java Web Start has not gained as much attention and popularity, especially compared to Adobe AIR and other technologies. Here are some key factors:
### 1. **Marketing ... | 10,909 | [
{
"from": "human",
"value": "Since the release of Adobe AIR I am wondering why Java Web Start has not gained more attention in the past as to me it seems to be very similar, but web start is available for a much longer time.\nIs it mainly because of bad marketing from Sun, or are there more technical concer... |
I was looking at WF and was wondering if it would be best to use the StateMachine workflow to follow a users state. i.e. user is anonymous, user is known but not authenticated, user is known and authenticated.
would this be a good way to go about solving this regular issue?
| Using a State Machine Workflow in Windows Workflow Foundation (WF) to manage user states (anonymous, known but not authenticated, known and authenticated) can be a good approach, depending on your application's requirements and complexity. Here are some considerations to help you decide if this is the right solution:
... | 12,985 | [
{
"from": "human",
"value": "I was looking at WF and was wondering if it would be best to use the StateMachine workflow to follow a users state. i.e. user is anonymous, user is known but not authenticated, user is known and authenticated.\nwould this be a good way to go about solving this regular issue?\n"
... |
I am in the process of beginning work on several ASP.NET custom controls. I was wondering if I could get some input on your guys/girls thoughts on how you apply styling to your controls.
I would rather push it so CSS, so for the few controls I have done in the past, I have simply stuck a string property which allows yo... | When it comes to styling custom ASP.NET controls, you have several options, each with its pros and cons. Let's discuss the three main approaches you've mentioned: inline styles, CSS classes, and the use of a `Style` property.
### 1. Inline Styles
**Pros:**
- **Immediate Effect:** You can see the changes instantly wit... | 8,370 | [
{
"from": "human",
"value": "I am in the process of beginning work on several ASP.NET custom controls. I was wondering if I could get some input on your guys/girls thoughts on how you apply styling to your controls.\nI would rather push it so CSS, so for the few controls I have done in the past, I have simp... |
Does anyone know how SQL Server determines the order triggers (of same type, i.e. before triggers) are executed. And is there any way of changing this so that I can specify the order I want. If not, why not.
Thanks.
| In SQL Server, the order of trigger execution for triggers of the same type (e.g., multiple `AFTER INSERT` triggers on the same table) is not guaranteed. SQL Server does not provide a built-in mechanism to control the execution order of such triggers explicitly. If you have multiple triggers of the same type, they will... | 9,808 | [
{
"from": "human",
"value": "Does anyone know how SQL Server determines the order triggers (of same type, i.e. before triggers) are executed. And is there any way of changing this so that I can specify the order I want. If not, why not.\nThanks.\n"
},
{
"from": "gpt",
"value": "In SQL Server, ... |
I get this error when I do a bulk insert with select * from [table_name], and another table name:
the locale id '0' of the source column 'PAT_NUM_ADT' and the locale id '1033'
of the destination column 'PAT_ID_OLD' do not match
I tried resetting my db collation but this did not help.
Has anyone seen this error?
| The error you're encountering suggests that there is a mismatch in the locale settings or character set between the source and destination columns during your bulk insert operation. Specifically, the source column `PAT_NUM_ADT` has a locale ID of `0` (which typically indicates an unlocalized string) and the destination... | 11,108 | [
{
"from": "human",
"value": "I get this error when I do a bulk insert with select * from [table_name], and another table name:\nthe locale id '0' of the source column 'PAT_NUM_ADT' and the locale id '1033' \nof the destination column 'PAT_ID_OLD' do not match\n\nI tried resetting my db collation but this di... |
(I asked this question in another way, and got some interesting responses but I'm not too convinced.)
Is Mono's GtkSharp truly cross-platform? It seems to be Gnome based... how can that work with PC and Mac?
Can someone give me examples of a working Mac/PC/Linux app that is written with a single codebase in Microsoft ... | Mono's GtkSharp is indeed designed to be cross-platform, leveraging the GTK toolkit, which is widely used in Linux environments (particularly in GNOME). However, it is also possible to run GTK applications on Windows and macOS, although the experience may vary due to differences in system integrations and native look-a... | 10,200 | [
{
"from": "human",
"value": "(I asked this question in another way, and got some interesting responses but I'm not too convinced.)\nIs Mono's GtkSharp truly cross-platform? It seems to be Gnome based... how can that work with PC and Mac? \nCan someone give me examples of a working Mac/PC/Linux app that is w... |
When you use a standard Windows "file open" dialog using GetOpenFileName(), the shell will load various DLLs that it requires to display the file list, including custom ones.
In my application, I found that the DLL that TortoiseCVS uses to draw overlays on the icons was calling GdiPlusShutdown(), and so some time after... | The issue you're encountering with the TortoiseCVS DLL is indeed a common concern when working with third-party libraries and components in Windows. The behavior of unloading DLLs and performing cleanup operations can lead to unexpected consequences, especially when multiple components share resources like GDI+. Here a... | 9,900 | [
{
"from": "human",
"value": "When you use a standard Windows \"file open\" dialog using GetOpenFileName(), the shell will load various DLLs that it requires to display the file list, including custom ones.\nIn my application, I found that the DLL that TortoiseCVS uses to draw overlays on the icons was calli... |
Just downloaded the CodeRush trial version and I can't easily find the one feature that I really wanted. I would like to be able to start typing a class name and to jump to its definition, sort of like the quick navigator but I want it to search in closed files within my solution as well as open ones. I know R# has t... | In CodeRush, you can navigate to a class definition (or any other symbol) using the **"Go To"** feature, which allows you to search across your entire solution, including closed files. Here's how you can achieve that:
1. **Use the Go To Feature**:
- Press `Ctrl + Shift + T` (by default) to bring up the **Go To Type... | 14,378 | [
{
"from": "human",
"value": "Just downloaded the CodeRush trial version and I can't easily find the one feature that I really wanted. I would like to be able to start typing a class name and to jump to its definition, sort of like the quick navigator but I want it to search in closed files within my soluti... |
This code is from Prototype.js. I've looked at probably 20 different tutorials, and I can't figure out why this is not working. The response I get is null.
new Ajax.Request(/path/to / xml / file.xml, {
method: "get",
contentType: "application/xml",
onSuccess: function(transport) {
alert(transport.respons... | The issue you are experiencing with `transport.responseXML` returning `null` is likely related to the way the server is serving the XML file and the `Content-Type` of the response.
### Key Points to Consider:
1. **Content-Type Header**: Ensure that the server is returning the XML file with the correct `Content-Type` ... | 11,735 | [
{
"from": "human",
"value": "This code is from Prototype.js. I've looked at probably 20 different tutorials, and I can't figure out why this is not working. The response I get is null.\nnew Ajax.Request(/path/to / xml / file.xml, {\n method: \"get\",\n contentType: \"application/xml\",\n onSuccess: fu... |
As of the fall of 2008 I'm about to embark on a new development cycle for a major product that has a winforms and an asp.net interface. We use Telerik, DevExpress and Infragistics components in it and all are going to have a release within a month or so which will be the one I target for our spring release of our prod... | As of the fall of 2008, there are several compelling reasons you might consider upgrading to Visual Studio 2008, even if you are currently targeting .NET 2.0+ and using third-party components that support VS2005:
1. **Improved IDE Features**: Visual Studio 2008 offers enhancements to the Integrated Development Environ... | 11,173 | [
{
"from": "human",
"value": "As of the fall of 2008 I'm about to embark on a new development cycle for a major product that has a winforms and an asp.net interface. We use Telerik, DevExpress and Infragistics components in it and all are going to have a release within a month or so which will be the one I ... |
I have a Win-CGI application I am currently converting to ISAPI.
The application uses the TDataset descendants for Extended Systems Advantage Database Server.
As there can be only one instance of a TAdsSettings object, this must be
in the main thread.
TAdsQuery objects are needed in the request threads.
Will this work... | When transitioning your Win-CGI application to ISAPI, managing thread safety and global state becomes a key concern, particularly when working with database components like `TAdsSettings` and `TAdsQuery` from the Advantage Database Server.
Here's a breakdown of how this can work and what you should consider:
1. **Glo... | 9,494 | [
{
"from": "human",
"value": "I have a Win-CGI application I am currently converting to ISAPI.\nThe application uses the TDataset descendants for Extended Systems Advantage Database Server.\nAs there can be only one instance of a TAdsSettings object, this must be \nin the main thread.\nTAdsQuery objects are ... |
I've been using the following code to open Office Documents, PDF, etc. on my windows machines using Java and it's working fine, except for some reason when a filename has embedded it within it multiple contiguous spaces like "File[SPACE][SPACE]Test.doc".
How can I make this work? I'm not averse to canning the whole pi... | The issue you're facing likely stems from how the spaces in the file path are handled when the command is executed through the Java `Runtime.exec` method.
In your current implementation, the regex pattern used to quote the file paths with spaces may not handle multiple contiguous spaces correctly, resulting in an inc... | 12,972 | [
{
"from": "human",
"value": "I've been using the following code to open Office Documents, PDF, etc. on my windows machines using Java and it's working fine, except for some reason when a filename has embedded it within it multiple contiguous spaces like \"File[SPACE][SPACE]Test.doc\".\nHow can I make this w... |
I'd like to run a script that builds the documentation for my php project. It is basically just using wget to run phpdoc.
| Certainly! You can create a simple shell script to automate the process of generating documentation for your PHP project using phpDocumentor. Below is an example script that utilizes `wget` to download `phpDocumentor` and then runs it to generate your documentation.
First, ensure you have `phpDocumentor` installed. Yo... | 12,243 | [
{
"from": "human",
"value": "I'd like to run a script that builds the documentation for my php project. It is basically just using wget to run phpdoc.\n"
},
{
"from": "gpt",
"value": "Certainly! You can create a simple shell script to automate the process of generating documentation for your PHP... |
I have a table with say 3 columns. There's no primary key so there can be duplicate rows. I need to just keep one and delete the others. Any idea how to do this is Sql Server?
| In SQL Server, you can delete duplicate rows while keeping one instance of each by using a Common Table Expression (CTE) along with the `ROW_NUMBER()` function. The `ROW_NUMBER()` function allows you to assign a unique sequential integer to rows within a partition of a result set.
Here’s a general approach to deleting... | 13,018 | [
{
"from": "human",
"value": "I have a table with say 3 columns. There's no primary key so there can be duplicate rows. I need to just keep one and delete the others. Any idea how to do this is Sql Server?\n"
},
{
"from": "gpt",
"value": "In SQL Server, you can delete duplicate rows while keeping... |
I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which in turn contains several LinkButtons.
In the RenderContent call in the Webpart I've got some code to add event handlers:
ArrayList nextPages = new ArrayList();
//populate nextPages ....
A... | When working with ASP.NET WebForms, it's crucial to understand the page life cycle and how data binding and event handling interact with one another. In your case, the `PageNavigateButton_Click` event handler is likely not being triggered due to a few possible reasons:
1. **Binding Data on Every Postback**: If you are... | 12,163 | [
{
"from": "human",
"value": "I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which in turn contains several LinkButtons. \nIn the RenderContent call in the Webpart I've got some code to add event handlers:\n ArrayList nextPages = new ArrayList();\... |
Those of you who have used Pex, what do you think its advantages and disadvantages are of Pex as a tool?
Also, what do you think are the advantages and disadvantages of "Automated Exploratory Testing" in general, as a supplement to TDD/Unit Testing?
| ### Advantages and Disadvantages of Pex
Pex, also known as Microsoft Research Pex, is a tool for automated white-box testing of .NET applications. Here are some advantages and disadvantages based on user experiences:
#### Advantages:
1. **Automated Test Generation**: Pex automatically generates unit tests by analyzin... | 8,092 | [
{
"from": "human",
"value": "Those of you who have used Pex, what do you think its advantages and disadvantages are of Pex as a tool?\nAlso, what do you think are the advantages and disadvantages of \"Automated Exploratory Testing\" in general, as a supplement to TDD/Unit Testing?\n"
},
{
"from": "g... |
I need to support exact phrases (enclosed in quotes) in an otherwise space-separated list of terms.
Thus splitting the respective string by the space-character is not sufficient anymore.
Example:
input : 'foo bar "lorem ipsum" baz'
output: ['foo', 'bar', 'lorem ipsum', 'baz']
I wonder whether this could be achieved wi... | Yes, you can achieve this using a single regular expression in Python. The regex will help you to match both quoted phrases and unquoted words.
Here's a regular expression that does exactly that:
```python
import re
def split_string(input_string):
# Regular expression to match either quoted phrases or unquoted ... | 11,494 | [
{
"from": "human",
"value": "I need to support exact phrases (enclosed in quotes) in an otherwise space-separated list of terms.\nThus splitting the respective string by the space-character is not sufficient anymore.\nExample:\ninput : 'foo bar \"lorem ipsum\" baz'\noutput: ['foo', 'bar', 'lorem ipsum', 'ba... |
I'm looking for non-web-based tools to view IIS logs. I've been using LogParser but I was hoping for something with an interface. It doesn't need to do any fancy reports or charts -- just a list with some search filters is plenty. I need something lightweight that I can run directly on the web server, preferably wit... | If you are looking for lightweight, non-web-based tools to view IIS logs with a simple interface, here are a few options you might consider:
1. **Notepad++**:
- While primarily a text editor, Notepad++ can handle large log files and offers a few plugins like "TextFX" that can help you search, filter, and manipulate... | 13,278 | [
{
"from": "human",
"value": "I'm looking for non-web-based tools to view IIS logs. I've been using LogParser but I was hoping for something with an interface. It doesn't need to do any fancy reports or charts -- just a list with some search filters is plenty. I need something lightweight that I can run d... |
Can you do a better code? I need to check/uncheck all childs according to parent and when an child is checked, check parent, when all childs are unchecked uncheck parent.
$(".parent").children("input").click(function() {
$(this).parent().siblings("input").attr("checked", this.checked);
});
$(".parent").sibling... | Your code is mostly working, but it can be optimized and made more readable. Here is a revised version that accomplishes your requirements using jQuery. This version handles checking and unchecking the parent and child elements in a more straightforward manner:
```javascript
$(document).ready(function() {
// Check... | 13,943 | [
{
"from": "human",
"value": "Can you do a better code? I need to check/uncheck all childs according to parent and when an child is checked, check parent, when all childs are unchecked uncheck parent.\n $(\".parent\").children(\"input\").click(function() {\n $(this).parent().siblings(\"input\").attr(\"... |
How can I retrieve the name of the currently logged in user, using a python script? The function should work regardless of whether it is a domain/ad user or a local user.
| You can retrieve the name of the currently logged-in user in Python using the `os` module, which works across different operating systems. Here's a simple function to accomplish this:
```python
import os
def get_current_user():
# Get the current user name
user_name = os.getlogin()
return user_name
if __n... | 14,728 | [
{
"from": "human",
"value": "How can I retrieve the name of the currently logged in user, using a python script? The function should work regardless of whether it is a domain/ad user or a local user.\n"
},
{
"from": "gpt",
"value": "You can retrieve the name of the currently logged-in user in Py... |
Most sites are either fully released, or in beta.
But what happens if you have a large site, and some of the parts are still in Beta, and other parts aren't.
How do you effectively communicate this to the customer?
| Effectively communicating the status of a large site with parts in beta while others are fully released requires clarity and transparency. Here are several strategies to ensure that customers understand which parts of the site are in beta and which are fully functional:
### 1. **Clear Labeling and Signage**
- **Vis... | 11,988 | [
{
"from": "human",
"value": "Most sites are either fully released, or in beta.\nBut what happens if you have a large site, and some of the parts are still in Beta, and other parts aren't. \nHow do you effectively communicate this to the customer?\n"
},
{
"from": "gpt",
"value": "Effectively comm... |
fossil http://www.fossil-scm.org
I found this recently and have started using it for my home projects. I want to hear what other people think of this VCS.
What is missing in my mind, is IDE support. Hopefully it will come, but I use the command line just fine.
My favorite things about fossil: single executable with... | Fossil is indeed a unique version control system (VCS) with several standout features that make it appealing for many developers, particularly for personal projects or smaller teams. Here are some thoughts on its strengths and weaknesses based on what you've shared:
### Strengths:
1. **Single Executable**: The fact th... | 12,712 | [
{
"from": "human",
"value": "fossil http://www.fossil-scm.org\nI found this recently and have started using it for my home projects. I want to hear what other people think of this VCS. \nWhat is missing in my mind, is IDE support. Hopefully it will come, but I use the command line just fine.\nMy favorite... |
Is it possible to get a thread dump of a Java Web Start application? And if so, how?
It would be nice if there were a simple solution, which would enable a non-developer (customer) to create a thread dump. Alternatively, is it possible to create a thread dump programmatically?
In the Java Web Start Console I can get a ... | Yes, it is possible to obtain a thread dump from a Java Web Start application, but the ease of doing so and the available methods may depend on the specific setup and version of Java you are using. Below are some methods to obtain a thread dump from a Java Web Start application, both for non-developers and programmatic... | 8,870 | [
{
"from": "human",
"value": "Is it possible to get a thread dump of a Java Web Start application? And if so, how?\nIt would be nice if there were a simple solution, which would enable a non-developer (customer) to create a thread dump. Alternatively, is it possible to create a thread dump programmatically?\... |
As part of our product we use 3rd party hardware and drivers. Unfortunately, these drivers aren't signed so up pops the "Found new hardware wizard" when installing or upgrading our product. Our product is web based and allows the users access to everything they need remotely, apart from this one case.
Is there a regi... | To address the issue of the "Found New Hardware Wizard" appearing due to unsigned drivers, let's consider the three queries you've raised:
### 1. Registry Hack or OS Setting to Stop the Wizard
While there is no guaranteed method that works universally across all versions of Windows, there are some settings you can tr... | 10,677 | [
{
"from": "human",
"value": "As part of our product we use 3rd party hardware and drivers. Unfortunately, these drivers aren't signed so up pops the \"Found new hardware wizard\" when installing or upgrading our product. Our product is web based and allows the users access to everything they need remotely... |
I have a Win32 TreeCtrl where the user can rename the tree labels. I process the TVN_ENDLABELEDIT message to do this.
In certain cases I need to change the text that the user entered. Basically the user can enter a short name during edit and I want to replace it with a longer text.
To do this I change the pszText membe... | In the Win32 API, the `pszText` member of the `TVITEM` struct used with the `TVN_ENDLABELEDIT` notification message is typically provided by the system and is not allocated with `malloc()` or `new` by your application. Instead, it is managed by the common controls library. This means that you are generally not responsi... | 10,544 | [
{
"from": "human",
"value": "I have a Win32 TreeCtrl where the user can rename the tree labels. I process the TVN_ENDLABELEDIT message to do this.\nIn certain cases I need to change the text that the user entered. Basically the user can enter a short name during edit and I want to replace it with a longer t... |
I have only a basic understanding of Eclipse RCP.
I am about to start an in-house application for our technical support team, that will likely grow over time. The team is distributed across continents so I would like to be able to auto-update the application when new versions are made available. The application aims t... | Starting an in-house application using Eclipse RCP (Rich Client Platform) can be an excellent choice, especially for building a feature-rich, cross-platform desktop application. Here are some insights and considerations that may help you on your journey:
### Why Eclipse RCP?
1. **Modularity**: RCP applications are bu... | 9,015 | [
{
"from": "human",
"value": "I have only a basic understanding of Eclipse RCP. \nI am about to start an in-house application for our technical support team, that will likely grow over time. The team is distributed across continents so I would like to be able to auto-update the application when new versions ... |
What is the best way to determine duplicate records in a SQL Server table?
For instance, I want to find the last duplicate email received in a table (table has primary key, receiveddate and email fields).
Sample data:
1 01/01/2008 stuff@stuff.com
2 02/01/2008 stuff@stuff.com
3 01/12/2008 noone@stuff.com
| To identify duplicate records in a SQL Server table based on a specific field (in your case, the email field), you can use a Common Table Expression (CTE) or a subquery to group by the email address and then filter for duplicates. Since you also want to find the last record for each duplicate email, you can order by th... | 13,060 | [
{
"from": "human",
"value": "What is the best way to determine duplicate records in a SQL Server table?\nFor instance, I want to find the last duplicate email received in a table (table has primary key, receiveddate and email fields).\nSample data:\n1 01/01/2008 stuff@stuff.com\n2 02/01/2008 stuff@stuff.c... |
It seems as if making the clipboard ring appear in the VS2008 toolbox is pretty elusive. Does anyone know how to turn this on ? Ctrl-Shift-V works fine, but I'd like to see what on the ring.
| In Visual Studio 2008, the clipboard ring feature allows you to store multiple items in the clipboard, but it doesn't automatically display in the toolbox. To view the contents of the clipboard ring, you can follow these steps:
1. **Using Shortcut Keys**: You can use `Ctrl + Shift + V` to cycle through the clipboard r... | 13,712 | [
{
"from": "human",
"value": "It seems as if making the clipboard ring appear in the VS2008 toolbox is pretty elusive. Does anyone know how to turn this on ? Ctrl-Shift-V works fine, but I'd like to see what on the ring.\n"
},
{
"from": "gpt",
"value": "In Visual Studio 2008, the clipboard ring... |
So the SMEs at my current place of employment want to try and disable the back button for certain pages. We have a page where the user makes some selections and submits them to be processed. In some instances they have to enter a comment on another page.
What the users have figured out is that they don't have to en... | Disabling the browser's back button is not feasible through JavaScript due to the way web browsers are designed. The back button is a fundamental part of the browsing experience, and attempts to disable it can lead to a poor user experience and may frustrate users. That said, there are ways to mitigate the issue of use... | 11,334 | [
{
"from": "human",
"value": "So the SMEs at my current place of employment want to try and disable the back button for certain pages. We have a page where the user makes some selections and submits them to be processed. In some instances they have to enter a comment on another page. \nWhat the users have... |
I have an assembly which should not be used by any application other than the designated executable. Please give me some instructions to do so.
| To ensure that an assembly (a .NET DLL) is used exclusively by a designated executable, you can implement several strategies to restrict access and enforce this limitation. Below are steps and techniques you can use to protect your assembly:
### 1. **Strong Naming and Signing**
- **Strong Name Your Assembly:** Use a s... | 9,729 | [
{
"from": "human",
"value": "I have an assembly which should not be used by any application other than the designated executable. Please give me some instructions to do so.\n"
},
{
"from": "gpt",
"value": "To ensure that an assembly (a .NET DLL) is used exclusively by a designated executable, yo... |
From what I understand, the crystals on PCs are notorious for clock skew. If clocks are always skewing, what is the best way to synchronize clocks between machines, with millisecond accuracy and precision? From what I've found, NTP and PTP are possible solutions, but I was wondering if anyone else has had any experienc... | You're correct that clock skew can be a significant issue in computer systems, particularly in distributed networks where precise timing is crucial. NTP (Network Time Protocol) and PTP (Precision Time Protocol, defined in IEEE 1588) are the two most commonly used protocols for synchronizing clocks between machines, but... | 10,764 | [
{
"from": "human",
"value": "From what I understand, the crystals on PCs are notorious for clock skew. If clocks are always skewing, what is the best way to synchronize clocks between machines, with millisecond accuracy and precision? From what I've found, NTP and PTP are possible solutions, but I was wonde... |
How would I remove the border from an iframe embedded in my web app? An example of the iframe is:
<iframe src="myURL" width="300" height="300">Browser not compatible.</iframe>
I would like the transition from the content on my page to the contents of the iframe to be seamless, assuming the background colors are consis... | To remove the border from an `<iframe>` in IE6, you can use a combination of HTML attributes and CSS styles. Here's a method to achieve a borderless look.
### HTML Markup
You should add the `frameborder` attribute and the `scrolling` attribute to your `<iframe>` tag to ensure no borders appear:
```html
<iframe src="... | 12,051 | [
{
"from": "human",
"value": "How would I remove the border from an iframe embedded in my web app? An example of the iframe is:\n<iframe src=\"myURL\" width=\"300\" height=\"300\">Browser not compatible.</iframe>\n\nI would like the transition from the content on my page to the contents of the iframe to be s... |
Which checksum algorithm can you recommend in the following use case?
I want to generate checksums of small JPEG files (~8 kB each) to check if the content changed. Using the filesystem's date modified is unfortunately not an option.
The checksum need not be cryptographically strong but it should robustly indicate chan... | For your use case of generating checksums for small JPEG files (~8 kB each) with a focus on speed and the ability to robustly indicate changes, I recommend using the **MurmurHash** family of hash functions, particularly **MurmurHash3**. Here’s why it’s a good fit:
1. **Speed**: MurmurHash is designed to be fast and ef... | 12,909 | [
{
"from": "human",
"value": "Which checksum algorithm can you recommend in the following use case?\nI want to generate checksums of small JPEG files (~8 kB each) to check if the content changed. Using the filesystem's date modified is unfortunately not an option.\nThe checksum need not be cryptographically ... |
I'm calling a non-.NET dll from my project using P/Invoke, meaning that the .dll must always be present in the .exe's directory.
Is there any way to tell Visual Studio of this dependency, so that it will automatically copy the .dll to the output directory when compiling, and will automatically include the .dll in the ... | Yes, you can set up Visual Studio to automatically copy the non-.NET DLL to the output directory when building your project. This can also be configured so that it gets included in the setup project. Here’s how you can do it:
### Step 1: Copy the DLL to Output Directory
1. **Add the DLL to your project**:
- Right-... | 10,943 | [
{
"from": "human",
"value": "I'm calling a non-.NET dll from my project using P/Invoke, meaning that the .dll must always be present in the .exe's directory. \nIs there any way to tell Visual Studio of this dependency, so that it will automatically copy the .dll to the output directory when compiling, and w... |
There are so many Linux distributions to choose from! What is the "best" linux flavor for a web hosting environment running primarily:
Apache HTTP, Tomcat or JBoss, MySQL and Alfresco (not necessarily all in the same instance).
Are there any significant differences in terms of ease of administration and configuration,... | Choosing the best Linux distribution for a web hosting environment that runs Apache HTTP, Tomcat or JBoss, MySQL, and Alfresco depends on several factors, including your familiarity with Linux, community support, documentation, stability, and performance. Here are some popular Linux distributions that are well-suited f... | 10,899 | [
{
"from": "human",
"value": "There are so many Linux distributions to choose from! What is the \"best\" linux flavor for a web hosting environment running primarily:\nApache HTTP, Tomcat or JBoss, MySQL and Alfresco (not necessarily all in the same instance).\nAre there any significant differences in terms... |
I'm searching a small Java based RSS/Feed Generator, something like the FeedCreator.class.php library, any suggestions?, thanks!
| If you’re looking for a lightweight Java-based RSS/feed generator, there are a few libraries you might consider:
1. **Rome**: Rome is a widely used library for working with RSS and Atom feeds in Java. It offers an easy-to-use API for generating and parsing feeds. It's well-documented and supports both RSS 2.0 and Atom... | 12,348 | [
{
"from": "human",
"value": "I'm searching a small Java based RSS/Feed Generator, something like the FeedCreator.class.php library, any suggestions?, thanks!\n"
},
{
"from": "gpt",
"value": "If you’re looking for a lightweight Java-based RSS/feed generator, there are a few libraries you might co... |
I have a menu running off of a sitemap which one of the SiteMapNode looks like this:
<siteMapNode title="Gear" description="" url="">
<siteMapNode title="Armor" description="" url="~/Armor.aspx" />
<siteMapNode title="Weapons" description="" url="~/Weapons.aspx" />
</siteMapNode>
I also have a Skin applied to th... | To ensure that the CSS styles are applied correctly to the nested `siteMapNode` items (like Armor and Weapons) in your ASP.NET `Menu`, you might need to adjust a few things in both your markup and the CSS. Here are some steps and considerations to make sure the styles are properly applied:
### 1. CSS Specificity
Ensur... | 10,455 | [
{
"from": "human",
"value": "I have a menu running off of a sitemap which one of the SiteMapNode looks like this: \n<siteMapNode title=\"Gear\" description=\"\" url=\"\">\n <siteMapNode title=\"Armor\" description=\"\" url=\"~/Armor.aspx\" />\n <siteMapNode title=\"Weapons\" description=\"\" url=\"~/Weap... |
Is it possible to throw an exception in a JSP without using scriptlet code?
| Yes, it is possible to throw an exception in a JSP without using scriptlet code. JSP has several features and functionalities that allow you to handle exceptions in a more modern way, adhering to good practices like separating presentation from business logic.
### Ways to Throw Exceptions in JSP Without Scriptlet Code... | 11,586 | [
{
"from": "human",
"value": "Is it possible to throw an exception in a JSP without using scriptlet code?\n"
},
{
"from": "gpt",
"value": "Yes, it is possible to throw an exception in a JSP without using scriptlet code. JSP has several features and functionalities that allow you to handle excepti... |
I have a VisualSVN Server installed on a Windows server, serving several repositories.
Since the web-viewer built into VisualSVN server is a minimalistic subversion browser, I'd like to install WebSVN on top of my repositories.
The problem, however, is that I can't seem to get authentication to work. Ideally I'd like m... | Integrating WebSVN with VisualSVN Server for authentication can be a bit tricky, especially since VisualSVN Server has its own mechanism for handling authentication. However, it is possible to set up WebSVN to authenticate against your existing VisualSVN Server users.
### Steps to Integrate WebSVN with VisualSVN Serve... | 6,710 | [
{
"from": "human",
"value": "I have a VisualSVN Server installed on a Windows server, serving several repositories.\nSince the web-viewer built into VisualSVN server is a minimalistic subversion browser, I'd like to install WebSVN on top of my repositories.\nThe problem, however, is that I can't seem to get... |
I'm trying to replace some bespoke message queues with ActiveMQ, and I need to talk to them (a lot) from Perl. ActiveMQ provides a Stomp interface and Perl has Net::Stomp, so this seems like it should be fine, but it's not.
Even if I send a BEGIN frame over Stomp the messages sent with SEND are immediately published, ... | It sounds like you're encountering some challenges with using ActiveMQ's STOMP interface for transactional message processing from Perl with the `Net::Stomp` module. Let's clarify a few things and discuss how you might address the issues you're facing.
### Understanding STOMP Transactions
In STOMP, transactions are i... | 8,336 | [
{
"from": "human",
"value": "I'm trying to replace some bespoke message queues with ActiveMQ, and I need to talk to them (a lot) from Perl. ActiveMQ provides a Stomp interface and Perl has Net::Stomp, so this seems like it should be fine, but it's not.\nEven if I send a BEGIN frame over Stomp the messages ... |
On OS X, does Objective-C compile to native code or byte-code?
Can Objective-C programs be compiled on Linux?
| Objective-C on OS X (now known as macOS) compiles to native code. The primary compiler used for Objective-C is Clang, which is part of the LLVM project. Clang compiles Objective-C source code directly to machine code, allowing for performance optimizations specific to the target architecture.
As for compiling Objectiv... | 15,914 | [
{
"from": "human",
"value": "On OS X, does Objective-C compile to native code or byte-code?\nCan Objective-C programs be compiled on Linux?\n"
},
{
"from": "gpt",
"value": "Objective-C on OS X (now known as macOS) compiles to native code. The primary compiler used for Objective-C is Clang, which... |
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work).
I want to upgrade Python to 64 bit. ... | To set up a 64-bit version of Python on OS X 10.5 and ensure it integrates well with the default Python installation, particularly in terms of site-packages, you can follow these steps:
1. **Download Python Source:**
First, download the desired version of Python (e.g., Python 2.7.x) from the official Python website... | 9,154 | [
{
"from": "human",
"value": "The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it wo... |
I'm adding a new field to a list and view. To add the field to the view, I'm using this code:
view.ViewFields.Add("My New Field");
However this just tacks it on to the end of the view. How do I add the field to a particular column, or rearrange the field order? view.ViewFields is an SPViewFieldCollection object that i... | To add a field to a specific position in a SharePoint view, you'll need to modify the `ViewFields` collection directly, because the `SPViewFieldCollection` does not provide methods to directly insert or rearrange fields.
One common approach is to first create a new `SPViewFieldCollection`, add all existing fields to i... | 10,565 | [
{
"from": "human",
"value": "I'm adding a new field to a list and view. To add the field to the view, I'm using this code:\nview.ViewFields.Add(\"My New Field\");\n\nHowever this just tacks it on to the end of the view. How do I add the field to a particular column, or rearrange the field order? view.ViewFi... |
I tried to install Delphi 7 on Vista several times and Vista prevented me from doing so by telling me that there are known problems with this application (Delphi 7). Several other people in my company experienced problems with installing D7 on Vista.
This lead to the conclusion that we were at risk with our D7 applicat... | Installing Delphi 7 (D7) on Windows Vista can be challenging due to compatibility issues. Here are some insights into installation strategies, experiences, risk assessments, and how it might affect future usage on Windows 7.
### How to Install Delphi 7 on Vista
1. **Compatibility Mode**:
- Right-click the Delphi ... | 7,322 | [
{
"from": "human",
"value": "I tried to install Delphi 7 on Vista several times and Vista prevented me from doing so by telling me that there are known problems with this application (Delphi 7). Several other people in my company experienced problems with installing D7 on Vista.\nThis lead to the conclusion... |
Is there a way to restart the Rails app (e.g. when you've changed a plugin/config file) while Mongrel is running. Or alternatively quickly restart Mongrel. Mongrel gives these hints that you can but how do you do it?
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart).
** Rails signals register... | Yes, you can restart a Rails application that is running with Mongrel without having to completely stop the server. Here’s how you can do it using signals.
### Restarting with USR2
The recommended way to restart a Mongrel server is to use the `USR2` signal. When you send this signal to the Mongrel process, it will spa... | 13,307 | [
{
"from": "human",
"value": "Is there a way to restart the Rails app (e.g. when you've changed a plugin/config file) while Mongrel is running. Or alternatively quickly restart Mongrel. Mongrel gives these hints that you can but how do you do it?\n** Signals ready. TERM => stop. USR2 => restart. INT => st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.