instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I'm attempting to learn basic Win32 programming and running into a frustrating problem. I wish to convert a variable (Call it NumClicks) and display it as the application name (as part of a string).
From what I've seen, going from int + some block of text to a char* is problematic, because converting it to the requisit... | To display an integer variable like `NumClicks` as part of a string in a Win32 application, you can use the `wsprintf` function or the newer `StringCchPrintf` or `StringCchPrintfW` functions (for better safety and error handling). Since you're dealing with `LPCWSTR`, which is a wide string, you'll want to use the wide-... | 35,742 | [
{
"from": "human",
"value": "I'm attempting to learn basic Win32 programming and running into a frustrating problem. I wish to convert a variable (Call it NumClicks) and display it as the application name (as part of a string).\nFrom what I've seen, going from int + some block of text to a char* is problema... |
In my current application I have a form that requires the user to enter TONS of data. There are about 30 Textboxes and it happens that during development new ones get introduced or old ones get kicked out.
One Requirement by my customer is that they are all navigable through pressing Tab, and so I'm currently at the me... | Dealing with `TabIndex` properties in forms can indeed be a tedious and error-prone task, especially when forms evolve during development. However, there are some strategies and approaches you can use to better manage focus navigation without manually setting the `TabIndex` for each control.
### Strategies for Managin... | 36,924 | [
{
"from": "human",
"value": "In my current application I have a form that requires the user to enter TONS of data. There are about 30 Textboxes and it happens that during development new ones get introduced or old ones get kicked out.\nOne Requirement by my customer is that they are all navigable through pr... |
Specifically, I'm looking to mimic back button behavior with AJAX, and I don't want to attach #uglyhashes to every URL, which seems to be the standard practice of most solutions I've seen.
(For what it's worth, I'm perfectly fine with a solution that does not work at all in IE. :P )
| To mimic back button behavior with AJAX without using URL hashes, you can leverage the History API, which allows you to manipulate the browser's history stack without needing to use ugly hashes. The History API provides the `pushState` and `replaceState` methods to change the URL in the address bar and manage the histo... | 37,116 | [
{
"from": "human",
"value": "Specifically, I'm looking to mimic back button behavior with AJAX, and I don't want to attach #uglyhashes to every URL, which seems to be the standard practice of most solutions I've seen.\n(For what it's worth, I'm perfectly fine with a solution that does not work at all in IE.... |
I would like to upload files from java application/applet using POST http event. I would like to avoid to use any library not included in SE, unless there is no other (feasible) option.
So far I come up only with very simple solution.
- Create String (Buffer) and fill it with compatible header (http://www.ietf.org/r... | Uploading files using a Java application without relying on third-party libraries can be done, but it requires careful construction of the HTTP request, especially when dealing with multipart data. Below is an example of how you can achieve this using only the Java Standard Edition (SE) libraries.
### Example: Uploadi... | 36,827 | [
{
"from": "human",
"value": "I would like to upload files from java application/applet using POST http event. I would like to avoid to use any library not included in SE, unless there is no other (feasible) option. \nSo far I come up only with very simple solution. \n- Create String (Buffer) and fill it wi... |
We are discussing development of an improved management infrastructure for our distributed system.
We use COM, web services and .NET components. Since we're based on Microsoft Windows Server XP/2003, I guess, we basically have two options:
Powershell cmdlets
WMI classes using System.Management and WMI providers for na... | When considering the use of PowerShell cmdlets versus WMI (Windows Management Instrumentation) for managing your distributed system, there are several key factors that can influence your decision:
### 1. **Ease of Use and Learning Curve**
- **PowerShell**: PowerShell is designed to be user-friendly, with a command-... | 32,750 | [
{
"from": "human",
"value": "We are discussing development of an improved management infrastructure for our distributed system.\nWe use COM, web services and .NET components. Since we're based on Microsoft Windows Server XP/2003, I guess, we basically have two options:\n\nPowershell cmdlets\nWMI classes usi... |
My present contract engagement is at a large E-Commerce company. Their code base which has origins going back to .Net 1.0 has caught me by surprise to contain many issues that raise the level of smell beyond the last crap I took.
That notwithstanding and trying to diffuse my level of distraction from it, I go along me... | You’ve raised several important points about the code you've shared. There are definitely areas for improvement, especially considering that this code is part of a large codebase with a legacy background. Let's break down some of the main issues and suggestions for enhancement:
1. **Inline SQL**: Using inline SQL, esp... | 34,570 | [
{
"from": "human",
"value": "My present contract engagement is at a large E-Commerce company. Their code base which has origins going back to .Net 1.0 has caught me by surprise to contain many issues that raise the level of smell beyond the last crap I took. \nThat notwithstanding and trying to diffuse my l... |
I'm the IIS admin, not the developer on this site, so the code is opaque to me. I'm stumped, though, for where to look.
Using Windows Forms Authentication, the user is directed to a login page. If their password is expired, they are directed to ChgExpiredPwd.aspx. On our dev and test servers this works. On our product... | Given the scenario you've described, it sounds like you're dealing with a configuration or environmental issue rather than a coding issue, especially since the behavior differs between your development/test and production environments. Here are some troubleshooting steps you can take to narrow down the issue:
1. **Che... | 36,029 | [
{
"from": "human",
"value": "I'm the IIS admin, not the developer on this site, so the code is opaque to me. I'm stumped, though, for where to look. \nUsing Windows Forms Authentication, the user is directed to a login page. If their password is expired, they are directed to ChgExpiredPwd.aspx. On our dev a... |
Is it possible to have a post-mortem ( or post-exception ) debugging session in Java ? What would the workarounds be ( if there isn't a solution for this already ) ?
| In Java, the concept of a post-mortem (or post-exception) debugging session typically refers to analyzing the state of an application after it has crashed or encountered an unhandled exception. While Java does not have built-in support for "post-mortem" debugging in the same sense as some lower-level languages or envir... | 37,405 | [
{
"from": "human",
"value": "Is it possible to have a post-mortem ( or post-exception ) debugging session in Java ? What would the workarounds be ( if there isn't a solution for this already ) ?\n"
},
{
"from": "gpt",
"value": "In Java, the concept of a post-mortem (or post-exception) debugging ... |
I have a SQL challenge that is wracking my brain. I am trying to reconcile two reports for licenses of an application.
The first report is an access database table. It has been created and maintained by hand by my predecessors. Whenever they installed or uninstalled the application they would manually update the ta... | To reconcile the two tables and find the records that are in one but not the other based on any of the three columns, you can use a combination of `LEFT JOIN` and `NULL` checks in your `WHERE` clause.
Assuming the following structure for your tables:
- AccessTable: columns are `displayName`, `SAMAccountName`, `Compu... | 37,529 | [
{
"from": "human",
"value": "I have a SQL challenge that is wracking my brain. I am trying to reconcile two reports for licenses of an application. \nThe first report is an access database table. It has been created and maintained by hand by my predecessors. Whenever they installed or uninstalled the app... |
How can I best set up my PHP (LAMP) development environment so that I have development, staging and production servers. One-"click" deployment to any of those, as well as one-click rollback to any revision. Rollback should also rollback the database schema and data to how it was when that source code was current.
Rig... | Setting up a robust PHP (LAMP) development environment with efficient deployment, rollback, and testing practices can greatly improve your development workflow. Here are some strategies, tools, and best practices based on common industry setups.
### Environment Setup
1. **Server Configuration:**
- **Development:**... | 36,982 | [
{
"from": "human",
"value": "How can I best set up my PHP (LAMP) development environment so that I have development, staging and production servers. One-\"click\" deployment to any of those, as well as one-click rollback to any revision. Rollback should also rollback the database schema and data to how it... |
I've written an XML Schema file by hand (not using the DataSet Designer in VS) and a corresponding XML file containing structured data to be read in.
I ran the xsd.exe program to generate a Typed DataSet class; on the whole it looks fine to begin with (ignoring how it uses lowercase for public class members), but when ... | It sounds like you're encountering a common issue that arises when working with Typed DataSets in .NET, particularly when there's a mismatch between your XML data and your schema (XSD) definitions. Here are some potential troubleshooting steps and explanations to help you identify and resolve the issue:
### 1. Check X... | 38,630 | [
{
"from": "human",
"value": "I've written an XML Schema file by hand (not using the DataSet Designer in VS) and a corresponding XML file containing structured data to be read in.\nI ran the xsd.exe program to generate a Typed DataSet class; on the whole it looks fine to begin with (ignoring how it uses lowe... |
We have a lot of dll-libraries written in both delphi and c++ builder, and use sharemem and borlndmm.dll.
An aligment-issue in a 3thparty library forces us over to the new memorymanager in delphi 2007.
Can someone please explain 'shared memory manager' for me?
Is SimpleShareMem a dropin replacement for ShareMem ?
Can w... | Certainly! Let’s break down your questions regarding shared memory managers and the specific libraries you're using.
### What is a Shared Memory Manager?
In Delphi and C++ Builder applications, a memory manager is responsible for allocating and deallocating memory. When multiple modules (such as DLLs) are involved, u... | 36,588 | [
{
"from": "human",
"value": "We have a lot of dll-libraries written in both delphi and c++ builder, and use sharemem and borlndmm.dll.\nAn aligment-issue in a 3thparty library forces us over to the new memorymanager in delphi 2007.\nCan someone please explain 'shared memory manager' for me?\nIs SimpleShareM... |
I'm using jQuery to handle all my ajax needs for an ASP.NET site coded in VB. When I use the built in $.ajax function to POST to a code-behind function and there is an exception, it simply exits the function, and shows an error on the client side.
Besides making debugging difficult when coding, the bigger issue is that... | When you're using ASP.NET with jQuery AJAX and encounter an exception in a WebMethod (like `GetData` in your example), the exception does not propagate to the `Application_Error` method in the `Global.asax` file because the WebMethod is executed in a different context. Instead, when an unhandled exception occurs within... | 38,001 | [
{
"from": "human",
"value": "I'm using jQuery to handle all my ajax needs for an ASP.NET site coded in VB. When I use the built in $.ajax function to POST to a code-behind function and there is an exception, it simply exits the function, and shows an error on the client side.\nBesides making debugging diffi... |
I need to copy the content of a window (BitBlt) which is hidden, to another window. The problem is that once I hide the source window, the device context I got isn't painted anymore.
| When you attempt to use `BitBlt` to copy content from a hidden window, you'll encounter issues because the content of a hidden window is not rendered and thus isn't available in the device context (DC). Here's a way to work around this limitation:
### Steps to Copy Content from a Hidden Window
1. **Capture the Window... | 33,790 | [
{
"from": "human",
"value": "I need to copy the content of a window (BitBlt) which is hidden, to another window. The problem is that once I hide the source window, the device context I got isn't painted anymore.\n"
},
{
"from": "gpt",
"value": "When you attempt to use `BitBlt` to copy content fr... |
I want to create maintainable code, but this inheritance situation is causing me problems.
The issue is with my 2nd database helper class named InitUserExtension.
Since UserExtension inherits from User, I have to make sure that I mirror any changes in my InitUser helper to InitUserExtension.
I really don't like this as... | To avoid code duplication when initializing properties of a base class and its derived class, you can use a method in the base class that initializes its properties. This way, the derived class can call this method to initialize the inherited properties, reducing the need to repeat the code.
Here's a refactor of your ... | 38,778 | [
{
"from": "human",
"value": "I want to create maintainable code, but this inheritance situation is causing me problems.\nThe issue is with my 2nd database helper class named InitUserExtension.\nSince UserExtension inherits from User, I have to make sure that I mirror any changes in my InitUser helper to Ini... |
This problem crops up every now and then at work. Our build machine can have it's files accessed via a normal windows file share. If someone browses a folder remotely on the machine, and leaves the window open overnight, then the build fails (as it has done now). The explorer window left opened points at one of the sub... | In a situation where a shared folder is locked due to an open Explorer window (or any other process), there are a few options you can explore to try and release the lock without rebooting the build machine. Here are some potential approaches:
1. **Using Computer Management**:
- Open the Computer Management console... | 38,268 | [
{
"from": "human",
"value": "This problem crops up every now and then at work. Our build machine can have it's files accessed via a normal windows file share. If someone browses a folder remotely on the machine, and leaves the window open overnight, then the build fails (as it has done now). The explorer wi... |
Can someone please let me know how to get the different segments of the three rows that are intersecting in different ways using SQL? The three rows in #t2 represent sets A,B, C - I am looking for A I B, A I C, B I C, A I B I C, A' , B', C' etc., (7 possible segments with 3 rows as in a Venn diagram) where I is the Int... | To achieve the results you're looking for, we can use SQL to define the intersections and differences of the sets defined in your `#t2` table. Specifically, we will use Common Table Expressions (CTEs) to define the various sets and their intersections/differences. We will then combine the results to produce the desired... | 33,890 | [
{
"from": "human",
"value": "Can someone please let me know how to get the different segments of the three rows that are intersecting in different ways using SQL? The three rows in #t2 represent sets A,B, C - I am looking for A I B, A I C, B I C, A I B I C, A' , B', C' etc., (7 possible segments with 3 rows... |
I'm currently displaying a UIViewController like this:
[[self navigationController] presentModalViewController:modalViewController animated:YES];
and hiding it like this:
[self.navigationController dismissModalViewControllerAnimated:YES];
The animation is "slide up from the bottom"... then slide back down. How can I... | In iOS, if you want to customize the presentation and dismissal of a `UIViewController`, you should consider using the `UIModalPresentationStyle` and also the `UIViewControllerAnimatedTransitioning` protocol for a custom animation.
To change the animation style to a fade effect, follow these steps:
1. **Set the Modal... | 35,529 | [
{
"from": "human",
"value": "I'm currently displaying a UIViewController like this:\n[[self navigationController] presentModalViewController:modalViewController animated:YES];\n\nand hiding it like this:\n[self.navigationController dismissModalViewControllerAnimated:YES];\n\nThe animation is \"slide up from... |
Javascript usage has gotten remarkably more sophisticated and powerful in the past five years. One aspect of this sort of functional programming I struggle with, esp with Javascript’s peculiarities, is how to make clear either through comments or code just what is happening. Often this sort of code takes a while to dec... | Improving code clarity, especially in a language like JavaScript that supports functional programming paradigms, is crucial for maintainability and collaboration. Here are several techniques you can use to make your code more understandable:
### 1. **Use Descriptive Naming Conventions**
- **Functions and Variables*... | 33,778 | [
{
"from": "human",
"value": "Javascript usage has gotten remarkably more sophisticated and powerful in the past five years. One aspect of this sort of functional programming I struggle with, esp with Javascript’s peculiarities, is how to make clear either through comments or code just what is happening. Oft... |
To be able to upload large files from a HTML page to a FTP server, I am looking for a Java/Flash FTP upload applet.
I really like the way dhtmlxVault works, but I need it to upload to a FTP server instead of a HTTP file upload.
It would be really nice if the applet has no GUI of it's own, but instead is fully scriptabl... | To achieve FTP uploads from an HTML page, you have a few options, though finding a pure Java/Flash solution that meets all your criteria can be a bit challenging due to the decline in Flash support and the general move towards more modern technologies. Here are a few suggestions to help you get started with FTP uploads... | 34,987 | [
{
"from": "human",
"value": "To be able to upload large files from a HTML page to a FTP server, I am looking for a Java/Flash FTP upload applet.\nI really like the way dhtmlxVault works, but I need it to upload to a FTP server instead of a HTTP file upload.\nIt would be really nice if the applet has no GUI ... |
I want to access remote server using my program (C# .NET) and execute there a program in the context of connected user, just like using Remote Desktop.
I don't want just run a program using some user account(like RunAs), but to have a separate execution session like Remote Desktop
I guess terminal services should be us... | To achieve the functionality you're describing—executing a program on a remote server in the context of the connected user with a separate execution session similar to Remote Desktop—you'll need to work with Remote Desktop Services (RDS) in Windows. This typically involves creating a new session for a user on a remote ... | 35,818 | [
{
"from": "human",
"value": "I want to access remote server using my program (C# .NET) and execute there a program in the context of connected user, just like using Remote Desktop.\nI don't want just run a program using some user account(like RunAs), but to have a separate execution session like Remote Desk... |
I'm using Lucene.net, but I am tagging this question for both .NET and Java versions because the API is the same and I'm hoping there are solutions on both platforms.
I'm sure other people have addressed this issue, but I haven't been able to find any good discussions or examples.
By default, Lucene is very picky abo... | Handling user queries in Lucene.NET (or its Java counterpart) can be challenging due to the strict syntax requirements of the query parser. Here are several strategies you can use to mitigate issues with `ParseException` while ensuring a more user-friendly search experience:
### 1. **Query Preprocessing/Cleansing**
Be... | 37,190 | [
{
"from": "human",
"value": "I'm using Lucene.net, but I am tagging this question for both .NET and Java versions because the API is the same and I'm hoping there are solutions on both platforms.\nI'm sure other people have addressed this issue, but I haven't been able to find any good discussions or exampl... |
I recently switched a project from MySQL InnoDB to PostgreSQL, and I feel bigger lags when inserting and updating data with ajax. This may be subjective. I know the Django devs recommend postgres and I know psycopg2 is supposed to be faster than MysqlDB. Personaly I like the way postgres enforces database integrity, bu... | Switching from MySQL InnoDB to PostgreSQL can lead to differences in performance, particularly in the context of AJAX-based applications, but the experience can vary widely depending on multiple factors. Here are some considerations that might help you understand the performance implications and possibly address your c... | 37,600 | [
{
"from": "human",
"value": "I recently switched a project from MySQL InnoDB to PostgreSQL, and I feel bigger lags when inserting and updating data with ajax. This may be subjective. I know the Django devs recommend postgres and I know psycopg2 is supposed to be faster than MysqlDB. Personaly I like the way... |
Before I explain what I'm trying to do, note that I have the good fortune of only having to target Webkit (meaning, I can use lots of neat CSS).
So, basically, I want to have a block with a flexible height, position fixed, maximum height being that of the available window height, with some elements at the top and botto... | Yes, you can achieve the layout you're describing using only CSS, especially since you're targeting WebKit. You can make use of CSS Flexbox to create a container with a fixed position that allows the top and bottom items to remain visible while providing a scrollable area in the middle. Here’s how you can do it:
### H... | 38,375 | [
{
"from": "human",
"value": "Before I explain what I'm trying to do, note that I have the good fortune of only having to target Webkit (meaning, I can use lots of neat CSS).\nSo, basically, I want to have a block with a flexible height, position fixed, maximum height being that of the available window heigh... |
How does one choose the size of a buffer (bytes I read from or write to socket) for the maximum throughput when implementing a low-level HTTP and FTP transfer? My application should transfer data with HTTP or FTP on connections varying from 130 Kbps to 3 Mbps (I know the expected speed beforehand). Sometimes it's a one... | When optimizing buffer sizes for maximum throughput in low-level HTTP and FTP transfers, several factors need to be considered, including the characteristics of the connection and the nature of the data transfer. Below are key considerations and recommendations on how to choose buffer sizes for your specific use case:
... | 36,797 | [
{
"from": "human",
"value": "How does one choose the size of a buffer (bytes I read from or write to socket) for the maximum throughput when implementing a low-level HTTP and FTP transfer? My application should transfer data with HTTP or FTP on connections varying from 130 Kbps to 3 Mbps (I know the expecte... |
I have an XML document that I'm trying to style via CSS. A relevant snippet of this XML looks like this:
<senseBlock>
<prelim>Not numbered</prelim>
<sense>first item</sense>
<sense>second item</sense>
<sense>third item</sense>
</senseBlock>
I need to present the <sense> elements as an ordered list, bu... | You are right that styling based on the number of child elements can be tricky with pure CSS. CSS doesn't provide a built-in way to conditionally style elements based on the number of siblings or children. However, you can use some clever techniques to achieve your goal.
One approach is to use a combination of CSS an... | 35,129 | [
{
"from": "human",
"value": "I have an XML document that I'm trying to style via CSS. A relevant snippet of this XML looks like this:\n<senseBlock>\n <prelim>Not numbered</prelim>\n <sense>first item</sense>\n <sense>second item</sense>\n <sense>third item</sense>\n</senseBlock>\n\nI need to pr... |
I've inherited a body of Visual C++ source that consists of about a dozen sub-projects. One of these is an empty "MakeAll" project that depends on all the others, so I can build the entire project by setting the MakeAll project active and selecting "Build All."
I'd like to automate this process, and coming from a linu... | In a Visual C++ environment, especially when dealing with multiple projects and solutions, it's quite common to want to automate builds similar to how one would with a Makefile in a Linux environment. While the traditional make approach doesn't directly apply, Visual Studio provides its own mechanisms for command-line ... | 38,520 | [
{
"from": "human",
"value": "I've inherited a body of Visual C++ source that consists of about a dozen sub-projects. One of these is an empty \"MakeAll\" project that depends on all the others, so I can build the entire project by setting the MakeAll project active and selecting \"Build All.\"\nI'd like to... |
I have a problem when I try to center the div block "products" because I don't know in advance the div width. Anybody have a solution?
Update: The problem I have is I don't know how many products I'll display, I can have 1, 2 or 3 products, I can center them if it was a fixed number as I'd know the width of the parent... | To center a dynamic number of product divs within a parent container without knowing the width in advance, you can use CSS Flexbox. Flexbox is well-suited for this kind of layout because it allows for flexible alignment and distribution of space among items in a container.
Here's how you can modify your existing CSS t... | 35,150 | [
{
"from": "human",
"value": "I have a problem when I try to center the div block \"products\" because I don't know in advance the div width. Anybody have a solution?\nUpdate: The problem I have is I don't know how many products I'll display, I can have 1, 2 or 3 products, I can center them if it was a fixe... |
i'm currently experimenting using PixelShaders introduced with .net 3.5 sp1 to improve image processing performance. everything is much faster , but til yet i just had effects applied to some elements in my wpf forms, that i actually want to avoid.
we have a bunch of image processing functionality and i'd like to repla... | Yes, you can apply a PixelShader to an `ImageSource` without displaying it in a WPF application. You can use a `RenderTargetBitmap` to render the effects of the pixel shader to an image in memory instead of displaying it on a UI element.
Here's a step-by-step guide on how to achieve this:
1. **Create the Pixel Shader... | 37,294 | [
{
"from": "human",
"value": "i'm currently experimenting using PixelShaders introduced with .net 3.5 sp1 to improve image processing performance. everything is much faster , but til yet i just had effects applied to some elements in my wpf forms, that i actually want to avoid.\nwe have a bunch of image proc... |
I have a C#/.NET program that can run both as a console application and as a service.
Currently I give it a command-line option to start as a console application, but I would like to avoid that.
Is it possible to programmatically detect whether my program is being started as a service?
If it was pure Win32, I could tr... | Yes, you can programmatically detect whether your C#/.NET application is running as a Windows Service or as a Console Application without relying on command-line arguments. The key is to check the presence of a Windows Service control manager. Here's a straightforward approach you can use:
1. **Check for a Windows Ser... | 37,202 | [
{
"from": "human",
"value": "I have a C#/.NET program that can run both as a console application and as a service.\nCurrently I give it a command-line option to start as a console application, but I would like to avoid that.\nIs it possible to programmatically detect whether my program is being started as a... |
I have an AJAX form that I am creating in my MVC project. If the form is submitted using normal browser function and a page refresh occurs I get validation information rendered in the form (the built in MVC validation based on ViewData.ModelState).
Is there a similiar validation mechanism for AJAX forms?
<% using (Aja... | Yes, you can implement validation for AJAX forms in ASP.NET MVC similar to how you would for a normal form submission. The key difference is that, with AJAX, you will handle the validation messages on the client-side using JavaScript, rather than relying on server-side rendering of the validation messages during a full... | 38,893 | [
{
"from": "human",
"value": "I have an AJAX form that I am creating in my MVC project. If the form is submitted using normal browser function and a page refresh occurs I get validation information rendered in the form (the built in MVC validation based on ViewData.ModelState).\nIs there a similiar validati... |
I have some javascript menu code that works just fine from a separate directory.
But, when I try to call the same .js files from within the same directory, it won't see the files.
The following works from another directory:
script type="text/javascript"> var vbImgPath="../00-Menu-Files/"
But, if I do this from within t... | It sounds like you've encountered an interesting situation with your file paths in JavaScript. When working with file paths in web applications, understanding how relative paths work is crucial.
### Relative Paths Explained
1. **Current Directory (`.`)**:
- Refers to the directory where the current document (HTML ... | 38,406 | [
{
"from": "human",
"value": "I have some javascript menu code that works just fine from a separate directory.\nBut, when I try to call the same .js files from within the same directory, it won't see the files.\nThe following works from another directory:\nscript type=\"text/javascript\"> var vbImgPath=\"../... |
Is there a way to access the DOM of the document in an iframe from parent doc if the doc in the iframe is on another domain? I can easily access it if both parent and child pages are on the same domain, but I need to be able to do that when they are on different domains.
If not, maybe there is some other way to READ th... | Accessing the DOM of a document in an iframe that is hosted on a different domain from the parent document is restricted by the Same-Origin Policy (SOP) implemented in web browsers. The Same-Origin Policy is a critical security measure that prevents malicious scripts on one page from accessing sensitive data on another... | 40,019 | [
{
"from": "human",
"value": "Is there a way to access the DOM of the document in an iframe from parent doc if the doc in the iframe is on another domain? I can easily access it if both parent and child pages are on the same domain, but I need to be able to do that when they are on different domains.\nIf not... |
Is there a way to tunnel a proxy to access a remote sql server database on visual studio 2008?
I'm working in a project at college that uses a sql server database but the access is restricted to the internal network. I'd like to access the database from my home too.
Thanks in advance.
| Accessing a remote SQL Server database from outside its network requires a secure approach, especially when dealing with sensitive data. Here are some options you can consider to tunnel a proxy or otherwise securely access the SQL Server from your home.
### Option 1: VPN (Virtual Private Network)
1. **Setup a VPN**: ... | 34,225 | [
{
"from": "human",
"value": "Is there a way to tunnel a proxy to access a remote sql server database on visual studio 2008?\nI'm working in a project at college that uses a sql server database but the access is restricted to the internal network. I'd like to access the database from my home too.\nThanks in ... |
I need some basic CMS functionality with rich text editing. On stack overflow there is a regular textarea edit control, with support for Markdown style syntax formatting. That would be beyond my users, so I want something like a rich edit control that you can type into on the web site. I know it is possible, as loads o... | Creating a basic content management system (CMS) with rich text editing capabilities on a web page is a common requirement. You can achieve this using various libraries and frameworks that simplify the process of implementing a rich text editor. Here's a step-by-step guide to get you started.
### Step 1: Choose a Rich... | 36,509 | [
{
"from": "human",
"value": "I need some basic CMS functionality with rich text editing. On stack overflow there is a regular textarea edit control, with support for Markdown style syntax formatting. That would be beyond my users, so I want something like a rich edit control that you can type into on the we... |
I have an application that imports data from a pickled file. It works just fine in Windows but Mac and Linux behaviour is odd.
In OS X, the pickled file (file extension ".char") is unavailable as a selection unless I set the file type to *.*. Then, if I select a file that has the .char extension, it won't load, giving ... | The issues you are encountering with pickling and file handling in different operating systems stem from a couple of areas that may need adjustments. Here are some troubleshooting steps and recommendations to help resolve the problems you're facing:
### 1. File Mode When Opening Pickled Files
When working with pickled... | 35,035 | [
{
"from": "human",
"value": "I have an application that imports data from a pickled file. It works just fine in Windows but Mac and Linux behaviour is odd.\nIn OS X, the pickled file (file extension \".char\") is unavailable as a selection unless I set the file type to *.*. Then, if I select a file that has... |
I have an Ubuntu Server (with all of LAMP and Subversion installed). I use Eclipse with Subclipse, PDT and a few other great addins and use those exclusively to develop applications. The problem I'm having is that I'm developing on a Windows Vista machine and transferring everything to the remote Linux server.
Howe... | Absolutely! You have several options to set up a development environment that mimics your Linux server on your Windows Vista machine. Here are some solutions you can consider, keeping in mind that you want something low-cost:
### 1. **Use a Virtual Machine**
You can use virtualization software to run a Linux distribut... | 37,290 | [
{
"from": "human",
"value": "I have an Ubuntu Server (with all of LAMP and Subversion installed). I use Eclipse with Subclipse, PDT and a few other great addins and use those exclusively to develop applications. The problem I'm having is that I'm developing on a Windows Vista machine and transferring ever... |
I would like to know how to get the name of the property that a method parameter value came from. The code snippet below shows what I want to do:
Person peep = new Person();
Dictionary<object, string> mapping = new Dictionary<object, string>();
mapping[peep.FirstName] = "Name";
Dictionary<string, string> propertyToStri... | To achieve your goal of getting the property name from the object in a `Dictionary<object, string>`, you can use reflection to identify the property that the value originates from. Below is an updated version of your code that uses reflection to achieve this:
```csharp
using System;
using System.Collections.Generic;
u... | 39,546 | [
{
"from": "human",
"value": "I would like to know how to get the name of the property that a method parameter value came from. The code snippet below shows what I want to do:\nPerson peep = new Person();\nDictionary<object, string> mapping = new Dictionary<object, string>();\nmapping[peep.FirstName] = \"Nam... |
The following code returns data from a spreadsheet into a grid perfectly
[
string excelConnectString = "Provider = Microsoft.Jet.OLEDB.4.0;" +
"Data Source = " + excelFileName + ";" +
"Extended Properties = Excel 8.0;";
OleDbConnection objConn = new OleDbConnection(excelConnectS... | To achieve the desired functionality, you can follow two different approaches:
1. **Modify the OleDbCommand Query**:
You can directly modify the SQL query string you are passing to `OleDbCommand` to include your custom query. Make sure your column names match the headers in the Excel sheet.
2. **Using DataTable an... | 33,605 | [
{
"from": "human",
"value": "The following code returns data from a spreadsheet into a grid perfectly\n[\n string excelConnectString = \"Provider = Microsoft.Jet.OLEDB.4.0;\" +\n \"Data Source = \" + excelFileName + \";\" +\n \"Extended Properties = Excel 8.0;\";\n\n OleD... |
I have an asp.net application that should access data from two SQL Servers. One of the SQL Servers is present on the same machine as IIS (let us call it SQLSERVER1) whereas the other SQL server is present on another machine (SQLSERVER2).
The connection strings are trusted for both the SQL servers. Impersonation has bee... | The issue you're encountering seems to be related to how Windows authentication works in a distributed environment with multiple servers. When using Windows authentication, the client's Windows credentials need to be passed to the SQL Server being accessed. In your case, it appears that when trying to connect to `SQLSE... | 17,915 | [
{
"from": "human",
"value": "I have an asp.net application that should access data from two SQL Servers. One of the SQL Servers is present on the same machine as IIS (let us call it SQLSERVER1) whereas the other SQL server is present on another machine (SQLSERVER2).\nThe connection strings are trusted for b... |
I need WCF service with 3 endpoints
High
Normal
Low
Most of messages will come through Normal and Low Endpoints.
If Message on High will appear it have to be processed asap.
Does anyone knows how to do it ???
| Sure! To create a WCF (Windows Communication Foundation) service with three different endpoints (High, Normal, and Low), we can define a service contract and configure the endpoints in the WCF service host. Below is a step-by-step guide to help you implement this.
### Step 1: Create the WCF Service
1. **Create a WCF ... | 16,599 | [
{
"from": "human",
"value": "I need WCF service with 3 endpoints \n\nHigh\nNormal\nLow\n\nMost of messages will come through Normal and Low Endpoints. \nIf Message on High will appear it have to be processed asap.\nDoes anyone knows how to do it ???\n"
},
{
"from": "gpt",
"value": "Sure! To crea... |
As we do not implement the users of our applications as users in SQL server, when the application server connects to a database each application always uses the same credentials to attach to each database.
This presents an auditing problem. Using triggers, we want to store every update, insert and delete and attribute ... | Using the `Application Name` property in your connection string and retrieving it within triggers to attribute changes to users can be a feasible approach for auditing, but it does come with some considerations and potential drawbacks. Let's go through them:
### Advantages:
1. **Simplicity**: You avoid modifying every... | 38,243 | [
{
"from": "human",
"value": "As we do not implement the users of our applications as users in SQL server, when the application server connects to a database each application always uses the same credentials to attach to each database.\nThis presents an auditing problem. Using triggers, we want to store ever... |
I have a folder with these files:
alongfilename1.txt <--- created first
alongfilename3.txt <--- created second
When I run DIR /x in command prompt, I see these short names assigned:
ALONGF~1.TXT alongfilename1.txt
ALONGF~2.TXT alongfilename3.txt
Now, if I add another file:
alongfilename1.txt
alongfilename2.txt <--- ... | In Windows, the short names (also known as 8.3 names) are generated based on the long file names when the files are created. The format of the short name follows the pattern of a prefix followed by a tilde (~) and a number to distinguish between files that might have similar prefixes.
### Regarding the Assignment of S... | 38,920 | [
{
"from": "human",
"value": "I have a folder with these files:\nalongfilename1.txt <--- created first\nalongfilename3.txt <--- created second\n\nWhen I run DIR /x in command prompt, I see these short names assigned:\nALONGF~1.TXT alongfilename1.txt\nALONGF~2.TXT alongfilename3.txt\n\nNow, if I add another f... |
I get the following error on the second line of the code below:
The error is:
Property "Pages" does not contain support for type PageContentCollection.
Here is my complete code:
<FixedDocument Name="customerReport">
<PageContent>
<FixedPage>
<Label FontSize="20" Margin="100,20,0,0">... | The error message you're encountering, "Property 'Pages' does not contain support for type PageContentCollection," indicates that the structure of your `FixedDocument` is not set up correctly. The `FixedDocument` expects its pages to be of type `PageContent`, but the way you're currently nesting elements is incorrect.
... | 40,079 | [
{
"from": "human",
"value": "I get the following error on the second line of the code below: \n\nThe error is:\nProperty \"Pages\" does not contain support for type PageContentCollection. \nHere is my complete code: \n <FixedDocument Name=\"customerReport\">\n\n <PageContent>\n <FixedPage>\... |
I would like to know how to put all of my ListView rows into edit mode at once. I am not looking for the traditional behavior of editing each row one at a time. The answer can be in either C# or VB.NET.
Also, if possible, any sample code of saving each row's changes after all rows have been edited.
| To put all rows of a `ListView` into edit mode at once in a WinForms application, you can use a combination of custom controls or edit controls (like `TextBox` or `ComboBox`) placed on top of the `ListView` to allow in-place editing of all items.
Here's a way to achieve that, along with saving the changes after editin... | 38,562 | [
{
"from": "human",
"value": "I would like to know how to put all of my ListView rows into edit mode at once. I am not looking for the traditional behavior of editing each row one at a time. The answer can be in either C# or VB.NET.\nAlso, if possible, any sample code of saving each row's changes after all... |
Is there any way to save the state of vim settings with a document?
To clarify: I'm editing a document and I change a bunch of settings. I don't necessarily recall which; and I don't want to use these settings again, except for the current document. I don't want to manually try to remember what I've changed; or what th... | To achieve the goal of saving the Vim settings for a specific document and automatically loading them, you can follow a multi-step approach using Vim's autocommands and scripting capabilities. While there isn't a built-in feature that does exactly what you're looking for, you can create a workflow that approximates it.... | 36,156 | [
{
"from": "human",
"value": "Is there any way to save the state of vim settings with a document?\nTo clarify: I'm editing a document and I change a bunch of settings. I don't necessarily recall which; and I don't want to use these settings again, except for the current document. I don't want to manually try... |
I have an application where I'm dynamically loading routes by a model, and calling ActionController::Routing::Routes.reload! after creating/updating that model. The problem is that after doing this, I'm receiving the following error when I try to hit that new route:
ActionController::MethodNotAllowed
Only get, head, po... | It looks like you're experiencing a `MethodNotAllowed` error in your Rails application when trying to access newly created routes after reloading the routes dynamically. This can happen due to various reasons, particularly when routes are not properly recognized or misconfigured after the reload.
Here are some steps a... | 39,235 | [
{
"from": "human",
"value": "I have an application where I'm dynamically loading routes by a model, and calling ActionController::Routing::Routes.reload! after creating/updating that model. The problem is that after doing this, I'm receiving the following error when I try to hit that new route:\nActionContr... |
In Flex I have a lot of Move effects and AnimateProperty effects.
What I have found in several different places in my code is that far too frequently the effect stops halfway through for no apparent reason.
I have found this in numerous places in my application and it occurs whether or not I am doin something particula... | Yes, this is a common issue that can occur with animations in Flex applications. There are several potential reasons why `Move` and `AnimateProperty` effects might stop midway:
1. **Conflicting Effects**: If you have multiple animations affecting the same properties or components simultaneously, it can cause conflicts... | 38,739 | [
{
"from": "human",
"value": "In Flex I have a lot of Move effects and AnimateProperty effects.\nWhat I have found in several different places in my code is that far too frequently the effect stops halfway through for no apparent reason.\nI have found this in numerous places in my application and it occurs w... |
Something is eluding me ... it seems obvious, but I can't quite figure it out.
I want to add/remove a couple of HTML controls to a page (plain old html) when a user changes value of a dropdown list. An example is to add or remove a "number of guests in this room" textbox for each (of a number) of rooms requested ...
... | Certainly! You can achieve this functionality using plain HTML and JavaScript. Below is a simple example demonstrating how to add or remove text boxes based on the number of rooms selected from a dropdown list.
### HTML Code:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="v... | 38,521 | [
{
"from": "human",
"value": "Something is eluding me ... it seems obvious, but I can't quite figure it out.\nI want to add/remove a couple of HTML controls to a page (plain old html) when a user changes value of a dropdown list. An example is to add or remove a \"number of guests in this room\" textbox for... |
C++11 introduces user-defined literals which will allow the introduction of new literal syntax based on existing literals (int, hex, string, float) so that any type will be able to have a literal presentation.
Examples:
// imaginary numbers
std::complex<long double> operator "" _i(long double d) // cooked form
{
r... | User-defined literals in C++11 indeed introduce a powerful way to create more expressive and readable code by allowing custom literal suffixes for types that extend beyond the built-in types. While the examples you provided demonstrate some creative uses, their practicality and effectiveness often depend on the context... | 36,848 | [
{
"from": "human",
"value": "C++11 introduces user-defined literals which will allow the introduction of new literal syntax based on existing literals (int, hex, string, float) so that any type will be able to have a literal presentation.\nExamples:\n// imaginary numbers\nstd::complex<long double> operator ... |
I have a folder in NTFS that contains tens of thousands of files. I've deleted all files in that folder, save 1. I ran contig.exe to defragment that folder so now it's in 1 fragment only. However, the size of that folder is still 8MB in size. This implies that there's a lot of gap in the index. Why is that? If I delete... | Your observations about NTFS and how it manages files and the Master File Table (MFT) are quite insightful. Let’s break down your question and address it step-by-step.
### Why Does the Folder Still Show Size After Deleting Files?
When you delete files in an NTFS volume, the file system marks the space occupied by tho... | 38,386 | [
{
"from": "human",
"value": "I have a folder in NTFS that contains tens of thousands of files. I've deleted all files in that folder, save 1. I ran contig.exe to defragment that folder so now it's in 1 fragment only. However, the size of that folder is still 8MB in size. This implies that there's a lot of g... |
Is it possible to enable a second monitor programatically and extend the Windows Desktop onto it in C#? It needs to do the equivalent of turning on the checkbox in the image below.
| Yes, it is possible to enable a second monitor and extend the Windows desktop onto it programmatically in C#. To do this, you can use the Windows API through P/Invoke to interact with display settings.
Here's a simplified overview of how you can achieve this:
1. **Get the current display settings** using the `EnumDis... | 30,213 | [
{
"from": "human",
"value": "Is it possible to enable a second monitor programatically and extend the Windows Desktop onto it in C#? It needs to do the equivalent of turning on the checkbox in the image below.\n\n"
},
{
"from": "gpt",
"value": "Yes, it is possible to enable a second monitor and ... |
I recently had a problem during the deployment of a windows service. Four computers did not cause any problems, but on the fifth any attempt to start the service failed due to an exception. The exception stack trace is written to the event log, so I though it should be easy to identify the cause:
protected override voi... | Writing to the event log in a Windows service can indeed lead to issues if the event log is full or configured in such a way that it doesn't allow for new entries. To ensure that your service can handle these scenarios gracefully, you might consider the following best practices:
### 1. **Use Try-Catch for Event Log Wr... | 36,511 | [
{
"from": "human",
"value": "I recently had a problem during the deployment of a windows service. Four computers did not cause any problems, but on the fifth any attempt to start the service failed due to an exception. The exception stack trace is written to the event log, so I though it should be easy to i... |
My webapp is part of a larger EAR that is deployed into a websphere server. The server hosts number of other apps on the same virtual server. My webapp has some initialisation/health checks in a servletContextListener->contextInitialized method. I want to make the webapp unavailable if initialisation/health checks fail... | If you want to ensure that your web application becomes unavailable when the initialization or health checks fail, throwing a `RuntimeException` from the `contextInitialized` method of your `ServletContextListener` is a common approach. However, it's important to understand how this affects your application and the ent... | 40,066 | [
{
"from": "human",
"value": "My webapp is part of a larger EAR that is deployed into a websphere server. The server hosts number of other apps on the same virtual server. My webapp has some initialisation/health checks in a servletContextListener->contextInitialized method. I want to make the webapp unavail... |
Building the same project (without any changes) produces binary different exe-files: some small regions of them are different. Empty project, version information (and auto-increment on every build) is turned off.
Why it happens? And is it possible to make delphi produce binary equal files for the same projects?
| The phenomenon you're experiencing, where builds of the same Delphi project yield different binary output files, can stem from several factors. Here's a breakdown of why this happens and what you can do to create consistent outputs:
### Reasons for Binary Differences
1. **Compiler Optimizations**: The Delphi compiler... | 38,304 | [
{
"from": "human",
"value": "Building the same project (without any changes) produces binary different exe-files: some small regions of them are different. Empty project, version information (and auto-increment on every build) is turned off.\nWhy it happens? And is it possible to make delphi produce binary ... |
When uploading some image/audio/video files in the same batch I want the file selected in the one field should not get accepted in the other buttons. How can I achieve this?
| To ensure that files selected in one upload field are not accepted in other upload fields when uploading image, audio, or video files in the same batch, you can implement client-side validation using JavaScript. Here's a basic outline of how you might approach this:
### HTML Structure
You can set up your file input f... | 35,292 | [
{
"from": "human",
"value": "When uploading some image/audio/video files in the same batch I want the file selected in the one field should not get accepted in the other buttons. How can I achieve this?\n"
},
{
"from": "gpt",
"value": "To ensure that files selected in one upload field are not ac... |
I am using MVC architecture for a GUI application. The model class has some C functions. One of the C functions calls some methods of Objective-C class. I call those methods using an object of that class. The strange thing happening is that methods previously to the an xyz method are called perfectly but when that xyz ... | Debugging issues like the one you're facing can be tricky, especially when you're dealing with a mix of C and Objective-C. Here are several potential causes and steps to investigate the problem:
1. **Check for Memory Management Issues**:
- If you're using manual reference counting (MRC) with Objective-C, ensure tha... | 36,268 | [
{
"from": "human",
"value": "I am using MVC architecture for a GUI application. The model class has some C functions. One of the C functions calls some methods of Objective-C class. I call those methods using an object of that class. The strange thing happening is that methods previously to the an xyz metho... |
I'm looking for ideas/elements of a user interface for a device I'm making. Full description (and video of development setup) here.
In short:
It's essentially a direction finder, so I'm starting off thinking, "Compass" but wondering what other design patterns would fit
There isn't much interface to a compass - what k... | Hi Adam,
That sounds like a fascinating project! Here are some ideas and elements for your user interface, tailored to a direction finder for kids, as well as resources for low-level graphics programming.
### User Interface Ideas
1. **Compass Rose**: A classic design with a rotating compass rose can be effective. Ho... | 31,531 | [
{
"from": "human",
"value": "I'm looking for ideas/elements of a user interface for a device I'm making. Full description (and video of development setup) here.\nIn short:\n\nIt's essentially a direction finder, so I'm starting off thinking, \"Compass\" but wondering what other design patterns would fit\nT... |
I need to get an appointment into someone's Outlook calendar based on requests from their employees. The application runs in SharePoint (WSS 3.0). My first impressions are to use iCal or send meeting requests, but I haven't done either before & I'm looking for a very quick & easy way to get it done. Any ideas?
| To get an appointment into someone's Outlook calendar based on requests from their employees, especially if you're working with SharePoint (WSS 3.0), there are a couple of approaches you can take. Here’s a quick breakdown of your options:
### Option 1: Send Meeting Requests via Email
1. **Gather Details**: Collect the... | 35,104 | [
{
"from": "human",
"value": "I need to get an appointment into someone's Outlook calendar based on requests from their employees. The application runs in SharePoint (WSS 3.0). My first impressions are to use iCal or send meeting requests, but I haven't done either before & I'm looking for a very quick & eas... |
I am trying to assign the onclick event to an anchor tag that already exists when I click on another element. However, everything I've tried seems to result in the firing of the event immediately after assignment. We're using Prototype and Scriptaculous.
This is the function:
<script type="text/javascript">
fu... | The issue you're experiencing arises from the way you're assigning the event handler to the anchor tag. In JavaScript (and by extension, Prototype), when you assign a function directly as an event handler, you should not invoke the function immediately. Instead, you need to pass a reference to the function.
In your ca... | 38,405 | [
{
"from": "human",
"value": "I am trying to assign the onclick event to an anchor tag that already exists when I click on another element. However, everything I've tried seems to result in the firing of the event immediately after assignment. We're using Prototype and Scriptaculous.\nThis is the function:\n... |
I work for a ticketing agency and we print out tickets on our own ticket printer. I have been straight coding the ticket designs and storing the templates in a database. If we need a new field adding to a ticket I manually add it and use the arcane co-ordinate system to estimate where the fields should go and how much ... | Creating a simple graphical editor for your ticket design is a great project! Since you're looking for resources and tutorials that specifically address drawing objects and handling mouse events in a graphical interface, I'll suggest a few different approaches depending on the programming language and framework you're ... | 33,761 | [
{
"from": "human",
"value": "I work for a ticketing agency and we print out tickets on our own ticket printer. I have been straight coding the ticket designs and storing the templates in a database. If we need a new field adding to a ticket I manually add it and use the arcane co-ordinate system to estimate... |
In relation to another question, how do you account for paths that may change? For example, if a program is calling a file in the same directory as the program, you can simply use the path ".\foo.py" in *nix. However, apparently Windows likes to have the path hard-coded, e.g. "C:\Python_project\foo.py".
What happens if... | When dealing with file paths in a cross-platform manner, you should avoid hard-coded paths that depend on specific drive letters or operating system conventions. Instead, it's better to use relative paths and the capabilities of Python's built-in modules like `os` and `pathlib`.
Here's how you can manage paths so that... | 39,152 | [
{
"from": "human",
"value": "In relation to another question, how do you account for paths that may change? For example, if a program is calling a file in the same directory as the program, you can simply use the path \".\\foo.py\" in *nix. However, apparently Windows likes to have the path hard-coded, e.g.... |
For loading time considerations I am using a runtime css file in my Flex Application.
I am having a problem with a multi line text control :
<mx:Text id="txtDescription" selectable="false"
styleName="imageRolloverButtonTextDark" width="100%" textAlign="center"
text="{_rolloverText}"/>
When my CSS stylesheet has loaded... | In Flex applications, when you change the styles of a component dynamically using CSS, the component does not always automatically recalculate its height based on the new text style, especially when the text is not visible at the time of style application.
Since you mentioned that your `Text` control is not visible in... | 37,221 | [
{
"from": "human",
"value": "For loading time considerations I am using a runtime css file in my Flex Application.\nI am having a problem with a multi line text control :\n<mx:Text id=\"txtDescription\" selectable=\"false\"\nstyleName=\"imageRolloverButtonTextDark\" width=\"100%\" textAlign=\"center\"\ntext... |
When building REST web services in .NET, what is the most "RESTful" way of mapping System.ArgumentNullException and System.ArgumentException to HTTP status codes? My first guess would be to use HTTP 400/Bad Request with an appropriate description.What is the recommended best practice when mapping exceptions to HTTP sta... | When building REST web services in .NET (or any framework), mapping exceptions to HTTP status codes is crucial for communicating errors to the client effectively. The general approach to handling exceptions like `System.ArgumentNullException` and `System.ArgumentException` is indeed to use the HTTP 400 Bad Request stat... | 36,352 | [
{
"from": "human",
"value": "When building REST web services in .NET, what is the most \"RESTful\" way of mapping System.ArgumentNullException and System.ArgumentException to HTTP status codes? My first guess would be to use HTTP 400/Bad Request with an appropriate description.What is the recommended best p... |
MSTest produces an XML file with a .trx extension containing test results.
If I have a .trx file on a machine without Visual Studio installed, I get prompted to "Use the Web Service..." or "Select from a list...", which is expected.
If I have a .trx file on my development machine and I open it, it opens in Visual Studi... | To configure Internet Explorer (IE) to open `.trx` files with Visual Studio or prompt for their handling when downloaded from a web server, you can follow several approaches. Unfortunately, IE does tend to focus on content type rather than file extension when handling downloads, which complicates matters a bit. Here ar... | 34,101 | [
{
"from": "human",
"value": "MSTest produces an XML file with a .trx extension containing test results.\nIf I have a .trx file on a machine without Visual Studio installed, I get prompted to \"Use the Web Service...\" or \"Select from a list...\", which is expected.\nIf I have a .trx file on my development ... |
I have a read query that I execute within a transaction so that I can specify the isolation level. Once the query is complete, what should I do?
Commit the transaction
Rollback the transaction
Do nothing (which will cause the transaction to be rolled back at the end of the using block)
What are the implications of ... | When working with transactions in a database, it's important to understand the implications of committing or rolling back a transaction, even when it does not modify data. Let's analyze the three options you presented in the context of your code snippet.
### 1. Commit the Transaction
**Implications:**
- **Performance... | 36,266 | [
{
"from": "human",
"value": "I have a read query that I execute within a transaction so that I can specify the isolation level. Once the query is complete, what should I do?\n\nCommit the transaction \nRollback the transaction\nDo nothing (which will cause the transaction to be rolled back at the end of th... |
I have a rather large (many gigabytes) table of data in SQL Server that I wish to move to a table in another database on the same server.
The tables are the same layout.
What would be the most effecient way of going about doing this?
This is a one off operation so no automation is required.
Many thanks.
| Transferring a large table between databases on the same SQL Server instance can be efficiently accomplished using several methods. Here are some common approaches:
### 1. **Using `INSERT INTO ... SELECT` Statement**
This method is straightforward and works well for transferring data between tables in different datab... | 36,861 | [
{
"from": "human",
"value": "I have a rather large (many gigabytes) table of data in SQL Server that I wish to move to a table in another database on the same server.\nThe tables are the same layout.\nWhat would be the most effecient way of going about doing this?\nThis is a one off operation so no automati... |
I'm testing how the classes FileStream and StreamReader work togheter. Via a Console application.
I'm trying to go in a file and read the lines and print them on the console.
I've been able to do it with a while-loop, but I want to try it with a foreach loop.
using System;
using System.Collections.Generic;
using System... | The error you're encountering stems from the fact that you are attempting to iterate through the `file` string (which represents the file path) rather than the lines of text within the file itself.
To read the lines from the `StreamReader` using a `foreach` loop, you need to use the `ReadLine()` method to read the lin... | 39,629 | [
{
"from": "human",
"value": "I'm testing how the classes FileStream and StreamReader work togheter. Via a Console application.\nI'm trying to go in a file and read the lines and print them on the console.\nI've been able to do it with a while-loop, but I want to try it with a foreach loop.\nusing System;\nu... |
While debugging through a .NET 3.5 SP1 project which is contacting a local web service, I'm receiving the exception
System.BadImageFormatException: "Bad Class Token"
Of course there aren't much more details about what's causing the exception.
I can tell that the method where this occurs, which is in the same class as i... | The `System.BadImageFormatException: "Bad Class Token"` is typically associated with issues related to incorrect assembly versions, platform mismatches (e.g., trying to load a 64-bit assembly in a 32-bit process), or corrupt assembly files. Given that you mentioned some methods communicate with the web service successf... | 30,544 | [
{
"from": "human",
"value": "While debugging through a .NET 3.5 SP1 project which is contacting a local web service, I'm receiving the exception\nSystem.BadImageFormatException: \"Bad Class Token\"\nOf course there aren't much more details about what's causing the exception.\nI can tell that the method wher... |
I need to generate a CTL for use with IIS7.
I generated a CTL file using MakeCTL (on Win2k3 SDK) and put only my own RootCA certificate in the CTL.
However, when I then use adsutil.vbs to set my website to use this CTL, I get:
ErrNumber: -2147023584 (0x80070520)
Error Trying To SET the Property: SslCtlIdentifier
I'm us... | To set a CTL (Certificate Trust List) in IIS7 and manage its properties, you may need to consider a few steps and understand the limitations and differences compared to IIS6. Here’s how you can achieve this:
### Understanding the Context
- **CTL**: A CTL contains the certificates that are trusted for certificate valid... | 38,589 | [
{
"from": "human",
"value": "I need to generate a CTL for use with IIS7.\nI generated a CTL file using MakeCTL (on Win2k3 SDK) and put only my own RootCA certificate in the CTL.\nHowever, when I then use adsutil.vbs to set my website to use this CTL, I get:\nErrNumber: -2147023584 (0x80070520)\nError Trying... |
I have a layout that is working, but it has one very annoying problem.. when the content is taller than the screen, the background stops.
This is the desired layout in bad-ASCII-art format:
_____________________ _
| | long |logo| |
| | content | | |
| | | | |
| | | | |
|... | To achieve the desired layout where the gradients in the left and right columns extend the full height of the viewport, regardless of the content height, you'll need to employ a combination of CSS flexbox and min-height properties. Here's how you can achieve that:
### HTML Structure
Make sure your HTML structure follo... | 39,308 | [
{
"from": "human",
"value": "I have a layout that is working, but it has one very annoying problem.. when the content is taller than the screen, the background stops.\nThis is the desired layout in bad-ASCII-art format:\n_____________________ _\n| | long |logo| |\n| | content | | |\n| | ... |
When I open a file for reading in Haskell, I've found that I can't use the contents of the file after closing it. For example, this program will print the contents of a file:
main = do inFile <- openFile "foo" ReadMode
contents <- hGetContents inFile
putStr contents
hClose inFile
I expect... | Your observation about reading file contents in Haskell relates to the way Haskell handles lazy I/O and the sequencing of operations. Let's break down what's happening in your examples.
### Explanation of Lazy I/O
In Haskell, `hGetContents` retrieves the contents of a handle lazily. This means it doesn't actually rea... | 37,008 | [
{
"from": "human",
"value": "When I open a file for reading in Haskell, I've found that I can't use the contents of the file after closing it. For example, this program will print the contents of a file:\nmain = do inFile <- openFile \"foo\" ReadMode\n contents <- hGetContents inFile\n put... |
We've got an app with some legacy printer "setup" code that we are still using PrintDlg for. We use a custom template to allow the user to select which printer to use for various types of printing tasks (such as reports or drawings) along with orientation and paper size/source.
It works on XP and 32-bit Vista, but on V... | The `CDERR_MEMLOCKFAILURE` error you're encountering when using `PrintDlg` on Vista x64 systems is indeed a known issue, particularly when dealing with legacy code designed for 32-bit environments. This error can arise from various factors, including memory management differences between 32-bit and 64-bit architectures... | 37,088 | [
{
"from": "human",
"value": "We've got an app with some legacy printer \"setup\" code that we are still using PrintDlg for. We use a custom template to allow the user to select which printer to use for various types of printing tasks (such as reports or drawings) along with orientation and paper size/source... |
In previous applications, I was able to get TinyMCE to work just fine. But in this web app, I get the rich editor to show up okay, but for some reason I cannot type into the rich editor field and when I click a button like for bolding, I get this error:
Error: [Exception... "Component returned failure code: 0x80004005 ... | The issue you're experiencing with TinyMCE seems to be primarily related to the usage of the `execCommand` method, which might not be functioning correctly in Firefox (FF3 in your case). This can happen for a variety of reasons, and there are several steps you can take to debug and potentially resolve the problem:
###... | 35,892 | [
{
"from": "human",
"value": "In previous applications, I was able to get TinyMCE to work just fine. But in this web app, I get the rich editor to show up okay, but for some reason I cannot type into the rich editor field and when I click a button like for bolding, I get this error:\nError: [Exception... \"C... |
What does Java do with long variables while performing addition?
Wrong version 1:
Vector speeds = ... //whatever, speeds.size() returns 2
long estimated = 1l;
long time = speeds.size() + estimated; // time = 21; string concatenation??
Wrong version 2:
Vector speeds = ... //whatever, speeds.size() returns 2
long estima... | The behavior you're observing in your "wrong versions" has to do with how Java handles automatic type conversion (also known as type promotion) and the specific data types involved in the operations.
### Understanding the Issues
1. **Return Type of `speeds.size()`**:
- The `size()` method of a `Vector` returns an... | 38,873 | [
{
"from": "human",
"value": "What does Java do with long variables while performing addition?\nWrong version 1:\nVector speeds = ... //whatever, speeds.size() returns 2\nlong estimated = 1l;\nlong time = speeds.size() + estimated; // time = 21; string concatenation??\n\nWrong version 2:\nVector speeds = ...... |
I'm working with an XML file that subscribes to an industry standard. The standards document for the schema defines one of the fields as a rational number and its data is represented as two integers, typically with the second value being a 1 (e.g. <foo>20 1</foo>). I've been hunting around without a great deal of succe... | XML itself does not have a built-in data type specifically for rational numbers. The standard data types defined in XML Schema (XSD) include basic types like integers, strings, and decimals, but there is no native type for representing a rational number as a pair of integers (numerator and denominator).
In your case, ... | 38,756 | [
{
"from": "human",
"value": "I'm working with an XML file that subscribes to an industry standard. The standards document for the schema defines one of the fields as a rational number and its data is represented as two integers, typically with the second value being a 1 (e.g. <foo>20 1</foo>). I've been hun... |
I'm writing a utility to export evernote notes into Outlook on a schedule. The Outlook API's need plain text, and Evernote outputs a XHTML doc version of the plain text note. What I need is to strip out all the Tags and unescape the source XHTML doc embedded in the Evernote export file.
Basically I need to turn;
<note>... | To achieve this task of stripping HTML tags, unescaping entities, and extracting text from your Evernote XML export, you can utilize the `HtmlAgilityPack`, which is a popular library for parsing HTML in .NET.
Here's a step-by-step guide on how to do this:
1. **Extract the CDATA Section**: You need to get the text co... | 33,358 | [
{
"from": "human",
"value": "I'm writing a utility to export evernote notes into Outlook on a schedule. The Outlook API's need plain text, and Evernote outputs a XHTML doc version of the plain text note. What I need is to strip out all the Tags and unescape the source XHTML doc embedded in the Evernote expo... |
I'm trying to access an internal website that requires windows authentication. I've tried going to the website on my Blackberry but get the following error:
You are not authorized to view this
page.
You do not have permission to view
this directory or page using the
credentials that you supplied because
your w... | Accessing an internal website that requires Windows authentication from a Blackberry device can be tricky due to differences in how mobile browsers handle authentication compared to desktop browsers. Here are some suggestions to help you resolve the issue:
### 1. **Use a Different Browser:**
- If you're using the d... | 37,788 | [
{
"from": "human",
"value": "I'm trying to access an internal website that requires windows authentication. I've tried going to the website on my Blackberry but get the following error:\n\nYou are not authorized to view this\n page.\nYou do not have permission to view\n this directory or page using the\n ... |
I have clustered applications that requires one of the nodes to be designated as the master. The cluster nodes are tracked in a table with nodeID, isMaster, lastTimestamp columns.
Each node in the cluster will try to become a master every X seconds. Node can only become a master if either
there is no other master node... | To ensure that only one node can become the master in a clustered setup using SQL, you can use a single `UPDATE` statement that incorporates conditional logic within a transaction. This will allow you to update the master node safely while checking the conditions defined.
The following SQL statement uses a `CASE` exp... | 39,260 | [
{
"from": "human",
"value": "I have clustered applications that requires one of the nodes to be designated as the master. The cluster nodes are tracked in a table with nodeID, isMaster, lastTimestamp columns.\nEach node in the cluster will try to become a master every X seconds. Node can only become a maste... |
On windows mobile when there is no internet connection and I try to
browse the web using internet explorer i get cannot connect
information at the top of the screen. It says cannot connect with
current connection settings. To change your connection settings, tap
settings. And I am able to tap Settings and setup network... | To programmatically display a message similar to the "cannot connect" information you see in Internet Explorer on Windows Mobile, you can create a simple form that mimics that behavior when your application fails to connect to a web service. Although you can't directly reproduce the exact message that Internet Explorer... | 39,876 | [
{
"from": "human",
"value": "On windows mobile when there is no internet connection and I try to\nbrowse the web using internet explorer i get cannot connect\ninformation at the top of the screen. It says cannot connect with\ncurrent connection settings. To change your connection settings, tap\nsettings. An... |
What the best way to get up to speed on MathML and its usage in the world?
In particular I mean:
What do you use for rendering/editing it
Is it used in any commercial/open source applications that you can point me to
Is it popular and used a lot?
Are there any viewers that can be used inside a C#, C++, Java, ... appli... | MathML (Mathematical Markup Language) is an XML-based markup language used to display mathematical notations and capture both its structure and content. It is especially useful for web applications that need to present mathematical content in a visually accurate manner. Here are some insights regarding MathML, includin... | 31,647 | [
{
"from": "human",
"value": "What the best way to get up to speed on MathML and its usage in the world?\nIn particular I mean:\n\nWhat do you use for rendering/editing it\nIs it used in any commercial/open source applications that you can point me to\nIs it popular and used a lot?\nAre there any viewers tha... |
Part of my application maps resources stored in a number of locations onto web URLs like this:
http://servername/files/path/to/my/resource/
The resources location is modelled after file paths and as a result there can be an unlimited level of nesting. Is it possible to construct an MVC route that matches this so that ... | Yes, you can construct an ASP.NET MVC route to match a pattern like `http://servername/files/path/to/my/resource/` and capture the entire path in a controller. In ASP.NET MVC, you can use route parameters and wildcards to achieve this.
To capture the path after the `/files/` keyword, you can define a route that uses a... | 38,089 | [
{
"from": "human",
"value": "Part of my application maps resources stored in a number of locations onto web URLs like this:\nhttp://servername/files/path/to/my/resource/\n\nThe resources location is modelled after file paths and as a result there can be an unlimited level of nesting. Is it possible to const... |
Does anyone know of an open source web service/wcf service that can stream media content to clients? In particular I am looking for something that could access my music collection and stream it to a client (could be a client browser, win mobile app or even iphone application).
I guess it would have to be WCF based as I... | There are a few open-source options and frameworks that can help you build a web service to stream media content, including music, to various clients. Although WCF (Windows Communication Foundation) is a powerful framework, there are other technologies you might want to consider that can simplify the process of streami... | 34,852 | [
{
"from": "human",
"value": "Does anyone know of an open source web service/wcf service that can stream media content to clients? In particular I am looking for something that could access my music collection and stream it to a client (could be a client browser, win mobile app or even iphone application).\n... |
I remember from way back at university using a switch with 'binary search' or 'binary switch'. Something like that, My google foo is broken today. Anyway it goes down like this: You define an array of possible options (Strings usually), some magic happens, and those options in the array become the cases in the switch h... | What you're referring to sounds like a method commonly known as a "switch statement" or "switch-case" construct, but it seems you're particularly thinking of a technique that resembles a "lookup table" or a "map" for cases in a switch statement.
In many programming languages, switch statements typically require consta... | 39,772 | [
{
"from": "human",
"value": "I remember from way back at university using a switch with 'binary search' or 'binary switch'. Something like that, My google foo is broken today. Anyway it goes down like this: You define an array of possible options (Strings usually), some magic happens, and those options in t... |
I am making a quiz system, and when quizmakers insert questions into the Question Bank, I am to check the DB for duplicate / very highly similar questions.
Testing MySQL's MATCH() ... AGAINST(), the highest relevance I get is 30+, when I test against a 100% similar string.
So what exactly is the relevance? To quote the... | When working with MySQL's full-text search capabilities using `MATCH()`...`AGAINST()`, it's important to understand that the relevance score is not a percentage; rather, it is a floating-point number that reflects how well the query matches the indexed data. The exact value of relevance can vary depending on several fa... | 37,138 | [
{
"from": "human",
"value": "I am making a quiz system, and when quizmakers insert questions into the Question Bank, I am to check the DB for duplicate / very highly similar questions.\nTesting MySQL's MATCH() ... AGAINST(), the highest relevance I get is 30+, when I test against a 100% similar string.\nSo ... |
I have this Trigger in Postgresql that I can't just get to work (does nothing). For understanding, there's how I defined it:
CREATE TABLE documents (
...
modification_time timestamp with time zone DEFAULT now()
);
CREATE FUNCTION documents_update_mod_time() RETURNS trigger
AS $$
begin
new.modification_... | Your trigger setup looks correct at first glance. However, there are a few areas to check to ensure that it works as expected. Here’s a quick checklist to help debug your trigger:
1. **Ensure Trigger is Created**: After executing the trigger creation commands, confirm that the trigger exists for the table. You can che... | 39,866 | [
{
"from": "human",
"value": "I have this Trigger in Postgresql that I can't just get to work (does nothing). For understanding, there's how I defined it:\nCREATE TABLE documents (\n ...\n modification_time timestamp with time zone DEFAULT now()\n);\n\nCREATE FUNCTION documents_update_mod_time() RETURN... |
There have been plenty of questions on MVC validation but so far the answer has been pretty much inconclusive.
For my needs in particular, I would like something that generates client validation and server validation from the same description and should allow both model based attributes as well as code based declaratio... | In ASP.NET MVC, handling validation effectively for both client-side and server-side can be challenging, especially when you want a unified approach that works seamlessly across different scenarios, such as using model attributes or custom code-based validations.
Here are several strategies and frameworks you can cons... | 37,668 | [
{
"from": "human",
"value": "There have been plenty of questions on MVC validation but so far the answer has been pretty much inconclusive.\nFor my needs in particular, I would like something that generates client validation and server validation from the same description and should allow both model based a... |
We are currently working on an application that will use a WCF service. The host (the client) is using the excellent WCF Service Proxy Helper from Erwyn van der Meer.
What I would like to know... is if I open this object multiple times... will it lead to multiple (expensive) connections or will WCF manage it and pool t... | In WCF, the management of connections and instances depends on the binding configuration and how you are instantiating your service proxies. WCF allows for different modes of managing the client connections, including connection pooling, but the effectiveness of connection reuse can depend on how you are creating and m... | 39,022 | [
{
"from": "human",
"value": "We are currently working on an application that will use a WCF service. The host (the client) is using the excellent WCF Service Proxy Helper from Erwyn van der Meer.\nWhat I would like to know... is if I open this object multiple times... will it lead to multiple (expensive) co... |
So, I've spent enough time using ASP.NET webforms to know that I'd almost rather go back to doing classic ASP than use them. But I'm hesitant to move to ASP.NET MVC until it becomes more mature. Are there any open source alternatives?
The main thing I'm looking for is something that's easy to learn and to get a proto... | If you're looking for open-source alternatives to ASP.NET WebForms and you prefer a Python "mix and match" approach, there are several frameworks you might want to consider. Here are a few popular options that are easy to learn and can help you quickly get a prototype up and running:
### 1. **Flask**
- **Description**... | 36,779 | [
{
"from": "human",
"value": "So, I've spent enough time using ASP.NET webforms to know that I'd almost rather go back to doing classic ASP than use them. But I'm hesitant to move to ASP.NET MVC until it becomes more mature. Are there any open source alternatives?\nThe main thing I'm looking for is somethi... |
So I am currently learning C++ and decided to make a program that tests my skills I have learned so far. Now in my code I want to check if the value that the user enters is a double, if it is not a double I will put a if loop and ask them to reenter it. The problem I have is how do I go about checking what type of vari... | To check whether the input from the user is a valid double in C++, you can take advantage of the stream's fail state. When you read input using `cin`, if the input is not convertible to a `double`, `cin` will enter a fail state, which you can detect.
You can implement a loop to continuously prompt the user until a val... | 39,936 | [
{
"from": "human",
"value": "So I am currently learning C++ and decided to make a program that tests my skills I have learned so far. Now in my code I want to check if the value that the user enters is a double, if it is not a double I will put a if loop and ask them to reenter it. The problem I have is how... |
Why was C# designed this way?
As I understand it, an interface only describes behaviour, and serves the purpose of describing a contractual obligation for classes implementing the interface that certain behaviour is implemented.
If classes wish to implement that behavour in a shared method, why shouldn't they?
Here is ... | Your understanding of interfaces in C# is correct: interfaces define a contract that classes can implement, specifying that they must provide certain behaviors (methods, properties, etc.) without dictating how they do so. This allows for polymorphism, where different classes can be treated uniformly through their share... | 32,827 | [
{
"from": "human",
"value": "Why was C# designed this way?\nAs I understand it, an interface only describes behaviour, and serves the purpose of describing a contractual obligation for classes implementing the interface that certain behaviour is implemented.\nIf classes wish to implement that behavour in a ... |
I'm creating a blog library using nHibernate and I have a BlogEntry class that has a CreatedBy property of type User (User is an abstract class). The two concrete implementations of the User class are RegisteredUser and UnknownUser. I'd like nHibernate to instantiate UnknownUser class if the value in the CreatedBy fie... | Yes, it is possible to achieve the behavior you want with NHibernate by using a custom user type or a discriminator in your mapping file. However, since you're looking to instantiate different concrete classes based on the value of a property (in your case, the `CreatedBy` property in `BlogEntry`), a good approach woul... | 37,332 | [
{
"from": "human",
"value": "I'm creating a blog library using nHibernate and I have a BlogEntry class that has a CreatedBy property of type User (User is an abstract class). The two concrete implementations of the User class are RegisteredUser and UnknownUser. I'd like nHibernate to instantiate UnknownUse... |
We've got a WinForms app written in C# that has a very custom GUI. The user is not allowed to run any other applications and the user cannot go into the OS (WinXP Pro) at all. We're planning on allowing the user to connect to available wireless networks. We're going to have to create a configuration screen that displ... | To implement wireless network management capabilities within your WinForms application, there are several approaches and libraries you can explore. Since your application is restricted from accessing the Windows desktop directly, you will need to work within the .NET framework and potentially use some Windows APIs to m... | 38,235 | [
{
"from": "human",
"value": "We've got a WinForms app written in C# that has a very custom GUI. The user is not allowed to run any other applications and the user cannot go into the OS (WinXP Pro) at all. We're planning on allowing the user to connect to available wireless networks. We're going to have to... |
I want to implement a docking library in wpf with behavior similar to Adobe Photoshops CS3.
You can attach floating Panels to other Panels or Docks by mouse dragging. Docks have a fixed location.
Would you use a central Docking Manager class? How would the message flow look like? I was thinking of using 2 interfaces, c... | Implementing a docking library in WPF that mimics the docking behavior of applications like Adobe Photoshop CS3 is an interesting challenge. Here are some suggestions for the architectural design and patterns that could help you achieve this.
### Design Overview
1. **Central Docking Manager**:
- A central `Dockin... | 35,725 | [
{
"from": "human",
"value": "I want to implement a docking library in wpf with behavior similar to Adobe Photoshops CS3.\nYou can attach floating Panels to other Panels or Docks by mouse dragging. Docks have a fixed location.\nWould you use a central Docking Manager class? How would the message flow look li... |
I am suddenly resposible for debugging/finding out what is wrong with an asp.net application that crashed its ApplicationPool some days ago. The 5 errors within 5 minutes failsafe we had set took it down. The problem is that it was still served pages and thus returned a 503 for just some visitors. We have inadequate lo... | Debugging an ASP.NET application that has crashed its Application Pool can indeed be challenging, especially when logging is inadequate. Here’s a structured approach to help you troubleshoot the issue and gather the necessary information:
### 1. Analyze Existing Logs
**HTTPERR Logs:**
- Located typically at `C:\Windo... | 38,730 | [
{
"from": "human",
"value": "I am suddenly resposible for debugging/finding out what is wrong with an asp.net application that crashed its ApplicationPool some days ago. The 5 errors within 5 minutes failsafe we had set took it down. The problem is that it was still served pages and thus returned a 503 for ... |
I'm thinking about how I could scale out Tibco EMS queue listeners written in managed code (C# in this instance). I'm looking for predominantly isolation and clustering characteristics.
In MSMQ I could use Windows Process Activation Service to host and manage the number and lifetime of queue listeners. Is there a Tibc... | TIBCO EMS (Enterprise Message Service) does not have a direct equivalent to Windows Process Activation Service (WAS) for hosting and managing queue listeners in the same way that MSMQ does. However, there are a few approaches you can consider for scaling out your TIBCO EMS queue listeners in a managed code environment,... | 36,350 | [
{
"from": "human",
"value": "I'm thinking about how I could scale out Tibco EMS queue listeners written in managed code (C# in this instance). I'm looking for predominantly isolation and clustering characteristics.\nIn MSMQ I could use Windows Process Activation Service to host and manage the number and lif... |
I use CruiseControl.NET to automatically build my .NET 3.5 web applications, which works a treat. However, is there any way to automatically create a ZIP file of these builds, and put the ZIP's into a separate directory?
I have seen this is possible using NAnt but cannot find an example of how to get this working.
Can... | Yes, you can definitely create a ZIP file of your builds and store them in a separate directory using NAnt. Below, I'll provide you with a simple example of how to configure NAnt to create a ZIP file after your build is complete.
### Step 1: Install NAnt and NAnt Contrib
Before proceeding, ensure you have NAnt and NA... | 34,564 | [
{
"from": "human",
"value": "I use CruiseControl.NET to automatically build my .NET 3.5 web applications, which works a treat. However, is there any way to automatically create a ZIP file of these builds, and put the ZIP's into a separate directory?\nI have seen this is possible using NAnt but cannot find ... |
We have an application that use MSSQL, when we move to 2005, basically we recommend to our client to apply the backward compatibility package and that’s it, but somebody ask me what to do to be 100% compatible on 2005.
I was thinking on
1. Compatibility level: SQL Server 2005 (90)
2. Remove any DMO reference, and repla... | Migrating an application to SQL Server 2005 while ensuring compatibility requires careful attention to several factors, including database settings, deprecated features, and application code adjustments. Here are some considerations and recommendations to help ensure 100% compatibility with SQL Server 2005:
1. **Compa... | 37,146 | [
{
"from": "human",
"value": "We have an application that use MSSQL, when we move to 2005, basically we recommend to our client to apply the backward compatibility package and that’s it, but somebody ask me what to do to be 100% compatible on 2005.\nI was thinking on\n1. Compatibility level: SQL Server 2005 ... |
What is the difference in displaying xml data using html browser such as firefox,internet exporer,netscape navigator etc. in terms of how text, images etc are display on a computer screen?
| The display of XML data in web browsers like Firefox, Internet Explorer, and Netscape Navigator can vary significantly due to differences in how each browser interprets and renders XML content. Here are some key differences in how they handle XML data, especially concerning text, images, and overall presentation:
### ... | 38,650 | [
{
"from": "human",
"value": "What is the difference in displaying xml data using html browser such as firefox,internet exporer,netscape navigator etc. in terms of how text, images etc are display on a computer screen?\n"
},
{
"from": "gpt",
"value": "The display of XML data in web browsers like ... |
I have a situation where I have a bunch of SQL Update commands that all need to be executed. I know that DataSets can do batch updates, but the only way I've been able to accomplish it is to load the whole table into a dataset first. What if I want to only update a subset of the records in a table?
| If you want to perform batch updates on a subset of records in a SQL table without loading the entire table into a DataSet, you can achieve this by utilizing the `DataAdapter` and a `DataTable` to specifically represent only the records you want to update. Here's a step-by-step approach you can follow:
1. **Create a D... | 37,175 | [
{
"from": "human",
"value": "I have a situation where I have a bunch of SQL Update commands that all need to be executed. I know that DataSets can do batch updates, but the only way I've been able to accomplish it is to load the whole table into a dataset first. What if I want to only update a subset of t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.