instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I get a 2032 stream error from Flash in response to POST requests that return "201 Created" in IE (Firefox works fine). Since Flash doesn't provide access to the HTTP status I can't tell that it has actually succeeded. The request is being made with HTTPService.
Any suggestions? Has anyone else seen this?
Thanks, Al... | The "2032 Stream Error" in Flash generally indicates a communication problem between Flash and the server. This issue can occur for several reasons, especially when dealing with POST requests that return a "201 Created" status. Since you're noticing that it works fine in Firefox but not in Internet Explorer, this sugge... | 43,678 | [
{
"from": "human",
"value": "I get a 2032 stream error from Flash in response to POST requests that return \"201 Created\" in IE (Firefox works fine). Since Flash doesn't provide access to the HTTP status I can't tell that it has actually succeeded. The request is being made with HTTPService.\nAny suggest... |
I've run the suggested commands found here but I still can't seem to get the network view working. Here's what the page/view says instead:
If this is a Github repository you can
set your credentials to view your
network
git config github.user REPO_USER
git config github.repo REPO_NAME ... | It looks like you're trying to access a network view on GitHub, but you’re encountering an issue that suggests you need to set your GitHub credentials for a repository. If you have a specific repository in mind, you will need to replace `REPO_USER` and `REPO_NAME` with the actual username and repository name you are tr... | 48,740 | [
{
"from": "human",
"value": "I've run the suggested commands found here but I still can't seem to get the network view working. Here's what the page/view says instead:\n\nIf this is a Github repository you can\n set your credentials to view your\n network\n git config github.user REPO_USER\n... |
I have class with internal property:
internal virtual StateEnum EnrolmentState
{
get { ..getter logic }
set { ..setter logic }
}
However I want to be able to access to this property outside of the assembly so I created method that simply returns this property:
public StateEnum GetCurrentState()
{
return ... | The issue you're facing arises from the fact that the `EnrolmentState` property is marked as `internal`, making it accessible only within the same assembly. Even though you've created a public method `GetCurrentState()` to access this property, it doesn't work because the property itself cannot be accessed outside the ... | 43,585 | [
{
"from": "human",
"value": "I have class with internal property:\ninternal virtual StateEnum EnrolmentState \n{\n get { ..getter logic }\n set { ..setter logic }\n}\n\nHowever I want to be able to access to this property outside of the assembly so I created method that simply returns this property:\... |
When an item is clicked in the checkedlistbox, it gets highlighted. How can I prevent this highlighting effect?
I can hook into the SelectedIndexChanged event and clear the selection, but the highlighting still happens and you see a blip. In fact, if you hold down the mouse click, never releasing it after you clicked ... | To prevent highlighting of items in a CheckedListBox in a Windows Forms application, you can override the default drawing behavior by using the `DrawItem` event. This allows you to have more control over how items are rendered, including whether they should be highlighted or not.
Here’s a step-by-step guide to achieve... | 44,787 | [
{
"from": "human",
"value": "When an item is clicked in the checkedlistbox, it gets highlighted. How can I prevent this highlighting effect? \nI can hook into the SelectedIndexChanged event and clear the selection, but the highlighting still happens and you see a blip. In fact, if you hold down the mouse cl... |
How does your employer limit/prevent pirating of its products?
Some have the view that piracy can be good because of the market share and exposure it gives. Sure these are benefits but they come at a cost.
Do you use any anti-piracy software or methods to protect your products and why/why not?
| Employers often employ a variety of strategies to limit or prevent the piracy of their products. Common methods include:
1. **Digital Rights Management (DRM)**: This technology helps control how digital content is used and distributed. It can prevent unauthorized copying and distribution, ensuring that only legitimate... | 45,597 | [
{
"from": "human",
"value": "How does your employer limit/prevent pirating of its products?\nSome have the view that piracy can be good because of the market share and exposure it gives. Sure these are benefits but they come at a cost.\nDo you use any anti-piracy software or methods to protect your product... |
for testing purposes i need an recursive directory with some files, that comes to maximum path-length.
The Script used for the creation consists only of two for-loops, as followed:
for /L %%a in (1 1 255) do @(
mkdir %%a
&& cd %%a
&& for /L %%b in (1 1 %random%) do @(
echo %%b >> %%a.txt
... | It seems like you are trying to create a recursive directory structure with files, but are encountering issues when running your script in different command environments, particularly in the Visual Studio 2008 command shell.
Let's revise the script slightly to ensure it works correctly regardless of the environment an... | 43,870 | [
{
"from": "human",
"value": "for testing purposes i need an recursive directory with some files, that comes to maximum path-length.\nThe Script used for the creation consists only of two for-loops, as followed:\nfor /L %%a in (1 1 255) do @(\n mkdir %%a\n && cd %%a\n && for /L %%b in (1 1 %random%)... |
So What I'm essentially trying to do is have something happen 70% of the time, another few things happen 10% of the time each if that makes sense but my app doesn't seem to do any of the actions I'm guessing I'm misunderstanding the loop syntax or something, anyway if anyone could take a look and maybe give me some adv... | It looks like you're trying to implement a probability-based selection mechanism where different actions are triggered based on random values. However, there are some issues in your current code that may prevent it from working as expected. Let's break it down and fix the logic.
### Issues in Your Code:
1. **Redundan... | 45,557 | [
{
"from": "human",
"value": "So What I'm essentially trying to do is have something happen 70% of the time, another few things happen 10% of the time each if that makes sense but my app doesn't seem to do any of the actions I'm guessing I'm misunderstanding the loop syntax or something, anyway if anyone cou... |
At the root of my d: drive, TortoiseSVN is showing the question mark decorators on all the folders. The d: drive is not a SVN working copy. How do I remove the decorators?
| TortoiseSVN adds question mark decorators to indicate that it does not recognize the folders as part of an SVN working copy. If you're seeing question marks on all folders in a drive that is not an SVN working copy, it may be due to TortoiseSVN scanning the drive for SVN repositories.
To remove the question mark decor... | 48,581 | [
{
"from": "human",
"value": "At the root of my d: drive, TortoiseSVN is showing the question mark decorators on all the folders. The d: drive is not a SVN working copy. How do I remove the decorators?\n"
},
{
"from": "gpt",
"value": "TortoiseSVN adds question mark decorators to indicate that it ... |
Modifying the HTTP Response Using Filters
| Modifying HTTP responses using filters is a common technique in web development and application programming. Filters can intercept and alter the content of HTTP responses sent from the server to the client. This is useful for various purposes, including content modification, data sanitization, security enhancements, an... | 43,807 | [
{
"from": "human",
"value": "Modifying the HTTP Response Using Filters\n"
},
{
"from": "gpt",
"value": "Modifying HTTP responses using filters is a common technique in web development and application programming. Filters can intercept and alter the content of HTTP responses sent from the server ... |
I had a realtivley simple ajax application, which I have broken up to be more modular. The code is at the link below, and what I have mainly done is add the GetRecordSet function and allowed fetchcompelte to take a variable for which layer to put data in. It should work fine in thery. When I put alert()s in, the code s... | It seems like you're working on an AJAX application and you've modularized it to improve its structure. However, since you mentioned that you’re not hitting the conditional blocks in your `fetchComplete` function, we should troubleshoot a few common issues that might be causing this behavior.
### Possible Issues and S... | 45,737 | [
{
"from": "human",
"value": "I had a realtivley simple ajax application, which I have broken up to be more modular. The code is at the link below, and what I have mainly done is add the GetRecordSet function and allowed fetchcompelte to take a variable for which layer to put data in. It should work fine in ... |
C#: How do you tell which item index is selected in ListView?
| In C#, if you're working with a `ListView` control and want to determine which item index is currently selected, you can use the `SelectedIndices` or `SelectedItems` property of the `ListView`. Here's how you can do that:
### Example using `SelectedIndices`
The `SelectedIndices` property returns a collection of the i... | 47,756 | [
{
"from": "human",
"value": "C#: How do you tell which item index is selected in ListView?\n"
},
{
"from": "gpt",
"value": "In C#, if you're working with a `ListView` control and want to determine which item index is currently selected, you can use the `SelectedIndices` or `SelectedItems` proper... |
I have been trying to improve the performance of a web page that references several separate JavaScript files. I found the new CompositeScript feature in .Net 3.5 SP1 that allows you to combine scripts at runtime through the ScriptManager and it works great to reduce the number of hits on our server at page load.
But ... | Caching issues with combined scripts in ASP.NET can be tricky, especially with the CompositeScript feature in ASP.NET 3.5 SP1. Here are several troubleshooting steps and recommendations you can try to resolve the caching issue:
### 1. Check for Cache-Control Headers
Make sure that the HTTP response headers for the com... | 45,849 | [
{
"from": "human",
"value": "I have been trying to improve the performance of a web page that references several separate JavaScript files. I found the new CompositeScript feature in .Net 3.5 SP1 that allows you to combine scripts at runtime through the ScriptManager and it works great to reduce the number... |
I need to parse Visual Studio automatically generated XML documentation to create a report. I decided to use XSLT but I'm very new to it and need help.
Common template is:
<doc>
<members>
<member name="F:MyNamespace">
<summary>Some text</summary>
</member>
</members>
</doc>
I want to isolate members... | The error you're encountering is due to a misunderstanding about the XSLT version you're using and the XPath functions available in that version. The `fn:matches` function you're trying to use is part of XPath 2.0, while your XSLT stylesheet is set to version 1.0, which does not support this function.
In XSLT 1.0, you... | 47,332 | [
{
"from": "human",
"value": "I need to parse Visual Studio automatically generated XML documentation to create a report. I decided to use XSLT but I'm very new to it and need help.\nCommon template is:\n<doc>\n <members>\n <member name=\"F:MyNamespace\">\n <summary>Some text</summary>\n </member... |
SELECT DISTINCT
'LRS-TECH 1' || rpad(code,7) || rpad('APPTYPE',30) ||
rpad(licensing_no,30) || rpad(' ',300) AS RECORD
FROM APPS
WHERE L_code = '1000' AND licensing_no IS NOT NULL
This seems to be the primary culprit in why I cannot export these records to a textfile in my development environment. Is ther... | Optimizing a SQL query can involve several strategies. While the query you've provided is relatively straightforward, there are a few approaches you can consider to potentially improve its performance:
### 1. Indexing
- **Indexing**: Ensure there is an index on the `L_code` and `licensing_no` columns. If you don't al... | 43,315 | [
{
"from": "human",
"value": "SELECT DISTINCT \n 'LRS-TECH 1' || rpad(code,7) || rpad('APPTYPE',30) || \n rpad(licensing_no,30) || rpad(' ',300) AS RECORD \nFROM APPS\nWHERE L_code = '1000' AND licensing_no IS NOT NULL\n\nThis seems to be the primary culprit in why I cannot export these records to a ... |
Even though error_reporting is set to 0, database errors are still being printed to screen. Is there a setting somewhere I can change to disable database error reporting? This is for CodeIgniter v1.6.x
EDIT: Re: Fixing errors - Um, yes. I want to fix the errors. I get error notices from my error log, not from what my v... | In CodeIgniter v1.6.x, if you're looking to suppress database error messages from being displayed on the screen while still logging them for your records, you can take a few steps to ensure that errors are handled correctly. Here’s how you can achieve that:
1. **Configure Error Reporting**: Make sure to set error repo... | 48,013 | [
{
"from": "human",
"value": "Even though error_reporting is set to 0, database errors are still being printed to screen. Is there a setting somewhere I can change to disable database error reporting? This is for CodeIgniter v1.6.x\nEDIT: Re: Fixing errors - Um, yes. I want to fix the errors. I get error not... |
It's a WiX MSI installer and each time I uninstall and reinstall it in my virtual machine environment the size reported in Add/Remove Programs gets bigger. It's up to 200MB now when the installed files are only just over 30MB. Any idea how this could happen and what I might be doing wrong?
Edit: Not using any custom ... | The issue you're experiencing with the reported size in Add/Remove Programs increasing upon each install and uninstall of your WiX MSI installer can stem from a few different sources. Here are several potential reasons and solutions to consider:
1. **Component Cache**: Windows Installer maintains a component cache for... | 47,195 | [
{
"from": "human",
"value": "It's a WiX MSI installer and each time I uninstall and reinstall it in my virtual machine environment the size reported in Add/Remove Programs gets bigger. It's up to 200MB now when the installed files are only just over 30MB. Any idea how this could happen and what I might be... |
I have forms in my page a get and a post and i want add pager on my get form .. so i cant page through the results..
The problem that i am having is when i move to the second page it does not display anything..
I am using this library for paging ..
http://stephenwalther.com/Blog/archive/2008/09/18/asp-net-mvc-tip-44-c... | The issue you're experiencing arises because the pager is likely generating a link that makes a GET request to the `SearchByAttraction` action without any parameters, thus causing it to hit the GET method instead of the POST method where your search results are processed.
To resolve this issue, you can modify the way... | 45,889 | [
{
"from": "human",
"value": "I have forms in my page a get and a post and i want add pager on my get form .. so i cant page through the results.. \nThe problem that i am having is when i move to the second page it does not display anything..\nI am using this library for paging ..\nhttp://stephenwalther.com/... |
I want to programmatically create a SHA1 checksum of audio files (MP3, Ogg Vorbis, Flac).
The requirement is that the checksum should be stable even if the header (eg. ID3) changes.
Note: The audio files don't have CRCs
This is what I tried by now:
1) Reading + Hashing all MPEG frames using Perl and MPEG::Audio::Frame
... | To create a stable SHA1 checksum for audio files while ignoring metadata changes and focusing solely on the audio content, you can adopt a few strategies across different programming languages. Here are some recommendations and approaches that may provide consistent results:
### 1. **Use a Library that Ignores Metadat... | 44,546 | [
{
"from": "human",
"value": "I want to programmatically create a SHA1 checksum of audio files (MP3, Ogg Vorbis, Flac).\nThe requirement is that the checksum should be stable even if the header (eg. ID3) changes.\nNote: The audio files don't have CRCs\nThis is what I tried by now:\n1) Reading + Hashing all M... |
The code below is the code i am using. It works fine in thunderbird but not in mac mail client (and i assume anything made by microsoft. I currently do not have access to this to test it in). Much as i am aware of the idiosyncrasies of the various mail clients, I am flummoxed by this! It's fairly self explanatory but i... | The issue you're facing with the email rendering differently in various mail clients is a common one due to how different email clients interpret MIME types and the structure of the email.
Your current implementation looks mostly correct, but there are a couple of details that could be causing problems in clients lik... | 44,786 | [
{
"from": "human",
"value": "The code below is the code i am using. It works fine in thunderbird but not in mac mail client (and i assume anything made by microsoft. I currently do not have access to this to test it in). Much as i am aware of the idiosyncrasies of the various mail clients, I am flummoxed by... |
I'm tasked with automating the retrieval of a couple of BusinessObjects Web Intelligence reports and further processing thereof.
I have no other means of access to this data (this was the first avenue I followed), so I will have to do some screen scraping. Alas, the interface seems user-only. Grr!
Has anyone done this ... | Screen scraping can indeed be a bit challenging, especially with web applications that have user-specific interfaces. However, there are several approaches and tools you can use to automate the retrieval of BusinessObjects Web Intelligence reports. Here are some suggestions based on your requirements:
### Automation T... | 39,105 | [
{
"from": "human",
"value": "I'm tasked with automating the retrieval of a couple of BusinessObjects Web Intelligence reports and further processing thereof.\nI have no other means of access to this data (this was the first avenue I followed), so I will have to do some screen scraping. Alas, the interface s... |
Where is the best documentation of ffmpeg and libavcodec?
It appears that ffmpeg supports many undocumented options that it is very hard to find a good reference.
| The best documentation for FFmpeg and libavcodec can be found in several places:
1. **FFmpeg Official Documentation**: The official FFmpeg website provides extensive documentation, including details on the libraries, command-line tools, and options.
- Website: [FFmpeg Documentation](https://ffmpeg.org/documentation... | 47,641 | [
{
"from": "human",
"value": "Where is the best documentation of ffmpeg and libavcodec?\nIt appears that ffmpeg supports many undocumented options that it is very hard to find a good reference.\n"
},
{
"from": "gpt",
"value": "The best documentation for FFmpeg and libavcodec can be found in sever... |
It seems that any kind of graphic library like DirectFB or MiniGui requires some sort of underlying operation system like Linux or uClinux.
I am challenged with writing a software for a micro controller with just 512kb flash, an LCD display and a touchscreen to display and handle some pictures and GUI parts.
Do you kno... | If you are looking for a lightweight graphics library that can work directly with a framebuffer in an embedded environment without the overhead of a full operating system, there are several options you can consider:
1. **LittlevGL (LVGL)**: This is a free and open-source graphics library that is particularly well-suit... | 47,450 | [
{
"from": "human",
"value": "It seems that any kind of graphic library like DirectFB or MiniGui requires some sort of underlying operation system like Linux or uClinux.\nI am challenged with writing a software for a micro controller with just 512kb flash, an LCD display and a touchscreen to display and hand... |
Ok well I've been trying to convert my model to use LINQ but didn't want to throw away my current DTO's and their interfaces which are scattered through the domain.
I managed to find this blog post which has outlined the process quite nicely:
Achieving POCOs in LINQ To SQL
I have the managed to get the retrieval of rec... | The issues you're encountering when trying to add a `Selection` to a `Market` in your LINQ to SQL implementation stem from the handling of relationships and foreign keys between your entities. Specifically, there are a few points that you can address to resolve the problem:
### 1. Foreign Key Handling
When you set th... | 39,525 | [
{
"from": "human",
"value": "Ok well I've been trying to convert my model to use LINQ but didn't want to throw away my current DTO's and their interfaces which are scattered through the domain.\nI managed to find this blog post which has outlined the process quite nicely:\nAchieving POCOs in LINQ To SQL\nI ... |
(Note: I realize this is close to How do you document your database structure? , but I don't think it's identical.)
I've started work at a place with a database with literally hundreds of tables and views, all with cryptic names with very few vowels, and no documentation. They also don't allow gratuitous changes to th... | Documenting a complex database structure, especially in a situation with limited access and cryptic naming conventions, can indeed be challenging. Here's a structured approach you can take to create effective documentation that can evolve over time:
### 1. Start with a Basic Inventory
**Table/Views List**: Create a s... | 46,459 | [
{
"from": "human",
"value": "(Note: I realize this is close to How do you document your database structure? , but I don't think it's identical.)\nI've started work at a place with a database with literally hundreds of tables and views, all with cryptic names with very few vowels, and no documentation. They... |
I have a DataGridView (WinForms) in which I have defined a custom EditingControl derived from DataGridViewTextBoxEditingControl that only allows numeric characters.
I need to raise CellValueChanged event on the DataGridView each time the user press a key, but the default behaviour is to raise the event only when editio... | To raise the `CellValueChanged` event each time a key is pressed in your custom `DataGridViewTextBoxEditingControl`, you can indeed use the workaround you've mentioned. However, there is a cleaner approach that avoids ending and starting the edit operation unnecessarily.
The key is to directly invoke the `CellValueCha... | 43,504 | [
{
"from": "human",
"value": "I have a DataGridView (WinForms) in which I have defined a custom EditingControl derived from DataGridViewTextBoxEditingControl that only allows numeric characters.\nI need to raise CellValueChanged event on the DataGridView each time the user press a key, but the default behavi... |
I've been developing a winforms app tied to sql server. I haven't rebooted in a while. Today i rebooted and now I can't log into sql. I used every account I know and their passwords including one that was working just before i rebooted and i get a 'Login failed' . I did take the database I use offline just before start... | It sounds like you're experiencing a challenging issue with your SQL Server after a reboot. Here are some troubleshooting steps you can take to resolve the login issues and potentially bring your database back online:
### 1. Verify SQL Server is Running
First, ensure that the SQL Server service is running:
- Open `SQL... | 45,411 | [
{
"from": "human",
"value": "I've been developing a winforms app tied to sql server. I haven't rebooted in a while. Today i rebooted and now I can't log into sql. I used every account I know and their passwords including one that was working just before i rebooted and i get a 'Login failed' . I did take the... |
Recently I needed to do weighted random selection of elements from a list, both with and without replacement. While there are well known and good algorithms for unweighted selection, and some for weighted selection without replacement (such as modifications of the resevoir algorithm), I couldn't find any good algorithm... | For weighted random selection with replacement, there are a few approaches that can be both efficient and simple. Here are some methods you can consider:
### 1. Prefix Sum Method
1. **Calculate the Prefix Sums:**
First, you can create a prefix sum array based on the weights of the elements. This means you convert ... | 45,693 | [
{
"from": "human",
"value": "Recently I needed to do weighted random selection of elements from a list, both with and without replacement. While there are well known and good algorithms for unweighted selection, and some for weighted selection without replacement (such as modifications of the resevoir algor... |
What is the best resource for learning the features and benefits of windbg? I want to be able to discuss investigate memory issues (handles, objects), performance issues, etc . . .
| To effectively learn about WinDbg and its features, particularly for investigating memory issues, handles, objects, and performance problems, there are several excellent resources available:
1. **Microsoft Documentation**:
- The official Microsoft documentation for WinDbg is comprehensive and provides a solid found... | 48,304 | [
{
"from": "human",
"value": "What is the best resource for learning the features and benefits of windbg? I want to be able to discuss investigate memory issues (handles, objects), performance issues, etc . . .\n"
},
{
"from": "gpt",
"value": "To effectively learn about WinDbg and its features, ... |
In my ASP.NET 1.1 application, I am compressing and replacing the hidden Viewstate variable with an alternate compressed value, stored in a hidden field called __VSTATE. This works well but on a few occasions, submitting a page causes the common "potentially dangerous Request.Form value ..." error.
I examined the __VST... | The issue you're encountering with the "potentially dangerous Request.Form value ..." error in ASP.NET is related to how the ASP.NET request validation system works. This system is designed to protect against certain types of attacks, such as cross-site scripting (XSS) attacks, by validating input data and rejecting po... | 46,066 | [
{
"from": "human",
"value": "In my ASP.NET 1.1 application, I am compressing and replacing the hidden Viewstate variable with an alternate compressed value, stored in a hidden field called __VSTATE. This works well but on a few occasions, submitting a page causes the common \"potentially dangerous Request.F... |
Anyone know how to style the header hover color of a WPF ListView?
Thanks!
| To style the header hover color of a WPF `ListView`, you can use `Style` and `ControlTemplate` to customize the appearance of the `GridViewColumnHeader`. You need to target the `GridViewColumnHeader` specifically to achieve this. Here’s how you can do it:
1. Define a `Style` for `GridViewColumnHeader` in your `Window`... | 40,113 | [
{
"from": "human",
"value": "Anyone know how to style the header hover color of a WPF ListView?\nThanks!\n"
},
{
"from": "gpt",
"value": "To style the header hover color of a WPF `ListView`, you can use `Style` and `ControlTemplate` to customize the appearance of the `GridViewColumnHeader`. You ... |
pkzip25 -add=all -dir=current -silent -locale -exclude=DistData.zip -exclude=extract.bat -exclude=run.bat -exclude=pkzip25.exe -exclude=extracted.txt -exclude=zipped.txt -exclude=.\STORE DistData.zip *.*
pkzip25 -view -directories DistData.zip >zipped.txt
copy DistData.zip ..\BKX\DistData_1.zip
cd ..\BKX
rename DistDa... | The commands you provided seem to be related to using PKZIP, a file compression utility, to create a ZIP file and manage its versions. Below is a breakdown of what each command does:
1. **Create a ZIP Archive:**
```bash
pkzip25 -add=all -dir=current -silent -locale -exclude=DistData.zip -exclude=extract.bat -exc... | 44,884 | [
{
"from": "human",
"value": "pkzip25 -add=all -dir=current -silent -locale -exclude=DistData.zip -exclude=extract.bat -exclude=run.bat -exclude=pkzip25.exe -exclude=extracted.txt -exclude=zipped.txt -exclude=.\\STORE DistData.zip *.*\npkzip25 -view -directories DistData.zip >zipped.txt\n\ncopy DistData.zip ... |
How can I access Ethernet statistics from C/C++ code like netstat -e?
Interface Statistics
Received Sent
Bytes 21010071 15425579
Unicast packets 95512 94166
Non-unicast packets 12510 7
Discards ... | To access Ethernet statistics similar to what `netstat -e` provides in C/C++, you generally have two main approaches: using platform-specific APIs or directly reading from system files. Below are examples for both Windows and Linux environments.
### On Linux
In Linux, you can access network interface statistics throu... | 42,498 | [
{
"from": "human",
"value": "How can I access Ethernet statistics from C/C++ code like netstat -e?\nInterface Statistics\n\n Received Sent\n\nBytes 21010071 15425579\nUnicast packets 95512 94166\nNon-unicast packets ... |
I would like to parse HTML document and replace action attribute of all the forms and add some hidden fields with XSL. Can someone show some examples of XSL that can do this?
| Certainly! You can use XSLT (eXtensible Stylesheet Language Transformations) to transform an HTML document, modifying the `action` attribute of all `<form>` elements and adding hidden fields as needed. Below, I'll provide an example that demonstrates how to accomplish this.
### Example HTML Document
Here's a simple H... | 40,432 | [
{
"from": "human",
"value": "I would like to parse HTML document and replace action attribute of all the forms and add some hidden fields with XSL. Can someone show some examples of XSL that can do this?\n"
},
{
"from": "gpt",
"value": "Certainly! You can use XSLT (eXtensible Stylesheet Language... |
At a recent discussion on Silverlight the advantage of speed was brought up. The argument for Silverlight was that it performed better in the browser than Javascript because it is compiled (and managed) code.
It was then stated that this advantage only applies to IE because IE interprets Javascript which is inefficien... | The performance comparison between Silverlight and JavaScript has historically been a topic of interest, especially during the height of Silverlight's popularity. Here’s a breakdown of the key points regarding performance in this context:
1. **Silverlight Compilation vs. JavaScript Interpretation**:
- Silverlight a... | 45,263 | [
{
"from": "human",
"value": "At a recent discussion on Silverlight the advantage of speed was brought up. The argument for Silverlight was that it performed better in the browser than Javascript because it is compiled (and managed) code.\nIt was then stated that this advantage only applies to IE because IE ... |
We have 2 flowdocuments that we'd like to compare similar to when using a diff viewer (winmerge, beyond compare, etc). Has anybody done this or know how to get the text out of a flowdocument to do a compare?
| To compare two `FlowDocument` objects in WPF, you will first need to extract the text content from each document. Once you have the text, you can use any text comparison tool or library to perform the comparison.
Here’s how you can extract text from a `FlowDocument`:
1. **Extract text from `FlowDocument`:** You can t... | 48,656 | [
{
"from": "human",
"value": "We have 2 flowdocuments that we'd like to compare similar to when using a diff viewer (winmerge, beyond compare, etc). Has anybody done this or know how to get the text out of a flowdocument to do a compare?\n"
},
{
"from": "gpt",
"value": "To compare two `FlowDocum... |
I need to debug JavaScript in Internet Explorer 7.
Unfortunately, its default debugger doesn't provide me with much information. It tells me the page that the error showed up on (not the specific script) and gives me a line number. I don't know if that is related to my problem.
It'd be nice if it could narrow down the... | Internet Explorer 7 does not have as robust developer tools as modern browsers like Firefox or Chrome. However, there are a few methods you can use to improve your debugging experience:
1. **Using the Internet Explorer Developer Toolbar**: While not as powerful as Firebug, the Developer Toolbar for IE can help with in... | 46,286 | [
{
"from": "human",
"value": "I need to debug JavaScript in Internet Explorer 7.\nUnfortunately, its default debugger doesn't provide me with much information. It tells me the page that the error showed up on (not the specific script) and gives me a line number. I don't know if that is related to my problem... |
This may be too generic a question as is but...
I am stumped by trying to move through the directories from within a shell script. I'm not a *nix power user, but I am comfortable working through the command line for most tasks. I'd like to call a script that can move 'me' to a directory instead of just the script proce... | It's a common question and a bit of a misconception about how shell scripts work in Unix-like environments. When you run a script, it executes in a subshell, which means any changes to the environment (like changing directories with `cd`) are lost when the script finishes executing. Therefore, you can't simply run a sc... | 45,688 | [
{
"from": "human",
"value": "This may be too generic a question as is but...\nI am stumped by trying to move through the directories from within a shell script. I'm not a *nix power user, but I am comfortable working through the command line for most tasks. I'd like to call a script that can move 'me' to a ... |
I'm fairly new to ASP.NET MVC, and I'm having a little trouble with scripts... in particular, I want to use jQuery in most pages, so it makes sense to put it in the master page. However, if I do (from my ~/Views/Shared/Site.Master):
<script src="../../Scripts/jquery-1.2.6.js" type="text/javascript"></script>
Then that... | You're on the right track with your approach to including jQuery in your ASP.NET MVC application. In ASP.NET MVC, using the `Url.Content` method is a common practice for generating the correct URLs, especially when your application might be hosted in a virtual directory. This method ensures that the path is correctly r... | 44,365 | [
{
"from": "human",
"value": "I'm fairly new to ASP.NET MVC, and I'm having a little trouble with scripts... in particular, I want to use jQuery in most pages, so it makes sense to put it in the master page. However, if I do (from my ~/Views/Shared/Site.Master):\n<script src=\"../../Scripts/jquery-1.2.6.js\"... |
In my web app, when a user logs in, I add his Id to a vector of valid Ids in the servlet, when he logs out, I remove his Id from the vector, so I can see how many current users are active, if a user forgets to log out, my servelt generated html has :
<meta http-equiv="Refresh" content="30; url=My_Servlet?User_Action=l... | When a user closes their browser, their session does not end immediately, and there’s no direct way for the server to detect that the browser has been closed. Instead, the session will eventually time out based on the configured session timeout settings in your web application.
Here's a breakdown of how you can handl... | 44,085 | [
{
"from": "human",
"value": "In my web app, when a user logs in, I add his Id to a vector of valid Ids in the servlet, when he logs out, I remove his Id from the vector, so I can see how many current users are active, if a user forgets to log out, my servelt generated html has : \n<meta http-equiv=\"Refresh... |
If you create a pure ActionScript project in Flex Builder 3 and want to do unit testing using flexunit, what is the best option?
The built-in Flex builder will refuse to build the mxml file containing the TestRunnerBase component as it is a pure ActionScript project (no Flex allowed). It is impossible to add the mxml f... | When working with a pure ActionScript project in Flex Builder 3 and needing to perform unit testing using FlexUnit, you are correct that the challenges you've mentioned are significant. Here are a few approaches you could consider that might work around the limitations you've encountered:
1. **Separate Test Project wi... | 46,044 | [
{
"from": "human",
"value": "If you create a pure ActionScript project in Flex Builder 3 and want to do unit testing using flexunit, what is the best option?\nThe built-in Flex builder will refuse to build the mxml file containing the TestRunnerBase component as it is a pure ActionScript project (no Flex al... |
Here is the situation. I am creating some graphics (using GDI+) on an asp page running under mono xsp. This works great in my development environment as my development environment is running under a GUI, however when I try running it on a GUI-less server, it fails (I am assuming due to the fact that certain libraries... | When using GDI+ with Mono on a GUI-less server (i.e., a server without a graphical user interface), you may run into issues because GDI+ is designed to work with graphical environments. In a GUI-less environment, certain libraries and dependencies that are typically available in a desktop environment may not be present... | 44,888 | [
{
"from": "human",
"value": "Here is the situation. I am creating some graphics (using GDI+) on an asp page running under mono xsp. This works great in my development environment as my development environment is running under a GUI, however when I try running it on a GUI-less server, it fails (I am assumi... |
I have a star schema type data base, with fact tables that have many foreign keys to dimension tables. The number of records in each dimension table is small - often less than 256 bytes, but always less than 64k. The fact tables typically have hundreds of thousands of records, so I want maximize join speed.
I'd like t... | Your consideration of using `TINYINT` and `SMALLINT` data types in your star schema is valid and can indeed help in optimizing storage and potentially improve join speed, especially given your scenario with small dimension tables. Here are some key points to consider:
### 1. Storage Efficiency
- **Space Savings**: Usi... | 45,239 | [
{
"from": "human",
"value": "I have a star schema type data base, with fact tables that have many foreign keys to dimension tables. The number of records in each dimension table is small - often less than 256 bytes, but always less than 64k. The fact tables typically have hundreds of thousands of records, ... |
Im using smarty and mysql_real_escape_string() for user input,
and when I insert some code with ' or " , and lookup in phpmyadmin
it shows without backslashes.
When I get record from DB i doesn't have backslashes also.
But when I just pass escaped string without inserting into the db
it is backslashed.
Shouldn't it add... | When using `mysql_real_escape_string()`, you're primarily escaping special characters in a string to prevent SQL injection vulnerabilities when you're inserting data into your MySQL database. This function is designed to prepare a string for safe SQL queries, not to add slashes for later handling.
Here’s a breakdown o... | 47,822 | [
{
"from": "human",
"value": "Im using smarty and mysql_real_escape_string() for user input,\nand when I insert some code with ' or \" , and lookup in phpmyadmin\nit shows without backslashes.\nWhen I get record from DB i doesn't have backslashes also.\nBut when I just pass escaped string without inserting i... |
I need to find whether the web page is cached or not. That s loaded newly or its appeared in cache.
| To determine whether a web page is loaded freshly or retrieved from a cache, you can use a few methods. Here are some approaches you might consider:
### 1. **Browser Developer Tools**:
Most modern web browsers have built-in developer tools that can help you check whether a page is cached.
- **Google Chrome**:
1. Op... | 44,561 | [
{
"from": "human",
"value": "I need to find whether the web page is cached or not. That s loaded newly or its appeared in cache.\n"
},
{
"from": "gpt",
"value": "To determine whether a web page is loaded freshly or retrieved from a cache, you can use a few methods. Here are some approaches you m... |
I recently had to extend the aasm states for the latest version of restful_authentication (github) in one of my apps. I removed the "include Authorization::AasmRoles", copied the existing states and events from the plugin and made the changes necessary to support an additional "published" state on my account model.
Doe... | If you're trying to extend the AASM states in the `restful_authentication` plugin and want a cleaner solution without completely overriding the existing behavior, you can consider the following approach:
### 1. Use AASM State Extensions
Instead of removing the `include Authorization::AasmRoles`, you can extend the exi... | 41,006 | [
{
"from": "human",
"value": "I recently had to extend the aasm states for the latest version of restful_authentication (github) in one of my apps. I removed the \"include Authorization::AasmRoles\", copied the existing states and events from the plugin and made the changes necessary to support an additional... |
class Child
{
private override void Check_CheckedChanged(object sender, EventArgs e)
{
if (Check.Checked)
{
this.addName(this.FirstName);
this.disableControls();
}
else
{
this.addAddress(this.address);
//this.activatecontr... | To achieve your goal, you will need to allow the `Child` class to access some functionality from the `Parent` class while also being able to handle its own specific logic. Since the methods in the `Parent` class are private, they cannot be accessed directly from the `Child` class. One common approach in object-oriented... | 45,238 | [
{
"from": "human",
"value": "class Child\n{ \n private override void Check_CheckedChanged(object sender, EventArgs e)\n {\n if (Check.Checked)\n {\n this.addName(this.FirstName);\n this.disableControls();\n }\n\n else\n {\n this.addAd... |
I am in the early stages of design of an application that has to be highly available and scalable. I want to use an eventual consistency data model for this for a number of reasons. I know and understand why this is an unpopular architectural choice for many solutions, but it's important in my case.
I am looking for re... | Designing an application with eventual consistency can indeed be challenging, especially in the realm of e-commerce where data accuracy and integrity are crucial for user experience. However, with the right design principles and understanding of the technologies involved, you can successfully implement a highly availab... | 44,457 | [
{
"from": "human",
"value": "I am in the early stages of design of an application that has to be highly available and scalable. I want to use an eventual consistency data model for this for a number of reasons. I know and understand why this is an unpopular architectural choice for many solutions, but it's ... |
I'm in the process of extending and improving a website that has quite a few structural problems. It looks very much like the developers before me had heard of MVC but didn't understand the ideas of abstraction or modularity. So the MVC "framework" is a) bespoke b) broken c) patched and d) there are several in use all ... | Your questions touch on some fundamental principles of the MVC (Model-View-Controller) architectural pattern, and your concerns regarding the tight coupling of SQL to models are valid and widely recognized in software engineering.
### Separation of Concerns and MVC
1. **Separation of Concerns**:
- In a well-struct... | 45,225 | [
{
"from": "human",
"value": "I'm in the process of extending and improving a website that has quite a few structural problems. It looks very much like the developers before me had heard of MVC but didn't understand the ideas of abstraction or modularity. So the MVC \"framework\" is a) bespoke b) broken c) p... |
What is the correct way to convert ASP.NET SOAP-based web services to JSON-based responses?
...And then call these from jQuery?
What are "best practices" when integrating jQuery based AJAX and ASP.NET?
Articles? Books?
| Converting ASP.NET SOAP-based web services to JSON-based responses typically involves creating a RESTful API or using an existing technology stack to expose the necessary functionality in a JSON format. Here are the steps and best practices for performing the conversion and integrating it with jQuery:
### Steps to Con... | 38,170 | [
{
"from": "human",
"value": "What is the correct way to convert ASP.NET SOAP-based web services to JSON-based responses?\n...And then call these from jQuery?\nWhat are \"best practices\" when integrating jQuery based AJAX and ASP.NET?\nArticles? Books?\n"
},
{
"from": "gpt",
"value": "Converting... |
I have been programming in Perl, off and on, for years now, although only sporadically is it my primary language. Because I often go months without writing any perl, I rely heavily on my dog-eared Camel Book to remind me how to do things. However, when I copy recipes verbatim with no understanding, this bothers me. Thi... | No need to apologize! Your questions demonstrate a thoughtful approach to learning and understanding Perl, which is commendable. Let's break down the example you provided and address your questions one by one.
### Q1) What is going on here? On what, exactly, is the regex operating?
The line of code you've given:
```p... | 43,232 | [
{
"from": "human",
"value": "I have been programming in Perl, off and on, for years now, although only sporadically is it my primary language. Because I often go months without writing any perl, I rely heavily on my dog-eared Camel Book to remind me how to do things. However, when I copy recipes verbatim wi... |
I was reading about Clojure and found a discussion about Java not supporting tail calls, in the current version, and that people were throwing exceptions to simulate tail calling in the JVM, anyways it sounds like people are doing some crazy stuff out there. So this got me wondering about C#'s tail calling, same issues... | C# does have some support for tail call optimization, but it is not as robust or guaranteed as in some other languages. Let's break this down a bit:
### Tail Call Optimization (TCO) in C#
1. **What is TCO?**
- Tail call optimization is a technique where the compiler or runtime can optimize certain types of functio... | 48,475 | [
{
"from": "human",
"value": "I was reading about Clojure and found a discussion about Java not supporting tail calls, in the current version, and that people were throwing exceptions to simulate tail calling in the JVM, anyways it sounds like people are doing some crazy stuff out there. So this got me wonde... |
If my header/footer are in the master page, and my .js files are referenced in the master page, how can I add jQuery validation on my login page?
If there is an error detected, how will I modify the .js file to display the appropriate error message?
| To add jQuery validation to your login page while your JavaScript files are referenced in a master page, you'll follow these general steps:
1. **Include jQuery and jQuery Validation Libraries**: Ensure that the jQuery and jQuery Validation libraries are referenced in your master page. Your master page should include s... | 41,980 | [
{
"from": "human",
"value": "If my header/footer are in the master page, and my .js files are referenced in the master page, how can I add jQuery validation on my login page?\nIf there is an error detected, how will I modify the .js file to display the appropriate error message?\n"
},
{
"from": "gpt... |
I found a few articles online providing examples of how to model graphs of various kinds (DAGs, in particular) in SQL, but they all seemed enormously complex, given the relative simplicity of what they're modeling.
Is there a best / standard way of doing this? My current thinking is something like this:
create table no... | Your initial design for representing a directed acyclic graph (DAG) in SQL is a reasonable starting point, particularly for straightforward applications. However, there are a few considerations and potential improvements to ensure robustness, maintainability, and efficiency, especially as your graph grows in complexity... | 38,138 | [
{
"from": "human",
"value": "I found a few articles online providing examples of how to model graphs of various kinds (DAGs, in particular) in SQL, but they all seemed enormously complex, given the relative simplicity of what they're modeling.\nIs there a best / standard way of doing this? My current thinki... |
I have an existing application written in Perl. Now I need to integrate this application with OBI. The plan is having a button the user can click on to open OBI in an iframe. OBI resides on a different server from the running application.
Has anyone done this before, know what is the best practice for doing this, and w... | Integrating an existing Perl application with Oracle Business Intelligence (OBI) using an iframe is certainly feasible. Here's an outline of the approach, best practices, potential challenges, and customization options:
### Integration Steps
1. **Generate an iframe in Perl**: You will need to create a button in your ... | 44,893 | [
{
"from": "human",
"value": "I have an existing application written in Perl. Now I need to integrate this application with OBI. The plan is having a button the user can click on to open OBI in an iframe. OBI resides on a different server from the running application.\nHas anyone done this before, know what ... |
I have several functions that I wrote and I use regularly on my servers, is there a way I can add them to the core so I don't have to include them from external files?
I am running PHP5
| In PHP, you can't directly modify the core language itself, but you can add your custom functions to the PHP runtime in a way that allows you to use them without including external files every time. Here are a few common methods to achieve this:
### 1. Use `auto_prepend_file`
You can utilize the `auto_prepend_file` di... | 48,103 | [
{
"from": "human",
"value": "I have several functions that I wrote and I use regularly on my servers, is there a way I can add them to the core so I don't have to include them from external files?\nI am running PHP5\n"
},
{
"from": "gpt",
"value": "In PHP, you can't directly modify the core lang... |
I'm writing an HTTP Cache library for Java, and I'm trying to use that library in the same application which is started twice. I want to be able to share the cache between those instances.
What is the best solution for this? I also want to be able to write to that same storage, and it should be available for both insta... | To build an HTTP Cache library that shares a cache between multiple Java Virtual Machines (JVMs), you’ll need to consider both the storage mechanism for your cache and the way to index or reference the cached items. Here are some strategies you can use:
### 1. Shared File System Cache
- **File-based Cache Storage**: ... | 45,642 | [
{
"from": "human",
"value": "I'm writing an HTTP Cache library for Java, and I'm trying to use that library in the same application which is started twice. I want to be able to share the cache between those instances.\nWhat is the best solution for this? I also want to be able to write to that same storage,... |
Is there a way to test an application where you simulate a hundred different clients connecting to a IIS server and asking the same data? At the customer where our project is running they have 400 computers and they often do stress tests with all computers. I on the other hand have only got my laptop... (and a developm... | Yes, you can perform stress tests on your IIS server simulating multiple clients without needing 100 different physical machines. There are various tools and techniques available that allow you to simulate concurrent users effectively. Here are some popular options:
### 1. **Apache JMeter**
- **Description:** JMeter i... | 42,391 | [
{
"from": "human",
"value": "Is there a way to test an application where you simulate a hundred different clients connecting to a IIS server and asking the same data? At the customer where our project is running they have 400 computers and they often do stress tests with all computers. I on the other hand h... |
I would like to edit XHTML files using Emacs' nxml-mode which can use rnc schemas for on the fly validation. This is all built in to newer Emacs versions.
However, my XHTML files contain elements from another schema. So <foo:foo> tags are valid, but only within the <xhtml:head> of the document.
Currently, nxml complain... | To achieve the goal of validating your XHTML files with both the built-in XHTML schema and a custom schema that includes your `<foo:foo>` elements, you'll need to set up a Relax NG Compact (RNC) schema that extends the XHTML schema. Additionally, you'll configure Emacs' `nxml-mode` to locate and apply these schemas cor... | 38,252 | [
{
"from": "human",
"value": "I would like to edit XHTML files using Emacs' nxml-mode which can use rnc schemas for on the fly validation. This is all built in to newer Emacs versions.\nHowever, my XHTML files contain elements from another schema. So <foo:foo> tags are valid, but only within the <xhtml:head>... |
I have a MySQL query in which I want to include a list of ID's from another table. On the website, people are able to add certain items, and people can then add those items to their favourites. I basically want to get the list of ID's of people who have favourited that item (this is a bit simplified, but this is what i... | It sounds like you're trying to retrieve a list of user IDs who have favorited an item, along with the ability to include the creator of the item in that list. Your original approach using a subquery inside `GROUP_CONCAT` does not work because it results in multiple rows being returned for the subquery when you try to ... | 49,227 | [
{
"from": "human",
"value": "I have a MySQL query in which I want to include a list of ID's from another table. On the website, people are able to add certain items, and people can then add those items to their favourites. I basically want to get the list of ID's of people who have favourited that item (thi... |
How to configure JAXB unmarshaller so it will trim leading and trailing whitespaces from strings?
For instance let's consider a simple binding between a Java bean and XML using JAXB annotations:
@XmlRootElement(name="bean")
class Bean {
@XmlElement(required=true)
String name;
@XmlElement(required=true)
int n... | To configure JAXB to trim leading and trailing whitespace from strings during unmarshalling, you can utilize a custom `XmlAdapter`. This adapter will allow you to preprocess the string values before they are set in your Java object.
Here's how you can implement it:
1. **Create a custom `XmlAdapter`**:
You will cr... | 44,051 | [
{
"from": "human",
"value": "How to configure JAXB unmarshaller so it will trim leading and trailing whitespaces from strings?\nFor instance let's consider a simple binding between a Java bean and XML using JAXB annotations:\n@XmlRootElement(name=\"bean\")\nclass Bean {\n\n @XmlElement(required=true)\n S... |
I have played around with smart phone development (windows ce), and it seemed pretty straight forward using vs.net and having a nice emulator etc.
How is blackberry development? Seeing as it uses JavaME I am guessing learning the SDK/syntax for a .net developer wouldn't be that hard to get going with.
But what about t... | BlackBerry development has evolved over the years, particularly with the shift from BlackBerry OS to BlackBerry 10 and now to Android-based devices. Here's an overview of the development environment for BlackBerry, focusing mainly on the older BlackBerry OS (which used Java ME) and BlackBerry 10.
### Development for B... | 44,972 | [
{
"from": "human",
"value": "I have played around with smart phone development (windows ce), and it seemed pretty straight forward using vs.net and having a nice emulator etc.\nHow is blackberry development? Seeing as it uses JavaME I am guessing learning the SDK/syntax for a .net developer wouldn't be tha... |
I just ran into an issue with Python's imaplib and Gmail's authentication mechanism:
>>> import imaplib
>>> imap = imaplib.IMAP4_SSL('imap.gmail.com', 993)
>>> imap.authenticate('bobdole@gmail.com', 'Bob Dole likes your style!')
Traceback (most recent call last):
...
imaplib.error: AUTHENTICATE command error: BAD ['T... | The `imaplib` library in Python does not support the `AUTHENTICATE` command for logging into Gmail, as indicated by the error message you received. Instead, you should use the `login()` method to authenticate with your Gmail account.
Additionally, it's important to note that Gmail has specific requirements for authent... | 46,326 | [
{
"from": "human",
"value": "I just ran into an issue with Python's imaplib and Gmail's authentication mechanism:\n>>> import imaplib\n>>> imap = imaplib.IMAP4_SSL('imap.gmail.com', 993)\n>>> imap.authenticate('bobdole@gmail.com', 'Bob Dole likes your style!')\nTraceback (most recent call last):\n ...\nima... |
how to change connection string dynamically in object datasource in asp.net ?
| In ASP.NET, changing the connection string dynamically in an `ObjectDataSource` can be achieved by modifying the connection string in your data access code or configuring the `ObjectDataSource` to use a custom method to set the connection string at runtime.
Here's a general approach to dynamically change the connectio... | 45,129 | [
{
"from": "human",
"value": "how to change connection string dynamically in object datasource in asp.net ?\n"
},
{
"from": "gpt",
"value": "In ASP.NET, changing the connection string dynamically in an `ObjectDataSource` can be achieved by modifying the connection string in your data access code... |
I have an Access 2002 application which links an Oracle table via ODBC with this code:
Set HRSWsp = CreateWorkspace("CONNODBC", "", "", dbUseODBC)
Set HRSConn = HRSWsp.OpenConnection("HRSCONN", dbDriverPrompt, , "ODBC;")
DoCmd.TransferDatabase acLink, "Database ODBC", HRSConn.Connect, acTable, "SCHEMA.TABLE", "TABLE", ... | In Access 2007 and later, you will indeed want to use ADO (ActiveX Data Objects) instead of DAO for connecting to ODBC data sources, as the ODBCDirect functionality is no longer supported.
Here’s how you can modify your code to use ADO for linking an Oracle table. The key steps include setting up the ADO connection, e... | 47,872 | [
{
"from": "human",
"value": "I have an Access 2002 application which links an Oracle table via ODBC with this code:\nSet HRSWsp = CreateWorkspace(\"CONNODBC\", \"\", \"\", dbUseODBC)\nSet HRSConn = HRSWsp.OpenConnection(\"HRSCONN\", dbDriverPrompt, , \"ODBC;\")\nDoCmd.TransferDatabase acLink, \"Database ODB... |
My table has a large number of columns. I have a command to copy some data - think of it as cloning a product - but as the columns may change in the future, I would like to only select everything from the table and only change the value of one column without having to refer to the rest.
Eg instead of:
INSERT INTO MYTAB... | In DB2 (and SQL in general), there's no direct way to do what you're asking using a single `SELECT *` statement and modifying one of the columns in that same statement. However, you can achieve your goal through other means. One common approach is to use a combination of the `INSERT` statement with a `SELECT` while exp... | 44,819 | [
{
"from": "human",
"value": "My table has a large number of columns. I have a command to copy some data - think of it as cloning a product - but as the columns may change in the future, I would like to only select everything from the table and only change the value of one column without having to refer to t... |
I am writing a test program to copy some file in Application data folder on device to release directory on desktop.
I am not sure how to access release dir on desktop?
Is there any shell command to do that?
Basically I want to write c++ program that will run on device to accomplish this task.
| To copy files from the Application Data folder on your device to the release directory on your desktop using a C++ program, you first need to determine the path of the "release directory" on the desktop. This depends on the operating system and the environment where you're building your application.
### Accessing the ... | 45,009 | [
{
"from": "human",
"value": "I am writing a test program to copy some file in Application data folder on device to release directory on desktop.\nI am not sure how to access release dir on desktop?\nIs there any shell command to do that?\nBasically I want to write c++ program that will run on device to acco... |
We are supposed to instantiate our entities through a factory since they are set up differently on the client and server. I want to make sure this is the case but cant quite get it to work.
public interface IEntityFactory
{
TEntity Create<TEntity>() where TEntity : new();
}
public abstract class Entity
{
prote... | To ensure that entities are created through a factory while still allowing the entity class to know if it was instantiated properly, you can modify your implementation slightly. The key issue you mentioned is that you want to check if the `Create<TEntity>()` method was called from the `IEntityFactory`, but you are curr... | 44,490 | [
{
"from": "human",
"value": "We are supposed to instantiate our entities through a factory since they are set up differently on the client and server. I want to make sure this is the case but cant quite get it to work.\npublic interface IEntityFactory\n{\n TEntity Create<TEntity>() where TEntity : new();... |
I have been working for a while to create an iPhone app. Today when my battery was low, I was working and constantly saving my source files then the power went out...
Now when I plugged my computer back in and it is getting good power I try to open my project file and I get an error:
Unable to Open Project
Project ..... | I'm glad to hear that you were able to recover your project by merging the good and newer parts of your project file! That's a great approach when dealing with file corruption. Here are some additional tips to help you manage your project and avoid similar issues in the future:
1. **Version Control**: Since you mentio... | 47,861 | [
{
"from": "human",
"value": "I have been working for a while to create an iPhone app. Today when my battery was low, I was working and constantly saving my source files then the power went out...\nNow when I plugged my computer back in and it is getting good power I try to open my project file and I get an... |
I'm playing with the new geography column in SQL Server 2008 and the STGeomFromText function. Here is my code (works with AdventureWorks2008)
DECLARE @region geography;
set @region = geography::STGeomFromText('POLYGON((
-80.0 50.0, -90.0 50.0,
-90.0 25.0, -80.0 25.0,
-80.0 50.0))', 4326);
SELE... | The Spatial Reference ID (SRID) is an identifier used to define the coordinate system and spatial reference for geographic data. Each SRID corresponds to a specific set of parameters that define how the geographic data is represented and understood in terms of its spatial context.
### Understanding SRID 4326
The SRID... | 46,860 | [
{
"from": "human",
"value": "I'm playing with the new geography column in SQL Server 2008 and the STGeomFromText function. Here is my code (works with AdventureWorks2008)\nDECLARE @region geography;\nset @region = geography::STGeomFromText('POLYGON((\n -80.0 50.0, -90.0 50.0,\n -90.0 25.0, -8... |
I want to select an option in select tag through the value. - javascript
var selectbox=document.getElementById("Lstrtemplate");
var TemplateName=selectbox.options[selectbox.selectedIndex].text;
Now i am having the option text in TemplateName, using this i want to update an another select tag, which is having the same... | You can achieve this by iterating through the options of the second `<select>` tag to find the option that matches the `TemplateName` you have obtained from the first `<select>`. Then you can set that option as selected. Here's a complete example:
Assuming you have two `<select>` elements with the following HTML struc... | 45,510 | [
{
"from": "human",
"value": "I want to select an option in select tag through the value. - javascript\nvar selectbox=document.getElementById(\"Lstrtemplate\");\nvar TemplateName=selectbox.options[selectbox.selectedIndex].text;\n\nNow i am having the option text in TemplateName, using this i want to update ... |
I'm working on an asp.net application which uses Lucene.net
I need to highlight the search results returned from Lucene.
I believe there is a Highlighter class which serves this purpose.I am using Lucene.Net version 2.0.0.4 but am not able to find any Highlighter class in it.
Kindly help.
Thanks!
| In Lucene.NET version 2.0.0.4, there isn't a built-in `Highlighter` class like you would find in some other versions or libraries. Highlighting is a common requirement in search applications, and while Lucene.NET itself does not provide highlighting directly in that version, you can implement it manually or use other l... | 45,784 | [
{
"from": "human",
"value": "I'm working on an asp.net application which uses Lucene.net\nI need to highlight the search results returned from Lucene.\nI believe there is a Highlighter class which serves this purpose.I am using Lucene.Net version 2.0.0.4 but am not able to find any Highlighter class in it.\... |
I am using the following code fragment in a php script to safely update a shared resource.
$lock_id = sem_get( ftok( 'tmp/this.lock', 'r'));
sem_acquire($lock_id)
//do something
sem_release($lock_id)
When I stress test this code with large number of requests I get an error:
Warning: semop() failed acquiring SYSVSEM_S... | Based on your error message and the context provided, it appears you're encountering an issue with System V semaphores. The error "No space left on device" indicates that you've hit the limit of semaphores available on your system, rather than the `semop` being interrupted by a signal.
The `semop()` function's EINTR e... | 44,042 | [
{
"from": "human",
"value": "I am using the following code fragment in a php script to safely update a shared resource. \n$lock_id = sem_get( ftok( 'tmp/this.lock', 'r'));\nsem_acquire($lock_id)\n//do something\nsem_release($lock_id)\n\nWhen I stress test this code with large number of requests I get an err... |
We have a solution where we are picking the messages using Windows Service.
The Windows Service fires every after 2 minutes and retrieves the MSMQ message to pass it to a Web Service.
Can I create a WCF service which will automatically picks up the messages from MSMQ Queue?
Can I avoid Windows Service by using WCF Se... | Yes, you can create a WCF service that automatically picks up messages from an MSMQ queue, which can help you avoid the need for a separate Windows Service. WCF supports integration with MSMQ and provides built-in functionality for message queuing. Here's how you can set it up:
### WCF with MSMQ
1. **Create a WCF Ser... | 46,259 | [
{
"from": "human",
"value": "We have a solution where we are picking the messages using Windows Service. \nThe Windows Service fires every after 2 minutes and retrieves the MSMQ message to pass it to a Web Service.\n\nCan I create a WCF service which will automatically picks up the messages from MSMQ Queue?... |
I don't want to use the HTTP::Proxy package because I want to dump out a couple requests. My one liner looks like this, but breaks on trying to pass the header in:
perl -MData::Dumper -MHTTP::Daemon -MHTTP::Status -MLWP::UserAgent -e 'my $ua = LWP::UserAgent->new;my $d=new HTTP::Daemon(LocalPort=>1999);print "Please co... | To create a more compact one-liner while correctly handling the HTTP request and modifying the host as needed, you'll want to build a new request from the received request. Here’s how you can modify your original one-liner to keep it concise and functional:
```perl
perl -MData::Dumper -MHTTP::Daemon -MHTTP::Status -ML... | 44,338 | [
{
"from": "human",
"value": "I don't want to use the HTTP::Proxy package because I want to dump out a couple requests. My one liner looks like this, but breaks on trying to pass the header in:\nperl -MData::Dumper -MHTTP::Daemon -MHTTP::Status -MLWP::UserAgent -e 'my $ua = LWP::UserAgent->new;my $d=new HTTP... |
I'm currently using msbuild for a solution of over 600 projects.
Imagine I change the code for 1 library that is used by 10 projects. Instead of providing all 600 projects to msbuild and let it compile all of them and figure out the dependencys. I was wondering if there was a program or library I could use that wou... | To accomplish your goal of analyzing project dependencies and determining which projects need to be built based on changes made to a specific project, you can consider using several tools and libraries that facilitate dependency analysis for .NET projects.
### Option 1: MSBuild and Project Reference Analysis
While it ... | 45,546 | [
{
"from": "human",
"value": "I'm currently using msbuild for a solution of over 600 projects. \nImagine I change the code for 1 library that is used by 10 projects. Instead of providing all 600 projects to msbuild and let it compile all of them and figure out the dependencys. I was wondering if there was... |
Scenario:
(If anyone has answered/viewed my questions recently this will be somewhat familar)
I have 3 different web services which expose a set of objects that have commonality. I've written wrapper classes and conversion logic using generic methods to change between the intermediary objects and the service object.
I... | You can certainly refactor the shared logic to avoid duplication in your `Service1Impl`, `Service2Impl`, and `Service3Impl` implementations of `IService`. One common approach to achieve this is to use a generic base class or an abstract class that contains the shared logic. Each specific service implementation can then... | 43,730 | [
{
"from": "human",
"value": "Scenario:\n(If anyone has answered/viewed my questions recently this will be somewhat familar)\nI have 3 different web services which expose a set of objects that have commonality. I've written wrapper classes and conversion logic using generic methods to change between the inte... |
I have a small WPF application; all column templates are ok and they are textboxes but I couldn't find how to bind a DateTime Column (i.e. like a DateTimePicker) to GridViewColumn.
| In WPF, to bind a `DateTime` column in a `GridView`, you can use a `DataTemplate` with a `DatePicker`. Below, I'll show you how to achieve this using a `ListView` with a `GridView` and including a `DatePicker` in one of the columns.
### Step-by-Step Example
1. **Define the Data Model**: First, you need a class that r... | 41,952 | [
{
"from": "human",
"value": "I have a small WPF application; all column templates are ok and they are textboxes but I couldn't find how to bind a DateTime Column (i.e. like a DateTimePicker) to GridViewColumn.\n"
},
{
"from": "gpt",
"value": "In WPF, to bind a `DateTime` column in a `GridView`, ... |
I'm trying to figure out how to drop/discard a request, I'm basically trying to implement a blocked list of IPs in my app to block spammers and I don't want to return any response (just ignore the request), is this possible in ASP.NET?
Edit: Some of the answers suggest that I could add them in the firewall, while this ... | In ASP.NET, when a request is made to your application, you are generally required to provide some sort of response. This is due to the nature of HTTP protocol, where every request must receive a response. If your goal is to silently ignore requests from blocked IPs without sending any sort of response, there is no dir... | 41,397 | [
{
"from": "human",
"value": "I'm trying to figure out how to drop/discard a request, I'm basically trying to implement a blocked list of IPs in my app to block spammers and I don't want to return any response (just ignore the request), is this possible in ASP.NET?\nEdit: Some of the answers suggest that I c... |
Been trying to find a working implementation of a WPF listview (or listbox) where
you can order items by dragging them up or down.
I have found a few, but none really works,
for example this one
http://www.codeproject.com/KB/WPF/ListViewDragDropManager.aspx?msg=2765618#xx2765618xx
stops working once you have list where... | Implementing drag-and-drop functionality in a WPF ListView or ListBox can indeed be challenging due to the complexity involved with handling mouse events, item reordering, and scrolling. Here’s a step-by-step guide to creating a simple drag-and-drop implementation that allows you to reorder items in a `ListView`.
### ... | 30,556 | [
{
"from": "human",
"value": "Been trying to find a working implementation of a WPF listview (or listbox) where\nyou can order items by dragging them up or down.\nI have found a few, but none really works,\nfor example this one\nhttp://www.codeproject.com/KB/WPF/ListViewDragDropManager.aspx?msg=2765618#xx276... |
I have used the transaction scope activity in windows workflow foundation. I am getting an workflow SQL persistence error.
I am not having SQL persistence database.
Do we need persisetence services.
I am not having Microsoft Distributed Transaction Coordinator (MSDTC)
| When working with Windows Workflow Foundation (WF) and using the `TransactionScope` activity, it's important to understand how transactions work in this context, especially regarding persistence and the handling of distributed transactions.
### Key Points:
1. **TransactionScope and MSDTC**:
- When you use `Transac... | 46,184 | [
{
"from": "human",
"value": "I have used the transaction scope activity in windows workflow foundation. I am getting an workflow SQL persistence error.\nI am not having SQL persistence database.\nDo we need persisetence services.\nI am not having Microsoft Distributed Transaction Coordinator (MSDTC)\n"
},... |
I am trying to make a graph in java that would have different nodes. some nodes would be connected to others and some wont. If they are connected then some boolean value for that node will be true and another variable will hold the value of the node it is connected to.
...any suggestions on what you guys think is the ... | To create a graph in Java where nodes can be connected or unconnected, and where each node has some boolean value and a reference to another node it is connected to, you can define a `Node` class and a `Graph` class. Below, I'll provide an outline of how you can structure these classes and then offer some sample code.
... | 42,975 | [
{
"from": "human",
"value": "I am trying to make a graph in java that would have different nodes. some nodes would be connected to others and some wont. If they are connected then some boolean value for that node will be true and another variable will hold the value of the node it is connected to. \n...any ... |
I've been digging through Stack Overflow as well as a number of Google searches, and I cannot find a satisfactory code formatter for JavaScript.
I have found several related tools, such as syntax highlighters and pretty-printers, but I am looking for a tool that I can ideally create a wrapper for in Eclipse and simply ... | If you're looking for a JavaScript code formatter that can be integrated into Eclipse, there are a few options you might consider. Here are some recommendations that are free or open-source and can help maintain a consistent code style for your development group:
1. **Prettier**:
- Prettier is a popular opinionated... | 44,545 | [
{
"from": "human",
"value": "I've been digging through Stack Overflow as well as a number of Google searches, and I cannot find a satisfactory code formatter for JavaScript.\nI have found several related tools, such as syntax highlighters and pretty-printers, but I am looking for a tool that I can ideally c... |
How do you create MFC applications with Visual Studio express '08?
| Creating MFC (Microsoft Foundation Class) applications using Visual Studio Express 2008 involves several steps. Here’s a guide to help you get started:
### Step 1: Install Visual Studio Express 2008
1. **Download and Install**: Ensure you have Visual Studio Express 2008 installed on your machine. You can download it ... | 42,235 | [
{
"from": "human",
"value": "How do you create MFC applications with Visual Studio express '08?\n"
},
{
"from": "gpt",
"value": "Creating MFC (Microsoft Foundation Class) applications using Visual Studio Express 2008 involves several steps. Here’s a guide to help you get started:\n\n### Step 1: ... |
I am using jquery and the getJSON method and I am wondering if there is a way to display a message saying loading before it loads my content. i know with the jquery ajax calls there is the before submit callbacks where you can have something but the getJSON only has like three options.
Any ideas?
| Yes, you can display a loading message before making a request with the `$.getJSON` method in jQuery. Although `$.getJSON` itself doesn't have a "before send" callback, you can still handle it by showing the loading message right before the request and hiding it when the request completes, whether it's successful or fa... | 46,730 | [
{
"from": "human",
"value": "I am using jquery and the getJSON method and I am wondering if there is a way to display a message saying loading before it loads my content. i know with the jquery ajax calls there is the before submit callbacks where you can have something but the getJSON only has like three o... |
What language(s) have comments with side effects? In essence, comments which are not comments....
| In most programming languages, comments are specifically designed to be ignored by the compiler or interpreter during the execution of the code. However, there are some languages or contexts in which comments can have side effects or are not entirely "comments" in the conventional sense. Here are a few examples:
1. **... | 48,377 | [
{
"from": "human",
"value": "What language(s) have comments with side effects? In essence, comments which are not comments....\n"
},
{
"from": "gpt",
"value": "In most programming languages, comments are specifically designed to be ignored by the compiler or interpreter during the execution of ... |
Does anyone know how to calculate time difference in C++ in milliseconds?
I used difftime but it doesn't have enough precision for what I'm trying to measure.
| To calculate time difference in milliseconds in C++, you can use the `<chrono>` library, which provides a high-resolution clock and can measure time with a precision of microseconds or nanoseconds. Here’s how you can do it:
1. Include the necessary headers.
2. Use `std::chrono::high_resolution_clock` to get the curren... | 48,676 | [
{
"from": "human",
"value": "Does anyone know how to calculate time difference in C++ in milliseconds?\nI used difftime but it doesn't have enough precision for what I'm trying to measure.\n"
},
{
"from": "gpt",
"value": "To calculate time difference in milliseconds in C++, you can use the `<chr... |
Wondering the most efficent way to make a binary search tree into a spell checker by reading in say 1000 word dictionary file and then having it check another document that say has a couple paragraphs.
| To create a spell checker using a binary search tree (BST) that reads from a dictionary file, you can follow a systematic approach. Below are the steps to efficiently implement this:
### Step 1: Define the Binary Search Tree Structure
You'll need to create a basic structure for the binary search tree. Each node will s... | 43,239 | [
{
"from": "human",
"value": "Wondering the most efficent way to make a binary search tree into a spell checker by reading in say 1000 word dictionary file and then having it check another document that say has a couple paragraphs. \n"
},
{
"from": "gpt",
"value": "To create a spell checker using... |
I'm beginning to plan a complete redesign of our departments intranet pages. As it stands, every department gets their own folder within root. They all share the same look and feel but don't use CSS everything in each file is straight up static text. Basically, if a change has to be made to the header, every file must ... | It sounds like you're taking a thoughtful approach to improving your department's intranet pages. Here are some key points to consider as you plan your redesign:
### Benefits of Using Master Pages
1. **Consistency**: Master pages allow you to define a common layout for your site, ensuring all pages share the same hea... | 45,454 | [
{
"from": "human",
"value": "I'm beginning to plan a complete redesign of our departments intranet pages. As it stands, every department gets their own folder within root. They all share the same look and feel but don't use CSS everything in each file is straight up static text. Basically, if a change has t... |
I've recently ported an application from JSF 1.1 to JSF 1.2. In the process we removed tomahawk and decided to use rich instead.
Now I need a way to make an expandable/collapsible detailViev for each row in the table.
The only thing I can think of is something along these lines (adapted from documentation at docs.jbos... | To create an expandable/collapsible detail view for each row in a `rich:dataTable`, you indeed have to manage the state of which row is expanded. While adding properties directly to your data model is one way to do this, there are cleaner alternatives that can avoid cluttering your data model with UI-related state.
##... | 43,706 | [
{
"from": "human",
"value": "I've recently ported an application from JSF 1.1 to JSF 1.2. In the process we removed tomahawk and decided to use rich instead.\nNow I need a way to make an expandable/collapsible detailViev for each row in the table. \nThe only thing I can think of is something along these lin... |
I have tried to implement simple ViewPage caching with ASP.NET MVC, however I cannot get the page to render correctly into a custom HtmlTextWriter when it has a master page.
I have tried overriding Render. If I simply call the base implementation, then everything renders correctly. If I render to my own writer and then... | Rendering a ViewPage to a string in ASP.NET MVC, especially with a master page (layout), can indeed be tricky. The issue you're encountering is likely due to how the `HtmlTextWriter` and master page rendering interact. Instead of writing to a custom `HtmlTextWriter`, you can leverage the built-in capabilities of MVC to... | 46,698 | [
{
"from": "human",
"value": "I have tried to implement simple ViewPage caching with ASP.NET MVC, however I cannot get the page to render correctly into a custom HtmlTextWriter when it has a master page.\nI have tried overriding Render. If I simply call the base implementation, then everything renders correc... |
I'm finding that hitting the "Refresh" button on my browser will temporarily screw up the ViewState for controls inside an UpdatePanel.
Here's my situation : I made a custom WebControl that stores values in the ViewState. I put this control inside an UpdatePanel. When I hit the "refresh" button on my browser, it will... | The behavior you're observing when hitting the "Refresh" button in a browser while using AJAX with ASP.NET's `UpdatePanel` is indeed related to how the ViewState is managed. Let's clarify the situation and then discuss how to address the problem.
### Understanding the Behavior
1. **ViewState Management**: When you re... | 43,078 | [
{
"from": "human",
"value": "I'm finding that hitting the \"Refresh\" button on my browser will temporarily screw up the ViewState for controls inside an UpdatePanel.\nHere's my situation : I made a custom WebControl that stores values in the ViewState. I put this control inside an UpdatePanel. When I hit... |
I read the part of the docs and saw that the ConfigParser returns a list of key/value pairs for the options within a section. I figured that keys did not need to be unique within a section, otherwise the parser would just return a mapping. I designed my config file schema around this assumption, then sadly realized tha... | It seems you're dealing with a limitation of `ConfigParser` (or `configparser` in Python 3) where keys must be unique within a section. Since you want to support multiple entries with the same key, you have a few options to achieve the desired configuration setup without modifying the `ConfigParser` implementation itse... | 42,292 | [
{
"from": "human",
"value": "I read the part of the docs and saw that the ConfigParser returns a list of key/value pairs for the options within a section. I figured that keys did not need to be unique within a section, otherwise the parser would just return a mapping. I designed my config file schema around... |
I have a medium sized application written in c++ using Qt. I wanted to profile things to see where my least performant code was so I compiled everything with -pg.
However, my application makes use of a lot of plugins using the QTPlugin mechanism (boils down to a dlopen and a dlsym of a instance object per plugin). I've... | When profiling an application that uses dynamic plugins, such as those created with the Qt plugin mechanism, there are a few important considerations when using `gprof` and the `-pg` flag. Here are some suggestions to help ensure that you capture profiling data for your plugins:
1. **Check Linking with `-pg`:** Ensure... | 43,434 | [
{
"from": "human",
"value": "I have a medium sized application written in c++ using Qt. I wanted to profile things to see where my least performant code was so I compiled everything with -pg.\nHowever, my application makes use of a lot of plugins using the QTPlugin mechanism (boils down to a dlopen and a dl... |
Personally, I've found that when good developers deal with clients, they often get sucked into the after-sales support process and this process has been difficult to reverse, so was just interested to hear the various strategies that developers employ in maintaining a healthy, useful relationship that keeps clients usi... | Dealing with clients as a developer can indeed be a balancing act, especially when it comes to maintaining boundaries while providing effective support. Here are several strategies that developers can use to foster healthy, productive client relationships while preventing issues like being stuck in perpetual after-sale... | 44,863 | [
{
"from": "human",
"value": "Personally, I've found that when good developers deal with clients, they often get sucked into the after-sales support process and this process has been difficult to reverse, so was just interested to hear the various strategies that developers employ in maintaining a healthy, u... |
I am developing on a LAMP(erl) stack and know of several ways to store obscured passwords. I'd like to hear from those who feel they have a best practice, given MySQL 4.1.1 and Perl 5.8, and the reasons why it's the best.
One option I have read about, using the MySQL ENCODE() and DECODE() functions, sounds pretty good... | When it comes to storing passwords securely in a LAMP (Linux, Apache, MySQL, Perl) stack, it's essential to follow best practices to protect user credentials. Below are some recommended methods for password storage, especially considering the constraints of using MySQL 4.1.1 and Perl 5.8.
### Best Practice: Hashing Pa... | 44,771 | [
{
"from": "human",
"value": "I am developing on a LAMP(erl) stack and know of several ways to store obscured passwords. I'd like to hear from those who feel they have a best practice, given MySQL 4.1.1 and Perl 5.8, and the reasons why it's the best.\nOne option I have read about, using the MySQL ENCODE() ... |
I'm writing an application where the user will create an appointment, and instantly get an email confirming their appointment. I'd also like to send an email the day of their appointment, to remind them to actually show up.
I'm in ASP.NET (2.0) on MS SQL . The immediate email is no problem, but I'm not sure about the... | To handle the reminder emails for your appointment system in ASP.NET (2.0) with MS SQL, you have a few options, as you've already identified. Here’s a breakdown of your proposed solutions and an additional option that might be worth considering:
### 1. SQL Job
Setting up a SQL Server job that runs every night to check... | 45,571 | [
{
"from": "human",
"value": "I'm writing an application where the user will create an appointment, and instantly get an email confirming their appointment. I'd also like to send an email the day of their appointment, to remind them to actually show up.\nI'm in ASP.NET (2.0) on MS SQL . The immediate email... |
I am writing an Objective-C application which communicates with a USB device. The application writes certain data to the device continuously and displays the status of the write operation in a textView, which is an object of NSTextView. I call the -[NSTextView insertText:] method in the loop when I get the write operat... | The issue you are experiencing is related to how the main run loop in a Cocoa application processes events and updates the user interface. When you have a long-running operation, such as a while loop that continuously updates the `NSTextView`, it blocks the run loop and prevents the UI from refreshing. This is why you'... | 45,928 | [
{
"from": "human",
"value": "I am writing an Objective-C application which communicates with a USB device. The application writes certain data to the device continuously and displays the status of the write operation in a textView, which is an object of NSTextView. I call the -[NSTextView insertText:] metho... |
I want to translate xml documents with a certain schema into another schema. I know both the old and new schemas...
I am planning to use python's xml.dom library , and translate line by line.
Any ideas on how to go about it ? Any tools or libraries in other languages that might make this easier/more efficient.
Thanks... | Using Python's `xml.dom` library for XML transformation is certainly possible, but there are more efficient and user-friendly libraries available for handling XML transformations and schema changes. Here are some options and approaches you might consider:
### 1. Using `xml.etree.ElementTree`
Instead of `xml.dom`, you... | 43,034 | [
{
"from": "human",
"value": "I want to translate xml documents with a certain schema into another schema. I know both the old and new schemas... \nI am planning to use python's xml.dom library , and translate line by line.\nAny ideas on how to go about it ? Any tools or libraries in other languages that mi... |
How would I implement "close all other tabs" function for a tab control using Context menu strip?
| To implement a "Close All Other Tabs" functionality using a Context Menu Strip in a Windows Forms application, you'll want to follow a few key steps. Below is a simplified example assuming you have a `TabControl` with multiple `TabPage` items. This example will guide you through setting up the Context Menu Strip and th... | 37,818 | [
{
"from": "human",
"value": "How would I implement \"close all other tabs\" function for a tab control using Context menu strip?\n"
},
{
"from": "gpt",
"value": "To implement a \"Close All Other Tabs\" functionality using a Context Menu Strip in a Windows Forms application, you'll want to follow... |
I've got some legacy software that I'd like to involve in an automated unit test (for testing network protocol compatibility) and because this software is old and runs in an outdated environment I'd like to encapsulate it in a virtual machine. What is the best way to control a virtual machine from a Visual Studio unit ... | To automate the control of a virtual machine (VM) from Visual Studio unit tests, you can consider a few different approaches depending on your requirements and the virtualization technology you choose (e.g., Hyper-V, VirtualBox, VMWare). Here’s a general outline on how to achieve your goal, along with specific suggesti... | 42,817 | [
{
"from": "human",
"value": "I've got some legacy software that I'd like to involve in an automated unit test (for testing network protocol compatibility) and because this software is old and runs in an outdated environment I'd like to encapsulate it in a virtual machine. What is the best way to control a v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.