instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
What are all AT commands required for GPRS communication?
| AT commands are used to control modems, including those that facilitate GPRS (General Packet Radio Service) communication. Below is a list of common AT commands that are typically used for establishing and managing GPRS communication.
### Basic Commands for GPRS Communication
1. **Basic Setup Commands:**
- `AT`: T... | 27,939 | [
{
"from": "human",
"value": "What are all AT commands required for GPRS communication?\n"
},
{
"from": "gpt",
"value": "AT commands are used to control modems, including those that facilitate GPRS (General Packet Radio Service) communication. Below is a list of common AT commands that are typica... |
Isn't the point of caching things in main memory to avoid the expensive disk i/o?
If you're caching things in the swap space of a hard drive, how does that avoid disk i/o?
| You’re correct that the primary purpose of caching is to reduce the expensive disk I/O operations by keeping frequently accessed data in faster storage, typically main memory (RAM). Let's clarify the role of caching and swap space to understand the distinction.
1. **Caching in Main Memory**:
- This involves keeping... | 30,093 | [
{
"from": "human",
"value": "Isn't the point of caching things in main memory to avoid the expensive disk i/o? \nIf you're caching things in the swap space of a hard drive, how does that avoid disk i/o? \n"
},
{
"from": "gpt",
"value": "You’re correct that the primary purpose of caching is to r... |
What's the best way (or tool) on the Windows (Vista) command line to get size and modification time for a file on a remote webserver, without downloading it?
| To get the size and modification time of a file on a remote web server from the Windows command line, you can use the `curl` tool, which supports HTTP requests and can fetch headers. The `HEAD` method is particularly useful for this purpose because it retrieves the metadata of the file without downloading the entire co... | 24,038 | [
{
"from": "human",
"value": "What's the best way (or tool) on the Windows (Vista) command line to get size and modification time for a file on a remote webserver, without downloading it?\n"
},
{
"from": "gpt",
"value": "To get the size and modification time of a file on a remote web server from ... |
How do I dictate the destination folder of a clickOnce application?
| In a ClickOnce deployment, the destination folder for the application is generally determined by the ClickOnce framework and typically is not directly specified by the developer. When a ClickOnce application is installed, it is installed into the user's profile folder on the system, usually under a path like:
```
C:\U... | 26,018 | [
{
"from": "human",
"value": "How do I dictate the destination folder of a clickOnce application?\n"
},
{
"from": "gpt",
"value": "In a ClickOnce deployment, the destination folder for the application is generally determined by the ClickOnce framework and typically is not directly specified by th... |
I'm experiencing a problem where somewhere in the an Eclipse Plugin a class is modifying the .project file, but I'm unable to determine which code/class it is.
I'm on a Windows XP machine. Is there a way I can set a breakpoint or setup some sort of a listener so I can see where in the code the .project file is being m... | To identify where a class in an Eclipse plugin is modifying the `.project` file, you can take the following approaches:
### 1. Set a Breakpoint in the Eclipse Source Code
1. **Download the Eclipse Source Code**: First, you need to have the source code of the Eclipse framework and the specific plugin you are using. Yo... | 23,746 | [
{
"from": "human",
"value": "I'm experiencing a problem where somewhere in the an Eclipse Plugin a class is modifying the .project file, but I'm unable to determine which code/class it is.\nI'm on a Windows XP machine. Is there a way I can set a breakpoint or setup some sort of a listener so I can see wher... |
How Do I Get Eclipse Style Function Completions in Emacs for C, C++ and JAVA?
I love the power of the Emacs text editor but the lack of an "intellisense" feature
leaves me using Eclipse.
| Emacs can be configured to provide powerful code completion and intellisense-like features for C, C++, and Java using several packages. Below are some steps and suggestions to help you set up your Emacs environment for better code completion in these languages.
### 1. Install Required Packages
You’ll want to use a co... | 21,881 | [
{
"from": "human",
"value": "How Do I Get Eclipse Style Function Completions in Emacs for C, C++ and JAVA?\nI love the power of the Emacs text editor but the lack of an \"intellisense\" feature\nleaves me using Eclipse.\n"
},
{
"from": "gpt",
"value": "Emacs can be configured to provide powerful... |
We need to get data out of some Hyperion cubes (databases) using SSIS. Are there any connection managers available for this? Has anyone done this?
| As of my last knowledge update in October 2023, extracting data from Oracle Hyperion cubes using SQL Server Integration Services (SSIS) is not straightforward, mainly because SSIS does not have built-in connection managers specifically designed for Hyperion's Essbase or Planning applications.
However, here are some ap... | 17,829 | [
{
"from": "human",
"value": "We need to get data out of some Hyperion cubes (databases) using SSIS. Are there any connection managers available for this? Has anyone done this? \n"
},
{
"from": "gpt",
"value": "As of my last knowledge update in October 2023, extracting data from Oracle Hyperion c... |
So I'm in Des Moines, Iowa and we have a good number of user groups in our area considering our size. Ruby, .Net, Java, Agile, *nix, etc... Well, tonight a good number of us "leaders" of said user groups got together for a couple drinks and to talk about how we can work together to help make the "DeMo" (I keep seeing t... | It's great to hear about the collaboration among user group leaders in Des Moines! Here are some compelling reasons people might be inclined to attend local user groups, focusing on intrinsic motivations rather than just the freebies:
1. **Networking Opportunities**: Many attendees value the chance to meet like-minded... | 29,740 | [
{
"from": "human",
"value": "So I'm in Des Moines, Iowa and we have a good number of user groups in our area considering our size. Ruby, .Net, Java, Agile, *nix, etc... Well, tonight a good number of us \"leaders\" of said user groups got together for a couple drinks and to talk about how we can work togeth... |
I am writing a DB upgrade script that will check to see if an index has the right two columns defined. If it doesn't, or if it only has one of them, then I will DROP it (is there a way to ALTER an index?) and then recreate it with both.
| In most relational database management systems (RDBMS), you cannot directly alter an index to change its columns. Instead, you typically need to drop the existing index and then create a new one. Here's a general approach to achieve this in SQL for some popular RDBMS like PostgreSQL, MySQL, and SQL Server.
### Steps:
... | 24,122 | [
{
"from": "human",
"value": "I am writing a DB upgrade script that will check to see if an index has the right two columns defined. If it doesn't, or if it only has one of them, then I will DROP it (is there a way to ALTER an index?) and then recreate it with both.\n"
},
{
"from": "gpt",
"value... |
Lets say I've got two interchangeable pieces of code and I want to figure out which one of them takes less processor time to execute. How would I do this?
To get a very rough estimation I could just put NSLog() calls on either side of the code I wanted to profile, but it seems like the processor being otherwise very bu... | To accurately measure the execution time of two pieces of code, you can use more precise timing methods rather than relying on `NSLog()` calls, which can introduce variability due to I/O operations. Here are several methods you can use to benchmark your code effectively:
### 1. Use `DispatchTime` (for Swift)
If you'r... | 26,882 | [
{
"from": "human",
"value": "Lets say I've got two interchangeable pieces of code and I want to figure out which one of them takes less processor time to execute. How would I do this?\nTo get a very rough estimation I could just put NSLog() calls on either side of the code I wanted to profile, but it seems ... |
The table I'm dealing with it potentially larger than available memory (let's say 10GB) and some of the fields can have at most 100MB of text. So a simple SELECT query probably isn't going to cut it. I've seen some command line solutions but I need to be able to do this through a C# program.
| When dealing with large datasets in a database where the data exceeds available memory, especially when some fields can be quite large, you need to adopt a strategy that minimizes memory usage and handles data efficiently. Here are some strategies you can use in a C# program to achieve this:
### 1. Use Data Paging
In... | 23,796 | [
{
"from": "human",
"value": "The table I'm dealing with it potentially larger than available memory (let's say 10GB) and some of the fields can have at most 100MB of text. So a simple SELECT query probably isn't going to cut it. I've seen some command line solutions but I need to be able to do this throug... |
I'm using VisualSVN client and server and one of the requirements for web projects to work as expected is to have the .sln in the same directory (root) as the other files.
I thought it was as simple as removing all the extra parent paths ../ and other relative paths and saving it. However when I try to open it just loc... | It sounds like you've successfully created a solution file (`.sln`) that meets your requirements for your web project. Here are some general guidelines and insights into working with `.sln` files, especially when dealing with Visual Studio projects and their organization:
### General Tips for Creating and Modifying `.... | 26,389 | [
{
"from": "human",
"value": "I'm using VisualSVN client and server and one of the requirements for web projects to work as expected is to have the .sln in the same directory (root) as the other files.\nI thought it was as simple as removing all the extra parent paths ../ and other relative paths and saving ... |
When you do the following in an HTML form:
<input name="one[]" value="foo" />
<input name="one[]" value="bar" />
<input name="two[key]" value="something" />
and submit the form to a PHP page, The $_POST array will look as follows:
array(
'one' => array(
0 => 'foo',
1 => 'bar'
),
'two' => ar... | To convert a PHP array back into the query string format that resembles the POST data string, you can create a custom function. This function will recursively traverse the array and build the query string. Here's a simple implementation of such a function:
```php
function http_build_query_recursive($data, $prefix = ''... | 28,422 | [
{
"from": "human",
"value": "When you do the following in an HTML form:\n<input name=\"one[]\" value=\"foo\" />\n<input name=\"one[]\" value=\"bar\" />\n<input name=\"two[key]\" value=\"something\" />\n\nand submit the form to a PHP page, The $_POST array will look as follows:\narray(\n 'one' => array(\n... |
In the following snippet, using XmlReader, when I encounter an element. I would like to read it as-is, including all attributes and namespace decoration in the element. Using the oXml.Name property, I am only able to get the tag name. Is there a function to get the tag itself?
oXml = XmlReader.Create(path, oXmlSettings... | To read an XML element with all its attributes and namespace decorations while also handling the subsequent text and closing elements appropriately, you'll want to adjust your reading strategy with `XmlReader`. Specifically, after you read the outer XML of the element, you'll need to continue reading until you reach th... | 23,595 | [
{
"from": "human",
"value": "In the following snippet, using XmlReader, when I encounter an element. I would like to read it as-is, including all attributes and namespace decoration in the element. Using the oXml.Name property, I am only able to get the tag name. Is there a function to get the tag itself?\n... |
I would like to apply some logic to a page containing a CheckBoxList control when the user checks or unchecks individual checkbox items. Say, for instance to dynamically show or hide a related control.
I came up with a way using ASP.Net 2.0 callback mechanism (AJAX) with a combination of client-side Javascript and serv... | Yes, there are definitely more elegant and robust solutions for handling interactions with a `CheckBoxList` control, especially when synchronizing related checkboxes or managing state based on user input. Here are a few suggestions that can help improve your implementation:
### 1. Use jQuery
jQuery can simplify DOM ma... | 24,833 | [
{
"from": "human",
"value": "I would like to apply some logic to a page containing a CheckBoxList control when the user checks or unchecks individual checkbox items. Say, for instance to dynamically show or hide a related control.\nI came up with a way using ASP.Net 2.0 callback mechanism (AJAX) with a comb... |
I am looking for a piece of software that I can schedule to check that our web apps are up and running. I've used HP open view years ago, but remember it being quite expensive, I'm looking for something open source or cheap.
So it would login in and do some simple actions maybe submit form and check for some text on ... | Hi Scotty,
There are several open-source and affordable options you can consider for monitoring your web applications and automating the testing process. Here are a few suggestions:
1. **Uptime Kuma**:
- **Description**: Uptime Kuma is a self-hosted, open-source status monitoring solution. It has a user-friendly w... | 26,262 | [
{
"from": "human",
"value": "I am looking for a piece of software that I can schedule to check that our web apps are up and running. I've used HP open view years ago, but remember it being quite expensive, I'm looking for something open source or cheap. \nSo it would login in and do some simple actions may... |
I am creating an Eclipse RCP application.
I am following Joel's advice in the following article "Daily Builds are your friend":
http://www.joelonsoftware.com/articles/fog0000000023.html
So, I've written a nice build script that creates an Eclipse RCP product and that runs unit tests on the code. All results are then d... | Creating an automated setup package for your Eclipse RCP application using Inno Setup and Ant is certainly feasible. Here’s a step-by-step approach you can follow to accomplish this:
### Step 1: Create Your Inno Setup Script
First, you should create a basic Inno Setup script template (`setup.iss`) that includes place... | 25,958 | [
{
"from": "human",
"value": "I am creating an Eclipse RCP application.\nI am following Joel's advice in the following article \"Daily Builds are your friend\":\nhttp://www.joelonsoftware.com/articles/fog0000000023.html\nSo, I've written a nice build script that creates an Eclipse RCP product and that runs u... |
I've inherited a WSDL file for a web service on a system that I don't have access to for development and testing.
I need to generate a web service that adheres to that WSDL. The wrapper is .NET, but if there's an easy way to do this with another platform, we might be able to look at that. The production web service is ... | Given the information you've provided, it sounds like you're facing a couple of key challenges: the WSDL is not compliant with WS-I Basic Profile, and you're looking to create a mock web service that adheres to this WSDL without access to the original system for development and testing.
Here are some steps and suggest... | 24,160 | [
{
"from": "human",
"value": "I've inherited a WSDL file for a web service on a system that I don't have access to for development and testing.\nI need to generate a web service that adheres to that WSDL. The wrapper is .NET, but if there's an easy way to do this with another platform, we might be able to lo... |
I'm using a ListView in C# to make a grid. I would like to find out a way to be able to highlight a specific cell, programatically. I only need to highlight one cell.
I've experimented with Owner Drawn subitems, but using the below code, I get highlighted cells, but no text! Are there any ideas on how to get this wo... | To highlight a specific cell in a `ListView` using owner drawing in C#, it's essential to ensure you are correctly handling the drawing process of both the background and the text. In your current code, you correctly check the cell that needs highlighting, but the text might not be rendered as expected because of how y... | 28,430 | [
{
"from": "human",
"value": "I'm using a ListView in C# to make a grid. I would like to find out a way to be able to highlight a specific cell, programatically. I only need to highlight one cell.\nI've experimented with Owner Drawn subitems, but using the below code, I get highlighted cells, but no text! ... |
I am working on a git repository with a master branch and another the topic branch. I have switched to topic branch and modified a file. Now, if I switched to the master branch, that same file is shown as modified.
For example:
git status in git-build branch:
# On branch git-build
# Changes to be committed:
# (use "g... | Your understanding of Git branches is mostly correct in that branches are independent and changes on one branch shouldn't affect another branch until those changes are explicitly merged. However, the situation you're encountering involves the state of your working directory rather than the commit history of the branche... | 28,846 | [
{
"from": "human",
"value": "I am working on a git repository with a master branch and another the topic branch. I have switched to topic branch and modified a file. Now, if I switched to the master branch, that same file is shown as modified.\nFor example:\ngit status in git-build branch:\n# On branch git-... |
What happen when SQL Server 2005 happen to reach the maximum for an IDENTITY column? Does it start from the beginning and start refilling the gap?
What is the behavior of SQL Server 2005 when it happen?
| When an `IDENTITY` column in SQL Server 2005 reaches its maximum value, it does not automatically start from the beginning or refill gaps. Instead, it raises an error when you attempt to insert a new row.
Here is the behavior you can expect when the maximum value for an `IDENTITY` column is reached:
1. **Error Messa... | 29,129 | [
{
"from": "human",
"value": "What happen when SQL Server 2005 happen to reach the maximum for an IDENTITY column? Does it start from the beginning and start refilling the gap? \nWhat is the behavior of SQL Server 2005 when it happen?\n"
},
{
"from": "gpt",
"value": "When an `IDENTITY` column in ... |
I need some information about localization. I am using .net 2.0 with C# 2.0 which takes care of most of the localization related issues. However, I need to manually draw the alphabets corresponding to the current culture on the screen in one particular screen.
This would be similar to the Contacts screen in Microsoft O... | Your approach to localization and rendering the appropriate script based on the user's current culture is valid and can be achieved, albeit with some nuances. Here’s how you can determine the script (or alphabet) corresponding to a culture, along with relevant code examples.
### Mapping Culture to Scripts
1. **Use th... | 26,440 | [
{
"from": "human",
"value": "I need some information about localization. I am using .net 2.0 with C# 2.0 which takes care of most of the localization related issues. However, I need to manually draw the alphabets corresponding to the current culture on the screen in one particular screen.\nThis would be sim... |
i've been approached to create a bespoke ftp app that users will download in order to be able to upload video files ( up to 100mb).
they want it to be idiot proof ( ie easy for non-computer literate people ). I'm assuming that setting up an ftp app like FileZilla with their username and password would be too much of ... | Creating a bespoke FTP application that is user-friendly for non-technical users can be a challenging task, especially when considering cross-platform functionality and file size limits. Here are some tips and considerations to help you tackle this project:
### 1. **Use a Simple UI/UX Design:**
- **Streamlined Work... | 24,238 | [
{
"from": "human",
"value": "i've been approached to create a bespoke ftp app that users will download in order to be able to upload video files ( up to 100mb). \n\nthey want it to be idiot proof ( ie easy for non-computer literate people ). I'm assuming that setting up an ftp app like FileZilla with their ... |
Would you guys think that a master page should be part of the company's framework or it should be part of each application? Or perhaps the company's framework should only have a interface to provide the least functionality to all master pages ?
Currenlty we face two problems: Firstly, the original idea was to have a co... | Your situation is a common one in software architecture, particularly when dealing with multiple applications that may share some common features but also require flexibility. Here are a few thoughts to consider regarding the placement and management of the master page in your framework:
### 1. **Common Framework vs. ... | 28,332 | [
{
"from": "human",
"value": "Would you guys think that a master page should be part of the company's framework or it should be part of each application? Or perhaps the company's framework should only have a interface to provide the least functionality to all master pages ?\nCurrenlty we face two problems: F... |
What's the best way to unify several overlapping id systems into a unified one while maintaining the old id system.
I have several different ids on my website... (E.g /publisher/1234 and /designer/1234) I would like to unify the ids into a new system, but want to preserve the functionality of the older system.
| Unifying overlapping ID systems while maintaining the old ID systems is a common challenge in software development and database management. Here’s a step-by-step approach you can follow to achieve this:
### 1. Identify Current ID Systems
- **Catalog Existing IDs**: List all existing ID systems (e.g., `/publisher/{id}`... | 25,895 | [
{
"from": "human",
"value": "What's the best way to unify several overlapping id systems into a unified one while maintaining the old id system.\nI have several different ids on my website... (E.g /publisher/1234 and /designer/1234) I would like to unify the ids into a new system, but want to preserve the f... |
I need to import all ad groups in a few OUs into a table in SQL Server 2008. Once I have those I need to import all the members of those groups to a different table. I can use c# to do the work and pass the data to SQL server or do it directly in SQL server.
Suggestions on the best way to approach this?
| To import all Active Directory (AD) groups and their members into SQL Server 2008, you have a couple of options. Below, I'll outline an approach using C# to fetch the data from Active Directory and insert it into SQL Server. This approach allows for better flexibility and error handling. However, I'll also mention a SQ... | 23,485 | [
{
"from": "human",
"value": "I need to import all ad groups in a few OUs into a table in SQL Server 2008. Once I have those I need to import all the members of those groups to a different table. I can use c# to do the work and pass the data to SQL server or do it directly in SQL server.\nSuggestions on th... |
I have a UI widget that needs to be put in an IFRAME both for performance reasons and so we can syndicate it out to affiliate sites easily. The UI for the widget includes tool-tips that display over the top of other page content. See screenshot below or go to the site to see it in action. Is there any way to make cont... | In general, content inside an IFRAME cannot overlap or interact with the content of the parent document due to the browser's same-origin policy, which is designed to prevent security issues, such as cross-site scripting (XSS). However, if the IFRAME and the parent document are from the same origin (i.e., the same domai... | 20,490 | [
{
"from": "human",
"value": "I have a UI widget that needs to be put in an IFRAME both for performance reasons and so we can syndicate it out to affiliate sites easily. The UI for the widget includes tool-tips that display over the top of other page content. See screenshot below or go to the site to see it ... |
I've seen a number of questions asking about a web SVN repository-browsing tool. However, of the ones I've taken a look at, they either require a specific username/password to be configured, rely on default access to the repository being available, or require a separate user database outside Subversion.
In a corporate... | For your requirements, you might want to consider using **WebSVN** or **ViewVC**. Both are web-based tools that provide repository browsing functionality and support user authentication through HTTP/SVN, allowing users to enter their credentials without requiring pre-configured settings in the tool itself.
### 1. WebS... | 28,508 | [
{
"from": "human",
"value": "I've seen a number of questions asking about a web SVN repository-browsing tool. However, of the ones I've taken a look at, they either require a specific username/password to be configured, rely on default access to the repository being available, or require a separate user da... |
Does anyone know of a sample distributed application (.NET or J2EE) using RMI or Web Services?
| Yes, there are various sample distributed applications available for both .NET and J2EE that utilize RMI (Remote Method Invocation) or Web Services. Here are a few examples for each:
### .NET Sample Application
1. **.NET Remoting Example**:
- Microsoft’s documentation often provides samples of .NET Remoting applica... | 25,885 | [
{
"from": "human",
"value": "Does anyone know of a sample distributed application (.NET or J2EE) using RMI or Web Services?\n"
},
{
"from": "gpt",
"value": "Yes, there are various sample distributed applications available for both .NET and J2EE that utilize RMI (Remote Method Invocation) or Web ... |
I recently ran into a problem that I thought boost::lambda or boost::phoenix could help be solve, but I was not able to get the syntax right and so I did it another way. What I wanted to do was remove all the elements in "strings" that were less than a certain length and not in another container.
This is my first try:
... | You're on the right track with using `std::remove_if` to filter the strings based on your conditions. However, to simplify the code and avoid creating an extra struct, you can use either `boost::lambda` or `boost::phoenix`. Below are examples of how you could achieve this with both libraries.
### Using Boost.Lambda
W... | 28,327 | [
{
"from": "human",
"value": "I recently ran into a problem that I thought boost::lambda or boost::phoenix could help be solve, but I was not able to get the syntax right and so I did it another way. What I wanted to do was remove all the elements in \"strings\" that were less than a certain length and not i... |
If you have a class member that is static and public. Would you write static public or public static? I know they are the same. But is there some recommendation / best practice for writing this?
| In most programming languages, the order of the `static` and `public` keywords does not affect the functionality of the code, as they are both modifiers applied to the class member. However, there are some conventions and best practices that developers often follow for readability and consistency.
### Common Conventio... | 27,059 | [
{
"from": "human",
"value": "If you have a class member that is static and public. Would you write static public or public static? I know they are the same. But is there some recommendation / best practice for writing this?\n"
},
{
"from": "gpt",
"value": "In most programming languages, the orde... |
For my web service component, I need to generate a relatively large XML (~500 lines) according to many factors. I am facing a few different choices here:
1. StringBuilder
2. XmlWriter class
3. C# object with serialization???
Which one should I use. Is there any other ways that I am not aware of?
| When generating large XML documents in C#, you have several options, each with its pros and cons. Let’s discuss the three approaches you mentioned, along with their use cases, and also consider other possible methods.
### 1. `StringBuilder`
**Pros:**
- Simple to use for straightforward XML generation.
- Gives you full... | 25,594 | [
{
"from": "human",
"value": "For my web service component, I need to generate a relatively large XML (~500 lines) according to many factors. I am facing a few different choices here:\n1. StringBuilder\n2. XmlWriter class\n3. C# object with serialization???\nWhich one should I use. Is there any other ways th... |
I'm not asking about specific implementations, I'm not asking about the global world view of cross site single sign on mechanisms, I just want to know what the community thinks about the underlying usability of OpenID. Do you think using a URL issued by a (to the non-technical observer) random assortment of providers i... | The usability of OpenID has been a topic of discussion within the community, especially considering the non-technical users who might find it confusing. Here are some general thoughts on its usability:
1. **Complexity of URLs**: Using a URL as a user identifier can be intimidating for non-technical users. For many, a ... | 28,329 | [
{
"from": "human",
"value": "I'm not asking about specific implementations, I'm not asking about the global world view of cross site single sign on mechanisms, I just want to know what the community thinks about the underlying usability of OpenID. Do you think using a URL issued by a (to the non-technical o... |
What is the difference between UTF and UCS.
What are the best ways to represent not European character sets (using UTF) in C++ strings. I would like to know your recommendations for:
Internal representation inside the code
For string manipulation at run-time
For using the string for display purposes.
Best storage r... | ### Difference Between UTF and UCS
**UCS (Universal Character Set):**
- UCS is a standard for character encoding, developed by the International Organization for Standardization (ISO). It defines a unique number (code point) for every character in its repertoire, regardless of how that character is encoded.
- UCS can... | 24,227 | [
{
"from": "human",
"value": "What is the difference between UTF and UCS.\nWhat are the best ways to represent not European character sets (using UTF) in C++ strings. I would like to know your recommendations for:\n\nInternal representation inside the code\n\n\nFor string manipulation at run-time\nFor using ... |
Just when I make friends with LINQ to SQL, it appears as though MS is pulling the rug out from under it.
http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx
From my little bit of research, EF is way overkill for simple work. But after this announcement is there a poi... | It's understandable to feel unsettled about Microsoft's approach to LINQ to SQL, especially with the emphasis they placed on Entity Framework (EF) in their roadmap announcements. Here are some points to consider regarding your concerns:
1. **Future of LINQ to SQL**: While Microsoft expressed a strong focus on Entity F... | 26,469 | [
{
"from": "human",
"value": "Just when I make friends with LINQ to SQL, it appears as though MS is pulling the rug out from under it. \nhttp://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx\nFrom my little bit of research, EF is way overkill for simple work.... |
We have just 'migrated' an SQL Server 2005 database from DEVEL into TEST. Somehow during the migration process the DB was changed from case insensitive to sensitive - so most SQL queries broke spectacularly.
What I would like to know, is - are there any clear benefits to having a case sensitive schema?
NOTE: By this... | When considering the use of case-sensitive schemas in SQL Server or any relational database system, there are both pros and cons. Here are some clear benefits of using a case-sensitive schema:
### Benefits of Case-Sensitivity
1. **Greater Flexibility in Naming Conventions:**
- Case-sensitive schemas allow for more... | 25,204 | [
{
"from": "human",
"value": "We have just 'migrated' an SQL Server 2005 database from DEVEL into TEST. Somehow during the migration process the DB was changed from case insensitive to sensitive - so most SQL queries broke spectacularly.\nWhat I would like to know, is - are there any clear benefits to havin... |
I need to do a date comparison in Mysql without taking into account the time component i.e. i need to convert '2008-11-05 14:30:00' to '2008-11-05'
Currently i am doing this:
SELECT from_days(to_days(my_date))
Is there a proper way of doing this?
| Yes, there is a more straightforward way to compare dates in MySQL without considering the time component. You can use the `DATE()` function to extract just the date part from a datetime value.
Here's how you can do it:
```sql
SELECT DATE(my_date) AS date_only
FROM your_table
WHERE DATE(my_date) = '2008-11-05';
```
... | 31,674 | [
{
"from": "human",
"value": "I need to do a date comparison in Mysql without taking into account the time component i.e. i need to convert '2008-11-05 14:30:00' to '2008-11-05'\nCurrently i am doing this:\nSELECT from_days(to_days(my_date))\n\nIs there a proper way of doing this?\n"
},
{
"from": "gp... |
I have a PHP script that initialises an image gallery. It loops through all images, checks if they are thumbnailed and watermarks them.
My shared hosting account only lets me have 30 seconds of execution per script, as set in the php.ini settings. I can't change that.
What can I do to get round this? Currently I refres... | You are running into a common issue with shared hosting environments where long-running scripts may time out. Since you are already splitting your processing into chunks of 5 images, there are several strategies you can use to improve the user experience while still working within the 30-second execution limit.
### So... | 22,258 | [
{
"from": "human",
"value": "I have a PHP script that initialises an image gallery. It loops through all images, checks if they are thumbnailed and watermarks them.\nMy shared hosting account only lets me have 30 seconds of execution per script, as set in the php.ini settings. I can't change that.\nWhat can... |
I'm working with a combobox in a Swing-based application, and I'm having a hard time figuring out what to do to differentiate between an ItemEvent that is generated from a user event vs one caused by the application.
For instance, Lets say I have a combobox, 'combo' and I'm listening for itemStateChanged events with m... | In Swing, distinguishing between an `ItemEvent` that is generated by user interaction versus one that is caused programmatically (like calling `comboBox.setSelectedIndex()`) can be a bit tricky, as both actions will trigger the same events.
One common approach to differentiate between these two types of events is to i... | 25,259 | [
{
"from": "human",
"value": "I'm working with a combobox in a Swing-based application, and I'm having a hard time figuring out what to do to differentiate between an ItemEvent that is generated from a user event vs one caused by the application. \nFor instance, Lets say I have a combobox, 'combo' and I'm li... |
I have a select query that currently produces the following results:
Description Code Price
Product 1 A 5
Product 1 B 4
Product 1 C 2
Using the following query:
SELECT DISTINCT np.Description, p.promotionalCode, p.Price
FROM Price AS p INNER JOIN
... | To achieve the desired output where you transform rows into columns (a pivot table format), you can use the `PIVOT` function if your SQL database supports it. However, since the exact syntax can vary depending on the SQL database you are using (such as SQL Server, Oracle, MySQL, PostgreSQL, etc.), I'll provide a soluti... | 27,820 | [
{
"from": "human",
"value": "I have a select query that currently produces the following results:\n\nDescription Code Price\n Product 1 A 5\n Product 1 B 4\n Product 1 C 2\n\nUsing the following query: \nSELECT DISTINCT np.Description, p.promotionalCode, p.Price\nFROM ... |
I'm just learning Ruby on Rails. I've read a few books, I've watched lots of Railscasts, I've looked at some examples.
However, when working on my first serious project with Rails, I've gotten hung up on how to properly implement some very basic web site features that most tutorials I've seen lack.
For instance: Navig... | It's great to hear that you're diving into Ruby on Rails! Your questions about dynamic navigation, the MVC architecture, and accessing multiple models in a controller are very common among those new to Rails. Let's address these step by step.
### Dynamic Navigation Menus
To create a dynamic navigation menu in Rails, ... | 23,133 | [
{
"from": "human",
"value": "I'm just learning Ruby on Rails. I've read a few books, I've watched lots of Railscasts, I've looked at some examples. \nHowever, when working on my first serious project with Rails, I've gotten hung up on how to properly implement some very basic web site features that most tut... |
Good afternoon,
This should be an easy one. I've done the cookie-cutter default ASP.NET 2.0 installation, but I have a couple of programming errors in my application.
When I access the webpage on the server itself, I get a detailed ASP error message. However, when i try to run the same thing from a client machine, I ... | Good afternoon, Alan.
To enable detailed error messages to be sent to remote clients in an ASP.NET 2.0 application, you need to modify your web application’s configuration settings in the `web.config` file. By default, detailed error messages are only shown to local requests for security reasons, but you can change th... | 24,044 | [
{
"from": "human",
"value": "Good afternoon,\nThis should be an easy one. I've done the cookie-cutter default ASP.NET 2.0 installation, but I have a couple of programming errors in my application.\nWhen I access the webpage on the server itself, I get a detailed ASP error message. However, when i try to r... |
What is the most accurate way of timing a thread or a line of code in C# assuming the application is multithreaded?
Kind regards,
| In a multithreaded C# application, accurately timing a thread or a line of code can be a bit challenging due to context switching and the overhead associated with threading. However, you can use the `Stopwatch` class from the `System.Diagnostics` namespace, which is designed for high-resolution timing.
Here's how you ... | 26,566 | [
{
"from": "human",
"value": "What is the most accurate way of timing a thread or a line of code in C# assuming the application is multithreaded?\nKind regards,\n"
},
{
"from": "gpt",
"value": "In a multithreaded C# application, accurately timing a thread or a line of code can be a bit challengin... |
I have a situation where I have two entities that share a primary key (Transaction and TransactionDetail). I have them mapped using many-to-one relationship from Transaction to TransactionDetail and from TransactionDetail to Transaction. Transaction detail holds one record for each transaction.
However, when I create ... | The issue you are facing arises from how NHibernate manages the relationships between your entities, particularly with the primary key and its implications for object identity and state management. When you add a new `TransactionDetail` to a `Transaction`, NHibernate believes that it should also update the associated `... | 25,640 | [
{
"from": "human",
"value": "I have a situation where I have two entities that share a primary key (Transaction and TransactionDetail). I have them mapped using many-to-one relationship from Transaction to TransactionDetail and from TransactionDetail to Transaction. Transaction detail holds one record for e... |
I am looking to parse a URL to obtain a collection of the querystring parameters in Java. To be clear, I need to parse a given URL(or string value of a URL object), not the URL from a servlet request.
It looks as if the javax.servlet.http.HttpUtils.parseQueryString method would be the obvious choice, but it has been d... | In Java, the `HttpUtils.parseQueryString` method has indeed been deprecated, but there are several alternatives you can use to parse a URL and extract query parameters without relying on deprecated methods. Here are a few approaches you can consider:
### 1. Using `java.net.URI` and `java.net.URLEncoder`
You can use t... | 26,059 | [
{
"from": "human",
"value": "I am looking to parse a URL to obtain a collection of the querystring parameters in Java. To be clear, I need to parse a given URL(or string value of a URL object), not the URL from a servlet request. \nIt looks as if the javax.servlet.http.HttpUtils.parseQueryString method woul... |
I have this function in my Javascript Code that updates html fields with their new values whenever it is called. The problem cannot be with the function itself because it works brilliantly in every section except for one. Here is the JS function:
function updateFields() {
document.getElementById('bf').innerHTML... | It sounds like the issue you're experiencing with the `updateFields` function might be related to how the `bill.cost` variable is being updated in relation to the `bill.pointPartOfWeek`. Since the cost is updating but not reflected in the HTML, it may be a timing issue with the order of operations in the second `select... | 26,290 | [
{
"from": "human",
"value": "I have this function in my Javascript Code that updates html fields with their new values whenever it is called. The problem cannot be with the function itself because it works brilliantly in every section except for one. Here is the JS function:\n function updateFields() {\n... |
As already discussed in "Lua as a general-purpose scripting language?" Lua currently probably isn't the best scripting language for the desktop environment.
But what do you think about the future? Will Lua get so popular that there will soon be enough libraries to be able to use it like Python, Ruby or something simila... | Lua has established itself as a powerful and efficient scripting language, particularly in niche applications like game development (notably in games like World of Warcraft), embedded systems, and for use in applications like Nginx and VLC. However, its popularity in the broader desktop scripting landscape, compared to... | 29,026 | [
{
"from": "human",
"value": "As already discussed in \"Lua as a general-purpose scripting language?\" Lua currently probably isn't the best scripting language for the desktop environment.\nBut what do you think about the future? Will Lua get so popular that there will soon be enough libraries to be able to ... |
Is there a way to dump an entire assemblies source to files using reflector?
| Yes, you can use **ILSpy** or **dotPeek** as alternatives to **Reflector** for decompiling .NET assemblies and exporting the source code to files. While Reflector is a popular tool, it has become a paid product, and there are free options that may suit your needs better.
### Using ILSpy:
1. **Download ILSpy**: You ca... | 28,476 | [
{
"from": "human",
"value": "Is there a way to dump an entire assemblies source to files using reflector?\n"
},
{
"from": "gpt",
"value": "Yes, you can use **ILSpy** or **dotPeek** as alternatives to **Reflector** for decompiling .NET assemblies and exporting the source code to files. While Refl... |
Is enterprise library for exception handling and logging efficient in terms of its memory usage for the functionality provided?
What are the pros and cons?
Thanks
| Enterprise Library, developed by Microsoft, is a collection of reusable software components designed to assist developers with common enterprise development challenges. Among its various application blocks, the Exception Handling Application Block and the Logging Application Block are two key components used for error ... | 28,131 | [
{
"from": "human",
"value": "Is enterprise library for exception handling and logging efficient in terms of its memory usage for the functionality provided?\nWhat are the pros and cons?\nThanks \n"
},
{
"from": "gpt",
"value": "Enterprise Library, developed by Microsoft, is a collection of reusa... |
I have a set of templates for emails that my app sends out. The templates have codes embedded in them that correspond to properties of my business object.
Is there a more elegant way than calling
string.Replace("{!MyProperty!}", item.MyProperty.ToString())
a zillion times? Maybe XMLTransform, regular expressions, o... | Yes, you can certainly make your template replacement process more elegant and efficient in C#. Instead of calling `string.Replace` multiple times, you can use a regular expression to perform all replacements in a single pass. This way, you can avoid repetitive code and make your templates easier to manage. Here’s how ... | 24,774 | [
{
"from": "human",
"value": "I have a set of templates for emails that my app sends out. The templates have codes embedded in them that correspond to properties of my business object. \nIs there a more elegant way than calling \nstring.Replace(\"{!MyProperty!}\", item.MyProperty.ToString()) \n\na zillion ti... |
i am planning to use 2 dedicated root servers rented at a hosting provider. those machines will run tomcat 6 in a cluster.
if i will add additional machines later on - it is unlikely that they will be accessible with multicast, because they will be located in different subnets.
is it possible to run tomcat without mult... | Yes, it is possible to run Tomcat clustering without multicast, especially if you're dealing with different subnets. While the default configuration in Tomcat clustering (specifically the `SimpleTcpCluster`) relies on multicast for communication between nodes, you can use alternatives that allow for unicast communicati... | 27,607 | [
{
"from": "human",
"value": "i am planning to use 2 dedicated root servers rented at a hosting provider. those machines will run tomcat 6 in a cluster.\nif i will add additional machines later on - it is unlikely that they will be accessible with multicast, because they will be located in different subnets.... |
I have a website in which I provide tool-tips for certain things using a hidden <span> tag and JavaScript to track various mouse events. It works excellently. This site somewhat caters towards people with vision issues, so I try to make things degrade as well as possible if there is no JavaScript or CSS and generally I... | It's great to hear that you're considering accessibility for users with vision issues! To achieve the functionality where the tooltips only appear when CSS is enabled, you can utilize a combination of HTML and CSS, specifically leveraging the `noscript` tag and some clever CSS techniques.
### Approach Using CSS
1. **... | 27,503 | [
{
"from": "human",
"value": "I have a website in which I provide tool-tips for certain things using a hidden <span> tag and JavaScript to track various mouse events. It works excellently. This site somewhat caters towards people with vision issues, so I try to make things degrade as well as possible if ther... |
I'm trying to use Exchange Web Services to update a calendar item. I'm creating an ItemChangeType, and then an ItemIdType. I have a unique ID to use for ItemIdType.Id, but I have nothing to use for the ChangeKey. When I leave it out, I get an ErrorChangeKeyRequiredForWriteOperations. But when i try to just put some... | When working with Exchange Web Services (EWS) to update a calendar item, you are correct that both the `ItemId` and the `ChangeKey` are required to perform a write operation (like updating an item). The `ChangeKey` is essential for EWS to ensure you are updating the correct version of the item, as it represents the spe... | 26,736 | [
{
"from": "human",
"value": "I'm trying to use Exchange Web Services to update a calendar item. I'm creating an ItemChangeType, and then an ItemIdType. I have a unique ID to use for ItemIdType.Id, but I have nothing to use for the ChangeKey. When I leave it out, I get an ErrorChangeKeyRequiredForWriteOpe... |
I've got an old classic ASP site that connects to a local sql server 2000 instance. We're moving the db to a new box, and the port is non standard for sql (out of my control). .NET connection strings handle the port number fine by adding it with ,1999 after the server name/IP. The classic ASP connection string isn't wo... | When using classic ASP with an ODBC connection to SQL Server, specifying a non-standard port requires a slightly different approach. The syntax used in .NET connection strings isn't directly applicable in classic ASP with the ODBC driver.
In your case, you can specify the port by including it in the `Server` field. He... | 27,908 | [
{
"from": "human",
"value": "I've got an old classic ASP site that connects to a local sql server 2000 instance. We're moving the db to a new box, and the port is non standard for sql (out of my control). .NET connection strings handle the port number fine by adding it with ,1999 after the server name/IP. T... |
If we develop a winform app using an MVC architecture, it should not be too hard to change over to WPF at a later date, correct?
| Developing a WinForms application using an MVC (Model-View-Controller) architecture can indeed make it easier to transition to WPF (Windows Presentation Foundation) later, but there are several factors to consider:
### Advantages of Using MVC
1. **Separation of Concerns**: MVC promotes separation of concerns, which m... | 28,616 | [
{
"from": "human",
"value": "If we develop a winform app using an MVC architecture, it should not be too hard to change over to WPF at a later date, correct? \n"
},
{
"from": "gpt",
"value": "Developing a WinForms application using an MVC (Model-View-Controller) architecture can indeed make it ... |
Okay still fighting with doing some SqlCacheDependecy in my Asp.net MVC application
I got this piece of code from Microsoft to cache LINQtoSQL, basically what it does is it gets the SqlCommand text from the LINQ query and executes that via the System.Data.SqlClient.SqlCommand which SqlDependecy needs...
However there i... | When using SQL caching with `SqlCacheDependency` in an ASP.NET MVC application and LINQ to SQL, the challenge you're facing stems from how parameterized queries work. The `@p0` syntax indicates that a parameter is being used, and your concern is valid since `SqlCacheDependency` expects a raw SQL command to monitor chan... | 27,335 | [
{
"from": "human",
"value": "Okay still fighting with doing some SqlCacheDependecy in my Asp.net MVC application\nI got this piece of code from Microsoft to cache LINQtoSQL, basically what it does is it gets the SqlCommand text from the LINQ query and executes that via the System.Data.SqlClient.SqlCommand w... |
When using grep --color=always I can get pretty color highlighting for regex matches.
However, grep only returns lines with at least one match. Instead, I am looking for a way to simply highlight regex matches, while leaving all other input alone, without dropping lines without any matches.
I have tried to get color w... | Your approach using `sed` is a valid one, and it effectively highlights matches without dropping any lines. However, if you're looking for a more straightforward solution, there are a couple of alternatives you might consider.
### 1. Using `awk`
You can achieve similar results using `awk`, which might be simpler and ... | 28,571 | [
{
"from": "human",
"value": "When using grep --color=always I can get pretty color highlighting for regex matches.\nHowever, grep only returns lines with at least one match. Instead, I am looking for a way to simply highlight regex matches, while leaving all other input alone, without dropping lines withou... |
Sharepoint isn't the speediest of server applications, and I've read about a few tips to speed it up. What steps do you think are necessary to increase performance so it can be used to host a high traffic site?
| Improving the performance of SharePoint for high traffic sites involves several strategies that focus on optimizing infrastructure, configuration, and user experience. Here are key steps you can take to enhance SharePoint performance:
### Infrastructure Optimization
1. **Server Resources**:
- **Upgrade Hardware**:... | 26,734 | [
{
"from": "human",
"value": "Sharepoint isn't the speediest of server applications, and I've read about a few tips to speed it up. What steps do you think are necessary to increase performance so it can be used to host a high traffic site?\n"
},
{
"from": "gpt",
"value": "Improving the performan... |
What is the best MemCache solution for ASP.NET applications running in a windows server environment? Why?
| When considering a caching solution for ASP.NET applications running in a Windows Server environment, **Microsoft's AppFabric Caching** or **Redis Cache** are two popular options, but Redis is often regarded as the best choice for several reasons.
### 1. **Redis Cache**
**Advantages:**
- **Performance**: Redis is an... | 27,826 | [
{
"from": "human",
"value": "What is the best MemCache solution for ASP.NET applications running in a windows server environment? Why?\n"
},
{
"from": "gpt",
"value": "When considering a caching solution for ASP.NET applications running in a Windows Server environment, **Microsoft's AppFabric Ca... |
In Java, is there an elegant way to detect if an exception occurred prior to running the finally block? When dealing with "close()" statements, it's common to need exception handling within the finally block. Ideally, we'd want to maintain both exceptions and propagate them up (as both of them may contain useful inform... | In Java, exception handling in the context of `try`, `catch`, and `finally` blocks can indeed become quite cumbersome, especially when you want to manage multiple exceptions gracefully. The approach you've outlined, using a variable outside the try-catch-finally scope to hold the first exception, is one of the common m... | 26,527 | [
{
"from": "human",
"value": "In Java, is there an elegant way to detect if an exception occurred prior to running the finally block? When dealing with \"close()\" statements, it's common to need exception handling within the finally block. Ideally, we'd want to maintain both exceptions and propagate them up... |
Is there a quick tcpdump one-liner to print out a TCP stream that matches a particular substring -- or, if that's not easy, how about printing out just the single TCP packet that matches the substring?
| You can use `tcpdump` combined with `grep` to filter for TCP packets containing a specific substring. However, note that `tcpdump` captures packets in binary format, so simply using `grep` on its output may not yield the desired results directly for string matching.
If you want to capture TCP packets and then filter t... | 30,020 | [
{
"from": "human",
"value": "Is there a quick tcpdump one-liner to print out a TCP stream that matches a particular substring -- or, if that's not easy, how about printing out just the single TCP packet that matches the substring?\n"
},
{
"from": "gpt",
"value": "You can use `tcpdump` combined w... |
Is there any good software that will allow me to search through my SVN respository for code snippets? I found 'FishEye' but the cost is 1,200 and well outside my budget.
| If you're looking for alternatives to FishEye for searching through your SVN repository, here are some options that might fit your needs and budget:
1. **Open Source Tools**:
- **SVNRepository**: A web-based solution that can help you browse and search through SVN repositories.
- **Trac**: Primarily a project ma... | 29,626 | [
{
"from": "human",
"value": "Is there any good software that will allow me to search through my SVN respository for code snippets? I found 'FishEye' but the cost is 1,200 and well outside my budget.\n"
},
{
"from": "gpt",
"value": "If you're looking for alternatives to FishEye for searching thr... |
I was taking a look through some open-source C++ code and I noticed a lot of double underscores used within in the code, mainly at the start of variable names.
return __CYGWIN__;
Just wondering: Is there a reason for this, or is it just some people's code styles? I would think that it makes it hard to read.
| The use of double underscores (`__`) at the beginning of variable names in C++ (and other programming languages) typically has specific implications related to naming conventions and language standards. Here are the main reasons why you might see double underscores in the code:
1. **Reserved Identifiers**: According t... | 28,972 | [
{
"from": "human",
"value": "I was taking a look through some open-source C++ code and I noticed a lot of double underscores used within in the code, mainly at the start of variable names.\nreturn __CYGWIN__;\n\nJust wondering: Is there a reason for this, or is it just some people's code styles? I would th... |
In a C++ project (i.e. no .NET) on Windows Mobile, I am looking for a way to easily communicate between two independently running applications. Application A would run a service, whereas application B would provide the user some functionality - for which B has to call some of A's functions. I would rather not go throug... | What you are looking to implement is essentially a form of direct inter-process communication (IPC) on Windows Mobile without using traditional IPC mechanisms like sockets or files. Given your constraints, there are a few potential approaches you could consider, each with its trade-offs.
### 1. **Shared Memory:**
Y... | 25,086 | [
{
"from": "human",
"value": "In a C++ project (i.e. no .NET) on Windows Mobile, I am looking for a way to easily communicate between two independently running applications. Application A would run a service, whereas application B would provide the user some functionality - for which B has to call some of A'... |
I have a script to extract certain data from a much bigger table, with one field in particular changing regularly, e.g.
SELECT CASE @Flag WHEN 1 THEN t.field1 WHEN 2 THEN t.field2 WHEN 3
THEN t.field3 END as field,
...[A bunch of other fields]
FROM table t
However, the issue is now I want to do other pr... | Your problem boils down to needing to efficiently select and process data based on the value of a flag, while avoiding unnecessary complexity and performance issues. Below are several approaches you can consider, given your requirements:
### 1. Use Common Table Expressions (CTEs)
Instead of relying on temporary tables... | 26,356 | [
{
"from": "human",
"value": "I have a script to extract certain data from a much bigger table, with one field in particular changing regularly, e.g.\nSELECT CASE @Flag WHEN 1 THEN t.field1 WHEN 2 THEN t.field2 WHEN 3 \n THEN t.field3 END as field,\n ...[A bunch of other fields]\nFROM table t\n\n... |
How can I distribute a standalone Python application in Linux?
I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPython, scipy, python cryptographic toolkit, reportlab, and... | Distributing a standalone Python application on Linux can indeed be a bit tricky, especially when dealing with external libraries. While tools like `py2exe` are specific to Windows, there are several alternatives for Linux that can help you package your application along with its dependencies. Here are some popular opt... | 26,594 | [
{
"from": "human",
"value": "How can I distribute a standalone Python application in Linux?\nI think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPython, scipy, py... |
I have a medium size Java file. Everytime I make a change to one of my files, BuildTable.java, Git reports it as a massive change, even if is only a line or two. BuildTable.java is about 200 lines and the change in this commit only changed a single line.
git-diff ouputs this:
--- a/src/BuildTable.java
+++ b/src/BuildTa... | The issue you're encountering where Git reports a significant number of changes for a file (like `BuildTable.java`) despite only minor modifications is likely related to line ending differences between operating systems. It seems that your file may have mixed line endings (e.g., CRLF for Windows and LF for Unix/Linux),... | 25,450 | [
{
"from": "human",
"value": "I have a medium size Java file. Everytime I make a change to one of my files, BuildTable.java, Git reports it as a massive change, even if is only a line or two. BuildTable.java is about 200 lines and the change in this commit only changed a single line.\ngit-diff ouputs this:\n... |
I am displaying a texture that I want to manipulate without out affecting the image data. I want to be able to clamp the texel values so that anything below the lower value becomes 0, anything above the upper value becomes 0, and anything between is linearly mapped from 0 to 1.
Originally, to display my image I was us... | Given your constraints with the Intel 945G integrated graphics, you're limited to OpenGL 1.4, which means you won't have access to modern features like fragment shaders or advanced texture operations. However, you can still achieve the desired result using the fixed-function pipeline and texture manipulation techniques... | 23,569 | [
{
"from": "human",
"value": "I am displaying a texture that I want to manipulate without out affecting the image data. I want to be able to clamp the texel values so that anything below the lower value becomes 0, anything above the upper value becomes 0, and anything between is linearly mapped from 0 to 1. ... |
Can I somehow disable spell-checking on HTML textfields (as seen in e.g. Safari)?
| Yes, you can disable spell-checking in HTML text fields by using the `spellcheck` attribute. This attribute can be set to either `true` or `false`. If you want to disable spell-checking, you should set it to `false`.
Here's how to do it in different HTML elements:
1. **For `<input>` fields:**
```html
<input type="te... | 31,318 | [
{
"from": "human",
"value": "Can I somehow disable spell-checking on HTML textfields (as seen in e.g. Safari)?\n"
},
{
"from": "gpt",
"value": "Yes, you can disable spell-checking in HTML text fields by using the `spellcheck` attribute. This attribute can be set to either `true` or `false`. If y... |
My situation: I have several components, which sometimes have changes to them, and are shared across a lot of different projects. Each project puts these in a subfolder called /depends. The depends holds a bunch of svn externals for all of our common components.
svn:externals is causing me a lot of time and pain.
S... | Given the challenges you're facing with `svn:externals`, it sounds like you need a more flexible system for managing shared components across multiple projects. Here are several alternatives and strategies that could help improve your workflow:
### 1. **Monorepo Approach**
- Consider consolidating your projects into a... | 26,264 | [
{
"from": "human",
"value": "My situation: I have several components, which sometimes have changes to them, and are shared across a lot of different projects. Each project puts these in a subfolder called /depends. The depends holds a bunch of svn externals for all of our common components.\nsvn:external... |
I have a dependency that I need to inject into one of my classes. This dependency will be lifestyle of Transient. It in-turn has a dependency of type Type. This type should be the type of the original class. I was just wondering if anyone has any idea how I might go about conducting this registration.
See example:
publ... | To achieve the desired dependency injection configuration where the `Register` class receives the type of the original class (in this case, `Customer`) dynamically, you can use a factory method in your dependency injection (DI) container setup. Below is an example using a common DI container such as Microsoft.Extension... | 26,857 | [
{
"from": "human",
"value": "I have a dependency that I need to inject into one of my classes. This dependency will be lifestyle of Transient. It in-turn has a dependency of type Type. This type should be the type of the original class. I was just wondering if anyone has any idea how I might go about conduc... |
I'm searching a wsgi middleware which I can warp around a wsgi applications and which lets me monitor incoming and outgoing http requests and header fields.
Something like firefox live headers, but for the server side.
| To monitor incoming and outgoing HTTP requests and header fields in a WSGI application, you can create a custom WSGI middleware. However, there are also existing middleware options that may suit your needs. Below are some suggestions, including how to create a simple custom WSGI middleware:
### Custom WSGI Middleware
... | 22,942 | [
{
"from": "human",
"value": "I'm searching a wsgi middleware which I can warp around a wsgi applications and which lets me monitor incoming and outgoing http requests and header fields.\nSomething like firefox live headers, but for the server side.\n"
},
{
"from": "gpt",
"value": "To monitor inc... |
I've been working on database-driven web applications for a few years now and recently took on a project involving a CMS that is XML-capable. This has led me to think about the usage of XML/XSLT in general and in what situations it would be more useful than the approach I've always used, which is storing all of my data... | Absolutely! While SQL databases are powerful and widely used for many applications, there are specific scenarios where XML (and related technologies like XSLT) can be advantageous. Here are some use cases and situations where XML might be preferable:
### 1. **Configuration Files**:
- **Scenario**: Applications that re... | 26,520 | [
{
"from": "human",
"value": "I've been working on database-driven web applications for a few years now and recently took on a project involving a CMS that is XML-capable. This has led me to think about the usage of XML/XSLT in general and in what situations it would be more useful than the approach I've alw... |
I have a great deal of data to keep synchronized over 4 or 5 sites around the world, around half a terabyte at each site. This changes (either adds or changes) by around 1.4 Gigabytes per day, and the data can change at any of the four sites.
A large percentage (30%) of the data is duplicate packages (Perhaps packaged-... | For your requirements of synchronizing around half a terabyte of data across multiple sites with significant daily changes, there are several open-source solutions that can offer more intelligent and efficient synchronization than `rsync`. Here are some options to consider:
1. **Syncthing**:
- **Description**: Sync... | 23,401 | [
{
"from": "human",
"value": "I have a great deal of data to keep synchronized over 4 or 5 sites around the world, around half a terabyte at each site. This changes (either adds or changes) by around 1.4 Gigabytes per day, and the data can change at any of the four sites.\nA large percentage (30%) of the dat... |
I have a scrolling LED sign that takes messages in either ASCII or (using some specific code) characters from a custom code page.
For example, the euro sign should be sent as
<U00>
and ä is
<U64>
(You can find the full code page in the documentation)
My question is, what is the most pythonic way to implement this cus... | To implement a custom codec in Python for converting UTF-8 strings to your specific code page, you can follow these steps:
1. **Define the custom code page**: Create a dictionary that maps characters to their respective codes.
2. **Implement a conversion function**: Create a function that takes a UTF-8 string and conv... | 24,591 | [
{
"from": "human",
"value": "I have a scrolling LED sign that takes messages in either ASCII or (using some specific code) characters from a custom code page.\nFor example, the euro sign should be sent as\n<U00>\n\nand ä is\n<U64>\n\n(You can find the full code page in the documentation)\nMy question is, wh... |
I have 4 databases with similar schema's, and I'm trying to create a query to return just the table, column pairs that exist ONLY in database 1 and do not exist in database 2, 3, or 4.
Currently I can return the symmetric difference between database 1 and 2 via the following query...
select table_name, column_name from... | To retrieve the table and column pairs that exist only in Database 1 and not in Database 2, Database 3, or Database 4, you can use a query that combines `LEFT JOIN` and `WHERE` clauses to check for the absence of the corresponding entries in the other databases.
Here’s a SQL query that accomplishes this:
```sql
SELEC... | 29,640 | [
{
"from": "human",
"value": "I have 4 databases with similar schema's, and I'm trying to create a query to return just the table, column pairs that exist ONLY in database 1 and do not exist in database 2, 3, or 4.\nCurrently I can return the symmetric difference between database 1 and 2 via the following qu... |
I'm doing something like the following:
SELECT * FROM table WHERE user='$user';
$myrow = fetchRow() // previously I inserted a pass to the db using base64_encode ex: WRM2gt3R=
$somepass = base64_encode($_POST['password']);
if($myrow[1] != $somepass) echo 'error';
else echo 'welcome';
Im always getting error, I even ... | It looks like you're facing an issue with comparing two base64 encoded values in your code. Even if you think they are the same when you echo them, there are a few things to consider:
1. **Spaces or Hidden Characters**: When you're using `base64_encode()`, any extra spaces or hidden characters can cause the values to ... | 26,172 | [
{
"from": "human",
"value": "I'm doing something like the following:\nSELECT * FROM table WHERE user='$user';\n$myrow = fetchRow() // previously I inserted a pass to the db using base64_encode ex: WRM2gt3R=\n\n$somepass = base64_encode($_POST['password']);\n\nif($myrow[1] != $somepass) echo 'error';\nelse e... |
This concept is new to me, and a colleague suggested it. Sadly, I had no idea what he was talking about. Can someone enlighten me?
| Of course! I'd be happy to help. However, I'll need a bit more information about the specific concept you are referring to. Can you provide any details or context about what your colleague mentioned? This will allow me to give you a clearer explanation. | 33,215 | [
{
"from": "human",
"value": "This concept is new to me, and a colleague suggested it. Sadly, I had no idea what he was talking about. Can someone enlighten me?\n"
},
{
"from": "gpt",
"value": "Of course! I'd be happy to help. However, I'll need a bit more information about the specific concept y... |
We have a situation where a C# application is working with SQL CE 3.5 . To allow for a legacy program to use some of its features we have produced a C++ dll which uses interop to extract the info that it needs from the C# program. For this to work, the C#-program needs to access the database. Its not a very complex sce... | The issue you're facing stems from the way .NET handles providers and their configuration. Since your C# application needs an App.config to find the SQL CE provider, and your C++ application doesn't support this mechanism, you'll have to find a workaround. Here are a few possible solutions to consider:
### 1. **Using ... | 26,996 | [
{
"from": "human",
"value": "We have a situation where a C# application is working with SQL CE 3.5 . To allow for a legacy program to use some of its features we have produced a C++ dll which uses interop to extract the info that it needs from the C# program. For this to work, the C#-program needs to access... |
I want to create a javascript badge that displays a list of links. We host the javascript on our domain. Other sites can put an empty div tag on their page and at the bottom a reference to our javascript that would render the content in the div tag. How do you implement something like this?
| To create a JavaScript badge that displays a list of links, you can follow these steps. The idea is to host a JavaScript file on your server that dynamically generates the badge within a specified `<div>` on other websites.
### Step 1: Create Your JavaScript File
First, create a JavaScript file (e.g., `badge.js`) and... | 25,582 | [
{
"from": "human",
"value": "I want to create a javascript badge that displays a list of links. We host the javascript on our domain. Other sites can put an empty div tag on their page and at the bottom a reference to our javascript that would render the content in the div tag. How do you implement someth... |
I have nant set up to build my ASP.NET MVC project and it works fine locally. I add nant to a tools folder and add it to version control. TeamCity picks up my changes and starts the build but it fails.
I believe I'm using the latest version of Nant and I have added the .net framework 3.5 to the nant.exe.config. What... | The error message you're seeing indicates that Nant is trying to use the .NET Framework 2.0 SDK, but it can't find the property `sdkInstallRoot`, which points to the SDK installation directory. This is typically caused by either a misconfiguration in your Nant setup or the environment on the server not being fully set ... | 26,083 | [
{
"from": "human",
"value": "I have nant set up to build my ASP.NET MVC project and it works fine locally. I add nant to a tools folder and add it to version control. TeamCity picks up my changes and starts the build but it fails.\nI believe I'm using the latest version of Nant and I have added the .net f... |
I have Eclipse 3.3.2 with PDT doing PHP development.
All projects that I create, even SVN projects have code completion.
Now I just opened another SVN project and it has no code completion or PHP templates (CTRL-space does nothing in that project).
However, I can open the other projects and code completion all work in ... | In Eclipse with the PHP Development Tools (PDT), if you are experiencing issues with code completion and templates being "off" for a specific project, there are several steps you can take to troubleshoot and potentially resolve the issue:
1. **Check Project Settings**: Make sure that the project is correctly configure... | 25,934 | [
{
"from": "human",
"value": "I have Eclipse 3.3.2 with PDT doing PHP development.\nAll projects that I create, even SVN projects have code completion.\nNow I just opened another SVN project and it has no code completion or PHP templates (CTRL-space does nothing in that project).\nHowever, I can open the oth... |
I made a custom ValueObject class with properties (getters/setters) and I need this class for data binding of elements on form. So I want to drag it to "other components" on matisse editor so I can bind it - and nothing happens.... Any similar experiences? The same issue is happening both on NetBeans 6.5 and MyEclipse ... | It sounds like you're facing an issue with integrating your custom `ValueObject` class in the Matisse GUI builder for NetBeans and MyEclipse. Here are a few steps and considerations that might help you troubleshoot this issue:
1. **Ensure the Class is Serializable**: For custom components to be recognized in the GUI b... | 28,165 | [
{
"from": "human",
"value": "I made a custom ValueObject class with properties (getters/setters) and I need this class for data binding of elements on form. So I want to drag it to \"other components\" on matisse editor so I can bind it - and nothing happens.... Any similar experiences? The same issue is ha... |
On Windows Server, by default, external USB disks don't always get mounted. I'd like my program (written in C#) to be able to detect external USB disks, identify them, and then mount them.
When it's finished, it should do whatever the programmatic equivalent of "Safely Remove Hardware" in order to flush and unmount the... | To achieve the functionality of detecting, mounting, and safely removing external USB disks in C#, you'll need to make use of Windows Management Instrumentation (WMI), as well as the Windows API for mounting and unmounting volumes. Here's a guide on how you can implement this:
### Detecting External USB Disks
You can... | 24,035 | [
{
"from": "human",
"value": "On Windows Server, by default, external USB disks don't always get mounted. I'd like my program (written in C#) to be able to detect external USB disks, identify them, and then mount them.\nWhen it's finished, it should do whatever the programmatic equivalent of \"Safely Remove ... |
We have a Procedure in Oracle with a SYS_REFCURSOR output parameter that returns the data we want to bind to an ASP.NET GridView control. I've seen this done before but I can't find the original reference I used to solve the problem.
Here is what the procedure looks like:
create or replace PROCEDURE GETSOMEDATA
(
P... | To bind the results from your Oracle stored procedure with a SYS_REFCURSOR to an ASP.NET GridView, you can follow these steps. Below is an example of how to implement this in your ASP.NET application, assuming you have Oracle's ODP.NET provider set up.
### Step 1: Reference Oracle Data Provider
Make sure you have the... | 23,927 | [
{
"from": "human",
"value": "We have a Procedure in Oracle with a SYS_REFCURSOR output parameter that returns the data we want to bind to an ASP.NET GridView control. I've seen this done before but I can't find the original reference I used to solve the problem.\nHere is what the procedure looks like:\ncrea... |
.NET throws an exception trying to parse a datetime string in this format:
Fri, 10 Oct 2008 00:05:51 CST
Convert.ToDateTime("Fri, 10 Oct 2008 00:05:51 CST") results in an exception:
The string was not recognized as a
valid DateTime. There is a unknown
word starting at index 26
Character 26 obviously being the st... | The issue you're encountering when trying to parse the datetime string `"Fri, 10 Oct 2008 00:05:51 CST"` using `Convert.ToDateTime` in .NET is due to the way .NET handles the parsing of date and time strings, particularly when it comes to timezone abbreviations.
### Explanation
In .NET, the `Convert.ToDateTime` metho... | 26,620 | [
{
"from": "human",
"value": ".NET throws an exception trying to parse a datetime string in this format:\nFri, 10 Oct 2008 00:05:51 CST \nConvert.ToDateTime(\"Fri, 10 Oct 2008 00:05:51 CST\") results in an exception:\n\nThe string was not recognized as a\n valid DateTime. There is a unknown\n word starting... |
I have a search box that doesn't have a submit button, I need to be able to hit enter and then execute a method, how do I do this?
| To execute a method when the Enter key is pressed in a search box without a submit button, you can listen for the "keydown" event on the input field and check if the pressed key is the Enter key. If it is, you can call the desired method. Here's an example using plain JavaScript:
### HTML
```html
<input type="text" id... | 23,812 | [
{
"from": "human",
"value": "I have a search box that doesn't have a submit button, I need to be able to hit enter and then execute a method, how do I do this?\n"
},
{
"from": "gpt",
"value": "To execute a method when the Enter key is pressed in a search box without a submit button, you can list... |
What is the difference between these three heavily related fields? Is there one specific whole they are all a part of (aside from CS)?
| The three fields you're likely referring to are **artificial intelligence (AI)**, **machine learning (ML)**, and **deep learning (DL)**. While they are closely related and often overlap, they represent different concepts within the broader context of computer science and data processing. Here's a breakdown of each:
1.... | 25,955 | [
{
"from": "human",
"value": "What is the difference between these three heavily related fields? Is there one specific whole they are all a part of (aside from CS)?\n"
},
{
"from": "gpt",
"value": "The three fields you're likely referring to are **artificial intelligence (AI)**, **machine learnin... |
I use BIRT since early days and still have riddles regarding PDF emitter.
Short story:
Can I configure fontsConfig.xml to load fonts from relative path or from jars?
Long story:
We are using both FOP and BIRT for generating PDF in our web application. It would be nice to share fonts between libraries. Unfortunately, I... | In BIRT 2.3.1, the `fontsConfig.xml` configuration for specifying font paths has certain limitations, especially regarding the use of relative paths and classpath references. The configuration primarily expects absolute file paths for font directories, which can complicate sharing fonts between libraries like BIRT and ... | 27,263 | [
{
"from": "human",
"value": "I use BIRT since early days and still have riddles regarding PDF emitter. \nShort story:\nCan I configure fontsConfig.xml to load fonts from relative path or from jars?\nLong story:\nWe are using both FOP and BIRT for generating PDF in our web application. It would be nice to sh... |
I'm logged into a SQL Server 2005 database as a non-sa user, 'bhk', that is a member of the 'public' server role only. The following code tries to execute within a stored procedure called by user 'bhk'. This line of code...
TRUNCATE TABLE #Table1
DBCC CHECKIDENT('#Table1', RESEED, @SequenceNumber) WITH NO_INFOMSGS
cau... | The issue you're encountering with the `DBCC CHECKIDENT` command in SQL Server 2005 has to do with how temporary tables are handled, ownership of objects, and the execution context of stored procedures.
### Addressing Your Questions:
1. **Ownership of Temporary Tables**:
When a user creates a temporary table (like... | 28,256 | [
{
"from": "human",
"value": "I'm logged into a SQL Server 2005 database as a non-sa user, 'bhk', that is a member of the 'public' server role only. The following code tries to execute within a stored procedure called by user 'bhk'. This line of code...\nTRUNCATE TABLE #Table1\nDBCC CHECKIDENT('#Table1', RES... |
I am using a List Control to display a representation of elements within a vector. When the list is clicked on another control shows information about that element. The index of the element is currently determined by its index in the control, however if I wish to sort or filter the results this will no longer work.
I h... | Sure! A virtual list control is a great way to handle situations where the display of items in a list does not directly correspond to a fixed data source, such as a vector or array. Instead, it allows you to manage the items dynamically based on the user's interactions, such as sorting or filtering.
Here's a simple gu... | 24,372 | [
{
"from": "human",
"value": "I am using a List Control to display a representation of elements within a vector. When the list is clicked on another control shows information about that element. The index of the element is currently determined by its index in the control, however if I wish to sort or filter ... |
Besides the DateTime ctor (new DateTime(year, month, day)) , is there any other way to truncate a date?
| Yes, besides using the `DateTime` constructor to create a new date with specific year, month, and day values, there are several other ways to truncate a `DateTime` object in C#. Below are a few methods:
1. **Using `DateTime.Date` Property**:
The `Date` property returns a new `DateTime` object with the time componen... | 26,257 | [
{
"from": "human",
"value": "Besides the DateTime ctor (new DateTime(year, month, day)) , is there any other way to truncate a date?\n"
},
{
"from": "gpt",
"value": "Yes, besides using the `DateTime` constructor to create a new date with specific year, month, and day values, there are several ot... |
I googled a lot, and could not find a single open source implementation of SFTP in .NET. All i got is 3rd party component for SFTP. can anyone help me with SFTP implenetation in .NET ?
| While there are indeed many third-party libraries available for SFTP in .NET, you can implement SFTP functionality using the **SSH.NET** library, which is an open-source library that provides SSH, SFTP, and SCP functionalities.
Here’s how you can implement a basic SFTP client in .NET using SSH.NET:
### Step 1: Instal... | 20,887 | [
{
"from": "human",
"value": "I googled a lot, and could not find a single open source implementation of SFTP in .NET. All i got is 3rd party component for SFTP. can anyone help me with SFTP implenetation in .NET ?\n"
},
{
"from": "gpt",
"value": "While there are indeed many third-party libraries... |
Boost range library (http://www.boost.org/doc/libs/1_35_0/libs/range/index.html) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges into one, viz:
given two ranges r1 and r2, define r which traverses [r1.begin(), r1.end()[ and then [r2.begin(), r2.end()[. Is there some way to defin... | Yes, you can combine two ranges into a single range in Boost Range by creating a custom range that concatenates the two ranges. You can achieve this using the `boost::make_iterator_range` and some custom logic.
Here's a way to define a new range `r` that traverses the elements of `r1` followed by the elements of `r2`:... | 21,290 | [
{
"from": "human",
"value": "Boost range library (http://www.boost.org/doc/libs/1_35_0/libs/range/index.html) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges into one, viz:\ngiven two ranges r1 and r2, define r which traverses [r1.begin(), r1.end()[ and then [r2.begi... |
I have started on a personal python application that runs on the desktop. I am using wxPython as a GUI toolkit. Should there be a demand for this type of application, I would possibly like to commercialize it.
I have no knowledge of deploying "real-life" Python applications, though I have used py2exe in the past with v... | Deploying a Python application while keeping your intellectual property secure can be a challenge, but there are several options available for packaging, obfuscating, and distributing your wxPython application across multiple platforms. Here's a general approach you can take:
### 1. Packaging Your Application
There ar... | 28,084 | [
{
"from": "human",
"value": "I have started on a personal python application that runs on the desktop. I am using wxPython as a GUI toolkit. Should there be a demand for this type of application, I would possibly like to commercialize it.\nI have no knowledge of deploying \"real-life\" Python applications, ... |
I need a modal dialog to gather some user input. I then need the same data to be consumed by the application MainFrame.
Usually my Modal Dialog would have a pointer to some DataType able to store what I need, and I'd be passing this object by reference from the MainFrame in order to be able to recover data once the mo... | Passing data between a modal dialog and the main application frame can be approached in several ways, and the method you choose may depend on the specifics of your application architecture, coding standards, and personal preferences. However, let's consider a few common approaches and best practices to help you decide ... | 27,105 | [
{
"from": "human",
"value": "I need a modal dialog to gather some user input. I then need the same data to be consumed by the application MainFrame.\nUsually my Modal Dialog would have a pointer to some DataType able to store what I need, and I'd be passing this object by reference from the MainFrame in or... |
I launch a child process in Java as follows:
final String[] cmd = {"<childProcessName>"};
Process process = Runtime.getRuntime().exec(cmd);
It now runs in the background. All good and fine.
If my program now crashes (it is still in dev :-)) the child process still seems to hang around. How can I make it automatically... | When you launch a child process in Java using `Runtime.getRuntime().exec()`, the child process becomes a separate entity that doesn't automatically terminate when the parent Java process dies. To handle this scenario and ensure that the child process is terminated if the parent process crashes or exits unexpectedly, yo... | 27,962 | [
{
"from": "human",
"value": "I launch a child process in Java as follows:\nfinal String[] cmd = {\"<childProcessName>\"};\nProcess process = Runtime.getRuntime().exec(cmd);\n\nIt now runs in the background. All good and fine. \nIf my program now crashes (it is still in dev :-)) the child process still seems... |
What is the correct way to implement the "find as you type" behavior on a TComboBox descendant component whose style is csOwnerDrawFixed?
| Implementing "find as you type" behavior in a `TComboBox` descendant component with the `csOwnerDrawFixed` style involves a few steps. This feature allows users to type in a filter that matches the items in the combo box, and the dropdown list will adjust to show only the matching items.
Here’s a basic approach to acc... | 22,060 | [
{
"from": "human",
"value": "What is the correct way to implement the \"find as you type\" behavior on a TComboBox descendant component whose style is csOwnerDrawFixed?\n"
},
{
"from": "gpt",
"value": "Implementing \"find as you type\" behavior in a `TComboBox` descendant component with the `csO... |
I have a JUnit 3.x TestCase which I would like to be able to parameterize. I'd like to parametrize the entire TestCase (including the fixture). However, the TestSuite.addTestSuite() method does not allow be to pass a TestCase object, just a class:
TestSuite suite = new TestSuite("suite");
suite.addTestSuite(MyTes... | You are correct that in JUnit 3.x, parameterizing an entire TestCase can be a bit tricky, especially since the `TestSuite.addTestSuite()` method does not support passing instances directly. Here are a few approaches you can take to achieve the desired parameterization.
### Option 1: Create a Custom TestSuite
You can ... | 19,877 | [
{
"from": "human",
"value": "I have a JUnit 3.x TestCase which I would like to be able to parameterize. I'd like to parametrize the entire TestCase (including the fixture). However, the TestSuite.addTestSuite() method does not allow be to pass a TestCase object, just a class:\n TestSuite suite = new TestS... |
I need to create some windows service which will execute every N period of time.
The question is:
Which timer control should I use: System.Timers.Timer or System.Threading.Timer one? Does it influence on something?
I am asking because I heard many evidences to non correct work of System.Timers.Timer in windows servic... | When creating a Windows Service that requires periodic execution, both `System.Timers.Timer` and `System.Threading.Timer` can be used, but there are important differences between them that may influence your choice.
### System.Timers.Timer
- **Event-Driven**: It raises the `Elapsed` event on a thread pool thread when ... | 26,384 | [
{
"from": "human",
"value": "I need to create some windows service which will execute every N period of time.\nThe question is:\nWhich timer control should I use: System.Timers.Timer or System.Threading.Timer one? Does it influence on something? \nI am asking because I heard many evidences to non correct w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.