instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I have a Java server that accepts SSL connections using JSSE and uses a simple XML message format inside the stream. I would like the server to read a complete message and then send a reply. This turns out to be quite difficult because org.xml.sax.XMLReader wants to read the entire stream and then call close(). I kn... | Your approach of wrapping the InputStream to control the close behavior is one way to handle the challenge of reading complete XML messages over an SSL connection without closing the socket prematurely. However, there are several other strategies you can consider to improve your design and maintain a valid XML structur... | 30,673 | [
{
"from": "human",
"value": "I have a Java server that accepts SSL connections using JSSE and uses a simple XML message format inside the stream. I would like the server to read a complete message and then send a reply. This turns out to be quite difficult because org.xml.sax.XMLReader wants to read the e... |
I have a table cell, and I want a div within it to always be at the bottom left corner. The following works fine in IE and Safari, but Firefox is positioning the div absolutely on the page, not within the cell (code based on the solution solution here). I have tested both with and without the DTD, which put Firefox i... | The issue you're experiencing is due to the `position: absolute;` property of the `.manage` div. When an element is positioned absolutely, it is taken out of the normal document flow and positioned relative to its nearest positioned ancestor. In your case, that ancestor is the `<td>` element where the div resides. Howe... | 34,662 | [
{
"from": "human",
"value": "I have a table cell, and I want a div within it to always be at the bottom left corner. The following works fine in IE and Safari, but Firefox is positioning the div absolutely on the page, not within the cell (code based on the solution solution here). I have tested both with... |
I've got an in-memory dataset with several fields, one of which is a primary key that another dataset references as a foreign key. Thing is, the master dataset can have multiple references to the detail dataset. (This is modeling an object that contains a dynamic array of other objects.)
If there was only one of each... | To achieve your goal of populating a ListBox or similar control with records from a detail dataset that match the primary key of a master dataset in an in-memory dataset scenario, you can follow a few steps. Below are general steps and an example approach in Delphi (assuming that’s the environment you are working in):
... | 31,218 | [
{
"from": "human",
"value": "I've got an in-memory dataset with several fields, one of which is a primary key that another dataset references as a foreign key. Thing is, the master dataset can have multiple references to the detail dataset. (This is modeling an object that contains a dynamic array of othe... |
Can someone tell me the different between LinkButton.PostBackUrl and HyperLink.NavigateUrl? I've got a asp.net 2.0 application that uses both methods throughout the application and everything works fine. However if I connect to the application over the company vpn all of the links that use LinkButton.PostBackUrl give... | In ASP.NET Web Forms, `LinkButton.PostBackUrl` and `HyperLink.NavigateUrl` serve different purposes and operate in distinct ways, which could explain the behavior you're encountering over the VPN.
### LinkButton.PostBackUrl
- **Nature**: The `LinkButton` is a server-side control that, when clicked, triggers a postback... | 31,547 | [
{
"from": "human",
"value": "Can someone tell me the different between LinkButton.PostBackUrl and HyperLink.NavigateUrl? I've got a asp.net 2.0 application that uses both methods throughout the application and everything works fine. However if I connect to the application over the company vpn all of the l... |
This question is to seek out good examples of Hungarian Notation, so we can bring together a collection of these.
Edit: I agree that Hungarian for types isn't that necessary, I'm hoping for more specific examples where it increases readability and maintainability, like Joel gives in his article (as per my answer).
| Hungarian Notation is a naming convention in programming that prefixes variable names with a set of characters that indicate their type or purpose. While it's less common in modern programming practices, it can still enhance readability and maintainability in certain contexts. Here are some specific examples where Hung... | 31,116 | [
{
"from": "human",
"value": "This question is to seek out good examples of Hungarian Notation, so we can bring together a collection of these. \nEdit: I agree that Hungarian for types isn't that necessary, I'm hoping for more specific examples where it increases readability and maintainability, like Joel g... |
I found this question, but what I want to know is different - does the output from Console.WriteLine go anywhere when debugging? I know that for it to go to the output window I should should Debug.WriteLine() or other methods, but where does the standard Console.WriteLine() go?
Edit
When debugging, you don't see the bl... | When you use `Console.WriteLine()` in a console application, the output is typically directed to the console window. However, if you're debugging a console application in an Integrated Development Environment (IDE) like Visual Studio, the console window may not be visible, or it might not show the output as you expect.... | 34,391 | [
{
"from": "human",
"value": "I found this question, but what I want to know is different - does the output from Console.WriteLine go anywhere when debugging? I know that for it to go to the output window I should should Debug.WriteLine() or other methods, but where does the standard Console.WriteLine() go?\... |
has anybody managed to get Djangos site map framework to run on Google App Engine?
I receive the following exception:
ImproperlyConfigured at /sitemap.xml
You haven't set the DATABASE_ENGINE setting yet.
Request Method: GET
Request URL: http://127.0.0.1:8080/sitemap.xml
Exception Type: ImproperlyConfigured
Exception ... | When running Django on Google App Engine, especially if you're using features like the sitemap framework, you need to ensure that your settings are correctly configured. The error message you're seeing, "You haven't set the DATABASE_ENGINE setting yet," indicates that Django is expecting a database backend to be specif... | 33,955 | [
{
"from": "human",
"value": "has anybody managed to get Djangos site map framework to run on Google App Engine?\nI receive the following exception:\nImproperlyConfigured at /sitemap.xml\nYou haven't set the DATABASE_ENGINE setting yet.\nRequest Method: GET\nRequest URL: http://127.0.0.1:8080/sitemap.xml \nE... |
I have a repository which contains some unversioned directories and files. The server running svn was recently changed and since the checkout was done using the url svn://OLD-IP, I relocated my svn working copy, this time to the url svn://NEW-DOMAIN-NAME.
Now since there are some unversioned resources, the switch did ... | It sounds like you're facing issues with unversioned files in your SVN working copy that are preventing you from performing necessary operations like cleanup and relocation. Here’s a step-by-step guide to help you resolve the issue:
1. **Backup Your Work:** Before proceeding, it's always a good idea to back up your wo... | 35,038 | [
{
"from": "human",
"value": "I have a repository which contains some unversioned directories and files. The server running svn was recently changed and since the checkout was done using the url svn://OLD-IP, I relocated my svn working copy, this time to the url svn://NEW-DOMAIN-NAME. \nNow since there are s... |
How do I convert a DateTime structure to its equivalent RFC 822 date-time formatted string representation and parse this string representation back to a DateTime structure in .NET? The RFC-822 date-time format is used in a number of specifications such as the RSS Syndication Format.
| In .NET, you can convert a `DateTime` structure to its equivalent RFC 822 date-time formatted string representation using the `ToString` method with a custom format. To parse this string representation back into a `DateTime` structure, you can use the `DateTime.ParseExact` method with the appropriate format specifier.
... | 33,168 | [
{
"from": "human",
"value": "How do I convert a DateTime structure to its equivalent RFC 822 date-time formatted string representation and parse this string representation back to a DateTime structure in .NET? The RFC-822 date-time format is used in a number of specifications such as the RSS Syndication For... |
you would think this would be obvious, but searching through documentation, SAP forums, Googling, etc., I've been spectacularly unsuccessful. I'm creating a file in ABAP on a solaris filesystem using the following code:
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
the resulting file is owned and grou... | In ABAP, when you open a dataset using `OPEN DATASET`, the permissions of the file created on the Solaris filesystem are generally determined by the umask settings of the user that the SAP instance is running as. Unfortunately, there is no direct way in the `OPEN DATASET` statement to specify file permissions.
However... | 33,387 | [
{
"from": "human",
"value": "you would think this would be obvious, but searching through documentation, SAP forums, Googling, etc., I've been spectacularly unsuccessful. I'm creating a file in ABAP on a solaris filesystem using the following code:\nOPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFA... |
How to hide the default toolbar and to disallow the default context menu of the DocumentViewer control?
| To hide the default toolbar and disallow the default context menu of the `DocumentViewer` control in a WPF application, you can follow these steps:
### Hiding the Default Toolbar
The `DocumentViewer` control does not come with a built-in toolbar by default. However, if you are seeing a toolbar in your application, it... | 29,195 | [
{
"from": "human",
"value": "How to hide the default toolbar and to disallow the default context menu of the DocumentViewer control?\n"
},
{
"from": "gpt",
"value": "To hide the default toolbar and disallow the default context menu of the `DocumentViewer` control in a WPF application, you can fo... |
We are currently using the NetBios method, and it works ok under XP. Preliminary tests under Vista show that it also works, but there are caveats - NetBIOS has to be present, for instance, and from what I've been reading, the order of the adapters is bound to change. Our alternative method - with SNMPExtensionQuery - s... | To reliably retrieve a list of local MAC addresses on a Windows Vista machine (as well as Windows XP) without having to deal with the complications of NetBIOS and SNMPExtensionQuery, you can use the Windows Management Instrumentation (WMI) API. WMI provides a consistent interface for accessing various system informatio... | 30,858 | [
{
"from": "human",
"value": "We are currently using the NetBios method, and it works ok under XP. Preliminary tests under Vista show that it also works, but there are caveats - NetBIOS has to be present, for instance, and from what I've been reading, the order of the adapters is bound to change. Our alterna... |
I'm struggling to find examples/explanations of coding a MS Certificate Authority exit module.
If anybody has any help or resources they can point me at I'd be grateful.
| Creating an exit module for a Microsoft Certificate Authority (CA) can be quite a technical task. Exit modules are custom components that can extend the functionality of the CA, allowing for tasks like integrating with external systems or performing additional processing after the issuance of a certificate.
Here's a b... | 30,888 | [
{
"from": "human",
"value": "I'm struggling to find examples/explanations of coding a MS Certificate Authority exit module. \nIf anybody has any help or resources they can point me at I'd be grateful.\n"
},
{
"from": "gpt",
"value": "Creating an exit module for a Microsoft Certificate Authority ... |
I'm currently installing and configuring an open source project on a test server. I've been well trained to use source control, and I want to make sure everything I do is managed properly (both for me, the sole dev/admin, and for future maintaners). The open source project is available as a source download or by svn ch... | When setting up your own source-controlled version of the open source project, you have a couple of viable strategies. Here are some recommendations:
### Option 1: Fork the Whole Repository
1. **Create a Local Repository**: You can create a local repository that mirrors the entire open source project. This is benefic... | 33,952 | [
{
"from": "human",
"value": "I'm currently installing and configuring an open source project on a test server. I've been well trained to use source control, and I want to make sure everything I do is managed properly (both for me, the sole dev/admin, and for future maintaners). The open source project is av... |
This is a follow-up to two questions I asked a week or so back. The upshot of those was that I was building a prototype of an AI-based application for the web, and I wondered what language(s) to use. The conclusion seemed to be that I should go for something like python and then convert any critical bits into something... | No need to apologize! Your questions are valid and address common concerns when choosing a technology stack for web development. Let's break down your questions about using Python for web applications:
### Python for Web Development
1. **Ease of Use**: Python is widely regarded as one of the most accessible programmi... | 34,806 | [
{
"from": "human",
"value": "This is a follow-up to two questions I asked a week or so back. The upshot of those was that I was building a prototype of an AI-based application for the web, and I wondered what language(s) to use. The conclusion seemed to be that I should go for something like python and then... |
I have a very specific html table construct that seems to reveal a Gecko bug.
Here's a distilled version of the problem. Observe the following table in a gecko-based browser (FF, for example): (you'll have to copy and paste this into a new file)
<style>
table.example{
border-collapse:collapse;
}
table.example td ... | What you are observing is a known rendering issue in Gecko-based browsers (like Firefox) when using rowspan and thead elements in specific table structures. This problem often occurs because of the way these browsers handle table cell borders and their relationships when row and column spans are involved, particularly ... | 34,192 | [
{
"from": "human",
"value": "I have a very specific html table construct that seems to reveal a Gecko bug.\nHere's a distilled version of the problem. Observe the following table in a gecko-based browser (FF, for example): (you'll have to copy and paste this into a new file)\n<style>\ntable.example{\n ... |
I'm writing an editor in GWT, how can I pass the user/pass from the page? For example a user submits a simple html form and then an GWT app shows up in the next page, how can I get the form submission info into the GWT nicely?
Thanks.
| In a GWT (Google Web Toolkit) application, you can pass user credentials such as username and password from an HTML form to your GWT app by using various methods. Below, I’ll describe one approach using URL parameters and another approach using the GWT RPC mechanism.
### 1. Using URL Parameters
This method involves s... | 32,178 | [
{
"from": "human",
"value": "I'm writing an editor in GWT, how can I pass the user/pass from the page? For example a user submits a simple html form and then an GWT app shows up in the next page, how can I get the form submission info into the GWT nicely?\nThanks.\n"
},
{
"from": "gpt",
"value":... |
I have a web service that has 8 web methods. These methods are called synchronously, the first call authenticates the user, and the rest of the methods perform a unit of work, these methods are called upon until the work is done.
I need to store the state of the work (e.g. what actions to perform next, and what work ha... | Both of the ideas you've proposed have their own advantages and drawbacks. Let's discuss each approach along with their implications before considering additional options.
### Idea #1: Store the Object in a Session
#### Pros:
- **Built-in Management**: Most web frameworks provide built-in session management which make... | 32,856 | [
{
"from": "human",
"value": "I have a web service that has 8 web methods. These methods are called synchronously, the first call authenticates the user, and the rest of the methods perform a unit of work, these methods are called upon until the work is done.\nI need to store the state of the work (e.g. what... |
I have a case where I have a bunch of text boxes and radio buttons on a screen all built dynamically with various DIVs. There are onblur routines for all of the text boxes to validate entry, but depending on the radio button selection, the text box entry could be invalid when it was valid originally. I can't use onbl... | It looks like you're facing a common issue where the `onblur` event is being treated as a side-effect function rather than one that returns a value you want to capture. The `onblur` event handler is typically not designed to be called directly like a function; it’s meant to be executed as a result of a user action.
To... | 31,847 | [
{
"from": "human",
"value": "I have a case where I have a bunch of text boxes and radio buttons on a screen all built dynamically with various DIVs. There are onblur routines for all of the text boxes to validate entry, but depending on the radio button selection, the text box entry could be invalid when i... |
Since Access 2003 doesn't have the control anchoring functionality as exists in 2007, I was wondering if anyone has or is aware of some VBA script, or a freeware control, that can give this functionality?
| In Access 2003, while control anchoring is not natively supported like in later versions, you can achieve similar functionality using VBA. You can manually reposition controls based on the form's size, effectively mimicking the anchoring feature. Here's a simple example of how to implement this behavior.
1. **Create a... | 35,092 | [
{
"from": "human",
"value": "Since Access 2003 doesn't have the control anchoring functionality as exists in 2007, I was wondering if anyone has or is aware of some VBA script, or a freeware control, that can give this functionality?\n"
},
{
"from": "gpt",
"value": "In Access 2003, while control... |
I am adding membership-related schemas to an existing database (lets call it myDatabase) following those instructions.
As a results the number of tables, views and stored procedures are being created in myDatabase.
The next step is to modify web.config for the application to use CustomizedMembershipProvider
<membership... | To address your questions regarding the connection string and user permissions in your database for the membership-related schemas, let's break it down:
### 1. **Should I use a different connection string for the membership provider?**
It is not strictly necessary to use a different connection string for the `Customi... | 34,935 | [
{
"from": "human",
"value": "I am adding membership-related schemas to an existing database (lets call it myDatabase) following those instructions.\nAs a results the number of tables, views and stored procedures are being created in myDatabase.\nThe next step is to modify web.config for the application to u... |
I have an XML input file and I'm trying to output the result of a call like:
<xsl:value-of select="Some/Value"/>
into an attribute.
<Output Attribute="Value should be put here"/>
My problem is, since I'm outputting XML, the XSL processor won't allow me to write:
<Output Attribute="<xsl:value-of select="Some/V... | To output the value of an element (or a computed value) into an attribute in XSLT, you cannot directly place an `<xsl:value-of>` element inside an attribute. Instead, you should use the `xsl:attribute` element.
Here's how you can accomplish this:
1. Use `xsl:element` to create the `<Output>` element.
2. Use `xsl:att... | 35,066 | [
{
"from": "human",
"value": "I have an XML input file and I'm trying to output the result of a call like: \n<xsl:value-of select=\"Some/Value\"/> \n\ninto an attribute. \n<Output Attribute=\"Value should be put here\"/>\n\nMy problem is, since I'm outputting XML, the XSL processor won't allow me to write... |
I have some code that generates image of a pie chart. It's a general purpose class, so any number of slices can be given as input. Now I have problem picking good colors for the slices. Is there some algorithm that is good at that?
Colors need to follow some rules:
they need to look nice
adjacent colors should not be ... | When generating a pie chart with multiple slices, choosing distinct and aesthetically pleasing colors can indeed be challenging, especially when adhering to specific color rules. One effective approach is to use color theory and algorithms to ensure that colors not only look good but also maintain contrast between adja... | 32,727 | [
{
"from": "human",
"value": "I have some code that generates image of a pie chart. It's a general purpose class, so any number of slices can be given as input. Now I have problem picking good colors for the slices. Is there some algorithm that is good at that?\nColors need to follow some rules:\n\nthey need... |
I've got the following code to end a process, but I still receive an error code 2 (Access Denied).
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'MSSEARCH.exe'")
For each objProcess in ... | The error code 2, which translates to "Access Denied," typically indicates that the script does not have sufficient permissions to terminate the process. Here are a few steps you can take to resolve this issue:
### 1. Run as Administrator
Make sure you are running the script with administrative privileges. Right-click... | 32,597 | [
{
"from": "human",
"value": "I've got the following code to end a process, but I still receive an error code 2 (Access Denied).\nstrComputer = \".\" \nSet objWMIService = GetObject(\"winmgmts:\\\\\" & strComputer & \"\\root\\cimv2\")\nSet colProcessList = objWMIService.ExecQuery(\"SELECT * FROM Win32_Proces... |
How do I set the date/time of the computer in C#?
| In C#, you cannot directly change the system date and time due to security restrictions that are built into the operating system. However, if you have sufficient privileges (e.g., you run your program as an administrator), you can use the `SetSystemTime` function from the Windows API.
Here's a step-by-step example of ... | 33,674 | [
{
"from": "human",
"value": "How do I set the date/time of the computer in C#?\n"
},
{
"from": "gpt",
"value": "In C#, you cannot directly change the system date and time due to security restrictions that are built into the operating system. However, if you have sufficient privileges (e.g., you ... |
still new to the world of linq, and i need some help flatening a list of parents that have children, into a single list of ParentChild's.
Just like this:
class Program
{
static void Main()
{
List<Parent> parents = new List<Parent>();
parents.Add(new Parent { Name = "Parent1", Children = new Lis... | Certainly! You can achieve the flattening of the list of parents and their children into a list of `ParentChild` objects using LINQ. Here's how you can do that by using the `SelectMany` method:
```csharp
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
{
... | 29,423 | [
{
"from": "human",
"value": "still new to the world of linq, and i need some help flatening a list of parents that have children, into a single list of ParentChild's.\nJust like this:\nclass Program\n{\n static void Main()\n {\n List<Parent> parents = new List<Parent>();\n\n parents.Add(... |
My installation of APEX has come pear shaped on a Oracle 9.2.0.5.0 instance, all the packages are invalid.
I've tried recompiling everything with DBMS_UTILITY.compile_schema, but still all the packages are invalid. So, tried recompiling individual packages,
SQL> ALTER PACKAGE FLOWS_020000.WWV_FLOW_QUERY COMPILE BODY;
... | In Oracle SQL, the `SHOW ERRORS` command will only display compilation errors for the last executed command that involved a PL/SQL object. If you are not seeing any errors after trying to compile the package, there might be a few reasons for this:
1. **Error in Dependent Objects**: Sometimes, packages can be invalidat... | 34,523 | [
{
"from": "human",
"value": "My installation of APEX has come pear shaped on a Oracle 9.2.0.5.0 instance, all the packages are invalid.\nI've tried recompiling everything with DBMS_UTILITY.compile_schema, but still all the packages are invalid. So, tried recompiling individual packages,\nSQL> ALTER PACKAGE ... |
I have the following equation
1 - ((.5 * 0.83333333333333) ^ 2 + (.5 * 0.83333333333333) ^ 2 + (.5 * (1 - 0.83333333333333)) ^ 2 + (.5 * (1 - 0.83333333333333)) ^ 2)
In Php5, this results in an answer of 1 as opposed to .63 (on two machines, OSx and Centos). Should I be exclusively using the bc math functions of Ph... | The issue you're experiencing seems to stem from differences in how floating-point arithmetic is handled in PHP, especially in different environments like OS X and CentOS. When dealing with floating-point calculations, it's not uncommon to run into precision issues, particularly with operations that involve small or ve... | 33,197 | [
{
"from": "human",
"value": "I have the following equation\n\n1 - ((.5 * 0.83333333333333) ^ 2 + (.5 * 0.83333333333333) ^ 2 + (.5 * (1 - 0.83333333333333)) ^ 2 + (.5 * (1 - 0.83333333333333)) ^ 2) \n\nIn Php5, this results in an answer of 1 as opposed to .63 (on two machines, OSx and Centos). Should I be ... |
Background: I am currently using custom controls within my C# project (basic controls just drawing a custom look and feel (using gdi+?)). The majoritiy of these controls have transparent segments for irregular shapes etc.
Problem: I am looking to overlay a semi-transparent (irregularly shaped) panel over a group of co... | Certainly! Using OpenGL or DirectX to accelerate rendering can significantly improve performance, especially when dealing with complex shapes and transparency. Here are some approaches you can consider to speed up the rendering process in your C# project:
### 1. Use Windows Forms with DirectX or OpenGL
You can use lib... | 32,999 | [
{
"from": "human",
"value": "Background: I am currently using custom controls within my C# project (basic controls just drawing a custom look and feel (using gdi+?)). The majoritiy of these controls have transparent segments for irregular shapes etc. \nProblem: I am looking to overlay a semi-transparent (ir... |
Please post a working source code example (or link) of how to search string in another process memory and getting offset of match if found. The similar way its done in game cheating utils which search for values in game memory using ReadProcessMemory.
| Searching through another process's memory can be a complex task and usually involves a deep understanding of the Windows API, specifically how to interact with process memory using functions like `OpenProcess`, `ReadProcessMemory`, and others. Below is a simplified C++ example that demonstrates how to search for a str... | 21,607 | [
{
"from": "human",
"value": "Please post a working source code example (or link) of how to search string in another process memory and getting offset of match if found. The similar way its done in game cheating utils which search for values in game memory using ReadProcessMemory.\n"
},
{
"from": "gp... |
In the .xsd file for a typed DataSet in .NET, there's a <Connections> section that contains a list of any data connections I've used to set up the DataTables and TableAdapters.
There are times when I'd prefer not to have those there. For instance, sometimes I prefer to pass in a connection string to a custom construct... | When working with typed DataSets in .NET, managing connections can indeed be tricky, especially if you prefer to use custom connection strings rather than relying on the settings in the `.config` file. Unfortunately, the Visual Studio designer and the DataSet code generation process are somewhat rigid in their handling... | 33,626 | [
{
"from": "human",
"value": "In the .xsd file for a typed DataSet in .NET, there's a <Connections> section that contains a list of any data connections I've used to set up the DataTables and TableAdapters.\nThere are times when I'd prefer not to have those there. For instance, sometimes I prefer to pass in... |
We're using Infragistics grid (most probably, we'll have 8.2 version at the end) and we want to configure row/cells appearances "on-demand" in order to be able to provide sort of "dynamic appearance".
For example, I want some cell to be red or green, depending on its value. We might want to tweak other characteristics ... | In Infragistics WinForms UltraGrid, you can achieve dynamic cell appearance by handling the `InitializeRow` or `InitializeLayout` event, which allows you to modify cell properties based on the data before the grid is drawn.
### Here’s how you can implement dynamic appearances based on cell values:
1. **Using the `In... | 35,340 | [
{
"from": "human",
"value": "We're using Infragistics grid (most probably, we'll have 8.2 version at the end) and we want to configure row/cells appearances \"on-demand\" in order to be able to provide sort of \"dynamic appearance\".\nFor example, I want some cell to be red or green, depending on its value.... |
How do I access a page's HTTP response headers via JavaScript?
Related to this question, which was modified to ask about accessing two specific HTTP headers.
Related:
How do I access the HTTP request header fields via JavaScript?
| You can access a page's HTTP response headers in JavaScript using the `fetch` API or the `XMLHttpRequest` object. However, for security reasons, you can only access certain headers due to CORS (Cross-Origin Resource Sharing) policies.
### Using `fetch`
The `fetch` API allows you to send requests to servers and handle... | 34,029 | [
{
"from": "human",
"value": "How do I access a page's HTTP response headers via JavaScript?\nRelated to this question, which was modified to ask about accessing two specific HTTP headers.\n\nRelated:\nHow do I access the HTTP request header fields via JavaScript?\n\n"
},
{
"from": "gpt",
"value"... |
I am working with Crystal Reports and MS SQL Server.
I need to remap the crystal report to point to a different database on the same SQL Server. Is there an automated way of doing this, or do I have to remap for every single report? I am currently doing this by adding a new data connection, and then updating the stored... | To remap Crystal Reports to point to a different database in SQL Server, there are a few approaches you can take, but automating the remapping for multiple reports can be a bit tricky. Here are some suggestions and clarifications regarding your situation:
### Remapping Databases in Crystal Reports
1. **Using Crystal ... | 32,319 | [
{
"from": "human",
"value": "I am working with Crystal Reports and MS SQL Server.\nI need to remap the crystal report to point to a different database on the same SQL Server. Is there an automated way of doing this, or do I have to remap for every single report? I am currently doing this by adding a new dat... |
I'm trying to extract all matches from a EBML definition, which is something like this:
| + A track
| + Track number: 3
| + Track UID: 724222477
| + Track type: subtitles
...
| + Language: eng
...
| + A track
| + Track number: 4
| + Track UID: 745646561
| + Track type: subtitles
...
| + Language: jpn
...
I wan... | To achieve your desired result of capturing all occurrences of `"Language: ???"` that are preceded by `"Track type: subtitles"`, you need to make sure your regex is set up to handle multiple matches properly. The key here is to use a non-greedy match for the content between `"Track type: subtitles"` and `"Language: ???... | 35,086 | [
{
"from": "human",
"value": "I'm trying to extract all matches from a EBML definition, which is something like this:\n| + A track\n| + Track number: 3\n| + Track UID: 724222477\n| + Track type: subtitles\n...\n| + Language: eng\n...\n| + A track\n| + Track number: 4\n| + Track UID: 745646561\n| + Tra... |
I am trying to write a web application in C# ASP.NET 3.5 and want to include a Microsoft Office Access Web Datasheet in my application. I can't find an example on how to use it anywhere.
It's the editing view in a SharePoint grid so I know it's possible, I just can't find out how to implement it.
Any help would be gre... | Integrating a Microsoft Office Access Web Datasheet into an ASP.NET application can be a bit challenging, especially since Access web functionalities are primarily designed for SharePoint environments. However, you can achieve similar functionality using ASP.NET by using the GridView control, which provides a data-boun... | 30,446 | [
{
"from": "human",
"value": "I am trying to write a web application in C# ASP.NET 3.5 and want to include a Microsoft Office Access Web Datasheet in my application. I can't find an example on how to use it anywhere. \nIt's the editing view in a SharePoint grid so I know it's possible, I just can't find out ... |
I get this message:
Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectDistinguishedName', FindValue 'CN=HighBall'.
My web.config setup looks like this;
Authentication is set like...
<authentication mode="Windows" />
The binding... | The error message you're encountering indicates that the application is unable to find the X.509 certificate with the subject distinguished name `CN=HighBall` in the specified certificate store. This can happen for several reasons, so let's walk through some steps to diagnose and potentially resolve the issue.
### Ste... | 33,403 | [
{
"from": "human",
"value": "I get this message:\n\nCannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectDistinguishedName', FindValue 'CN=HighBall'.\n\nMy web.config setup looks like this;\nAuthentication is set like...\... |
This is not yet particularly programing related but, I am very interested in how Vista and XP resolve network names in a home LAN situation.
With Windows 2000, network name resolution was either done via the netbeui protocol - tcp/ip networks needes a wins server. XP and Vista no longer install netbeui by default, so i... | In a home LAN environment using Windows XP and Vista, network name resolution is typically accomplished using several mechanisms that don't necessarily require a WINS server or NetBEUI. Here’s a breakdown of how this works:
### 1. **NetBIOS over TCP/IP (NBT)**
- **NetBIOS Names**: Windows still supports NetBIOS name r... | 32,173 | [
{
"from": "human",
"value": "This is not yet particularly programing related but, I am very interested in how Vista and XP resolve network names in a home LAN situation.\nWith Windows 2000, network name resolution was either done via the netbeui protocol - tcp/ip networks needes a wins server. XP and Vista ... |
Which method would you recommend to pass data from a child view back to it's parent view?
| Passing data from a child view back to its parent view can be accomplished using several methods, depending on the framework or technology you are using. Here are some common approaches across different frameworks:
### 1. **Callback Functions**
- **Description**: Pass a function from the parent to the child as a pr... | 32,049 | [
{
"from": "human",
"value": "Which method would you recommend to pass data from a child view back to it's parent view?\n"
},
{
"from": "gpt",
"value": "Passing data from a child view back to its parent view can be accomplished using several methods, depending on the framework or technology you a... |
What regex pattern would need I to pass to java.lang.String.split() to split a String into an Array of substrings using all whitespace characters (' ', '\t', '\n', etc.) as delimiters?
| To split a string into an array of substrings using all whitespace characters as delimiters in Java, you can use the following regular expression pattern with the `java.lang.String.split()` method:
```java
String[] substrings = yourString.split("\\s+");
```
Here's a breakdown of the regex pattern:
- `\\s` matches an... | 36,413 | [
{
"from": "human",
"value": "What regex pattern would need I to pass to java.lang.String.split() to split a String into an Array of substrings using all whitespace characters (' ', '\\t', '\\n', etc.) as delimiters?\n"
},
{
"from": "gpt",
"value": "To split a string into an array of substrings... |
I realize that the query this question is looking for won't be enough to find every little problem with IDisposable implementations, but every early warning counts, so I'll take what I can get.
I'd like to know if anyone has come up with a CQL query for NDepend that will list all classes that doesn't implement IDisposa... | You can craft a CQLinq query for NDepend to find classes that do not implement `IDisposable`, yet contain fields that are of types that implement `IDisposable`. Below is an example of how you could structure this query:
```csharp
// This query finds all classes that do not implement IDisposable
// but have fields of t... | 35,735 | [
{
"from": "human",
"value": "I realize that the query this question is looking for won't be enough to find every little problem with IDisposable implementations, but every early warning counts, so I'll take what I can get.\nI'd like to know if anyone has come up with a CQL query for NDepend that will list a... |
Does some article or proof exist that .NET applications are immune to low level errors?
I'm talking about the classic pointer errors we can see in a C++ application, memory overflow, problems from the Intel DEP and so on.
I'm talking about .NET applications that do not use "unsafe" code, from what is my experience in ... | .NET applications, when written in a managed environment (using C# or other .NET languages without the `unsafe` keyword), have several inherent protections against low-level errors that are commonly seen in unmanaged languages like C++. Here's an overview of the key points:
### 1. **Managed Memory Model:**
- .NET a... | 33,083 | [
{
"from": "human",
"value": "Does some article or proof exist that .NET applications are immune to low level errors? \nI'm talking about the classic pointer errors we can see in a C++ application, memory overflow, problems from the Intel DEP and so on.\nI'm talking about .NET applications that do not use \"... |
I have a client whose desired Web UI is graphically intense; we would like to gather statistics on the average bandwidth of those connecting to the site. Is there an easy way to do that? The "simplest thing that could possibly work" would seem to be a Flash or Silverlight component that times the download of a file of ... | Using Flash or Silverlight for this purpose is not recommended due to their declining support and the trend towards using HTML5 and JavaScript for web applications. Many browsers have phased out support for Flash, and Silverlight is also largely deprecated. Instead, you can achieve the same goal using modern web techno... | 30,862 | [
{
"from": "human",
"value": "I have a client whose desired Web UI is graphically intense; we would like to gather statistics on the average bandwidth of those connecting to the site. Is there an easy way to do that? The \"simplest thing that could possibly work\" would seem to be a Flash or Silverlight comp... |
Does anyone know of a tool that can verify that a given SQL statement is valid across different databases (oracle, db2, mssql)?
| There are several tools and approaches you can use to verify the validity of SQL statements across different database systems like Oracle, DB2, and SQL Server (MSSQL). Here are a few options:
1. **SQL Fiddle**: SQL Fiddle is a web-based tool that allows you to test SQL queries in different database systems. It support... | 34,590 | [
{
"from": "human",
"value": "Does anyone know of a tool that can verify that a given SQL statement is valid across different databases (oracle, db2, mssql)?\n"
},
{
"from": "gpt",
"value": "There are several tools and approaches you can use to verify the validity of SQL statements across differe... |
I have a program in which I've lost the C++ source code. Are there any good C++ decompilers out there?
I've already ran across Boomerang.
| Recovering C++ source code from compiled binaries can be quite challenging, as compilers optimize and transform code significantly. While you may not get back the original source code, there are some decompilers and tools that can help you analyze and retrieve human-readable code from compiled binaries. Here are some o... | 34,636 | [
{
"from": "human",
"value": "I have a program in which I've lost the C++ source code. Are there any good C++ decompilers out there?\nI've already ran across Boomerang.\n"
},
{
"from": "gpt",
"value": "Recovering C++ source code from compiled binaries can be quite challenging, as compilers optim... |
I made a discovery some time back. Just follow these steps:
Create a .doc/.xls/.ppt file in office 2003. Keep some test data in there and close the file. Now rename the file to change it's file extension to a random string, taking care that it is unassociated, like test.asdfghjkl etc.
Double click the file and it opens... | Your discovery about the behavior of Microsoft Office 2003 files when their extensions are changed is quite interesting and sheds light on how file associations work in Windows.
### How Microsoft Office Handles File Extensions
When you create a file in Microsoft Office and then change its extension, what you're obser... | 31,433 | [
{
"from": "human",
"value": "I made a discovery some time back. Just follow these steps:\nCreate a .doc/.xls/.ppt file in office 2003. Keep some test data in there and close the file. Now rename the file to change it's file extension to a random string, taking care that it is unassociated, like test.asdfghj... |
We're using Microsoft.Practices.CompositeUI.EventBroker to handle event subscription and publication in our application. The way that works is that you add an attribute to your event, specifying a topic name, like this:
[EventPublication("example", PublicationScope.Global)]
public event EventHandler Example;
then you... | In C#, attributes are static metadata that are applied to types, methods, and other members at compile time. Once compiled, you cannot modify or add attributes to methods or properties at runtime. However, there are a few approaches you can take to achieve similar functionality, especially if you're looking to create a... | 34,144 | [
{
"from": "human",
"value": "We're using Microsoft.Practices.CompositeUI.EventBroker to handle event subscription and publication in our application. The way that works is that you add an attribute to your event, specifying a topic name, like this:\n[EventPublication(\"example\", PublicationScope.Global)]\... |
I've searched around for a while today, but I haven't been able to come up with an AutoComplete TextBox code sample for Silverlight 2 Beta 2. The most promising reference was found on nikhilk.net but the online demo doesn't currently render and after downloading a getting the code to compile with Beta 2, I couldn't ge... | Creating an AutoComplete TextBox in Silverlight 2 Beta 2 can be quite challenging due to the limited features and controls available in that version. However, you can achieve this by combining a `TextBox` with a `ListBox` to display the suggestions. Below is a simple example to help you get started:
```xml
<UserContro... | 19,588 | [
{
"from": "human",
"value": "I've searched around for a while today, but I haven't been able to come up with an AutoComplete TextBox code sample for Silverlight 2 Beta 2. The most promising reference was found on nikhilk.net but the online demo doesn't currently render and after downloading a getting the c... |
I can't believe I am asking this...
It has been a while since I used VC6. I set up what I thought was the correct way to include additional directories for include files (I removed another developer's hard coded paths) and put in something like:
%MY_DIR%\include
but this does not work. Am I missing something? Did VC... | In Visual C++ 6 (VC6), when you're setting up include directories in your project settings, the correct way to reference environment variables is indeed using the syntax `$(ENV_VAR)` rather than `%ENV_VAR%`. The use of `$(...)` is a way for the VC6 IDE to resolve the variable at the time it reads the project settings, ... | 35,332 | [
{
"from": "human",
"value": "I can't believe I am asking this...\nIt has been a while since I used VC6. I set up what I thought was the correct way to include additional directories for include files (I removed another developer's hard coded paths) and put in something like:\n%MY_DIR%\\include\nbut this do... |
Since Rails 2.1, if you define a new column in a migration with the type set to :integer and the :limit set to 5 or more, the column actually created in your MySQL database will be of type BigInt. That's perfect.
But I cannot figure out how to create a table with a BigInt primary key.
Any clues?
| In Ruby on Rails, when you create a migration for a table and you want to set a primary key with a `BigInt` type, you can explicitly specify the type of the primary key in the migration.
Here's how you can do it:
1. Generate the migration for your new table:
```bash
rails generate migration CreateYourTableName
... | 35,973 | [
{
"from": "human",
"value": "Since Rails 2.1, if you define a new column in a migration with the type set to :integer and the :limit set to 5 or more, the column actually created in your MySQL database will be of type BigInt. That's perfect.\nBut I cannot figure out how to create a table with a BigInt prim... |
Has anyone tested sorting with Selenium? I'd like to verify that sorting a table in different ways work (a-z, z-a, state, date, etc.). Any help would be very much appreciated.
/Göran
| Yes, you can certainly test sorting functionality in a table using Selenium! Below is a general approach on how to verify that sorting works for different columns (e.g., A-Z, Z-A, state, date) using Python and Selenium WebDriver. The same concept can be applied to other programming languages that support Selenium.
###... | 31,178 | [
{
"from": "human",
"value": "Has anyone tested sorting with Selenium? I'd like to verify that sorting a table in different ways work (a-z, z-a, state, date, etc.). Any help would be very much appreciated.\n/Göran\n"
},
{
"from": "gpt",
"value": "Yes, you can certainly test sorting functionality ... |
I would like to declare a record in Delphi that contains the same layout as it has in C.
For those interested : This record is part of a union in the Windows OS's LDT_ENTRY record. (I need to use this record in Delphi because I'm working on an Xbox emulator in Delphi - see project Dxbx on sourceforge).
Anyway, the reco... | To achieve a record layout in Delphi that matches the C structure you provided, you will need to manually control the packing and size of the fields to ensure it aligns correctly in memory. Since Delphi doesn't directly support bit-fields, you can utilize a combination of packed records and bitwise operations to simula... | 32,800 | [
{
"from": "human",
"value": "I would like to declare a record in Delphi that contains the same layout as it has in C.\nFor those interested : This record is part of a union in the Windows OS's LDT_ENTRY record. (I need to use this record in Delphi because I'm working on an Xbox emulator in Delphi - see proj... |
I have a web server which saves cache files and keeps them for 7 days. The file names are md5 hashes, i.e. exactly 32 hex characters long, and are being kept in a tree structure that looks like this:
00/
00/
00000ae9355e59a3d8a314a5470753d8
.
.
00/
01/
You get the idea.
My problem is that deleting old ... | Managing cache files efficiently, especially when they can accumulate over time, is crucial for the performance of your web server. Here are several strategies that could help you improve the deletion process and manage your cache more effectively:
### 1. **Use a Database for Metadata Management**
Instead of managing ... | 30,892 | [
{
"from": "human",
"value": "I have a web server which saves cache files and keeps them for 7 days. The file names are md5 hashes, i.e. exactly 32 hex characters long, and are being kept in a tree structure that looks like this:\n00/\n 00/\n 00000ae9355e59a3d8a314a5470753d8\n .\n .\n00/\n 01/\n\n... |
I want to start looking at WCF but to be honest before I do I would like to understand more about SOA in general.
I don't really understand the concept of a "Enterprise Service Bus", and am not sure whether it is a pattern/methodology or piece of software. Additionally, the same can be said of a "Message Broker".
On to... | Understanding Service-Oriented Architecture (SOA) and the related concepts can indeed provide a solid foundation for working with technologies like WCF (Windows Communication Foundation). Let's break down the main concepts you mentioned.
### 1. **Service-Oriented Architecture (SOA)**
SOA is an architectural pattern th... | 30,849 | [
{
"from": "human",
"value": "I want to start looking at WCF but to be honest before I do I would like to understand more about SOA in general.\nI don't really understand the concept of a \"Enterprise Service Bus\", and am not sure whether it is a pattern/methodology or piece of software. Additionally, the s... |
My new boss went to a speech where Deliverance, a kind of proxy allowing to add skin to any html output on the fly, was presented. He decided to use it right after that, no matter how young it is.
More here :
http://www.openplans.org/projects/deliverance/introduction
In theory, the system sounds great when you want a n... | Deliverance is an interesting tool that aims to provide a way to apply themes to web content dynamically, using a proxy-based architecture. It can be especially useful in environments where multiple content management systems (CMS) are used, as it allows for consistent theming without needing to dive deeply into each s... | 32,254 | [
{
"from": "human",
"value": "My new boss went to a speech where Deliverance, a kind of proxy allowing to add skin to any html output on the fly, was presented. He decided to use it right after that, no matter how young it is.\nMore here :\nhttp://www.openplans.org/projects/deliverance/introduction\nIn theor... |
Should I use the change or textInput event to capture user input on a TextInput control? Why?
| In the context of handling user input in a TextInput control, whether to use the `change` event or the `input` (often referred to as `textInput` in some frameworks) event depends on your specific requirements and the behavior you want to achieve. Here are some considerations:
### `input` Event (or `textInput` in some ... | 34,891 | [
{
"from": "human",
"value": "Should I use the change or textInput event to capture user input on a TextInput control? Why?\n"
},
{
"from": "gpt",
"value": "In the context of handling user input in a TextInput control, whether to use the `change` event or the `input` (often referred to as `textIn... |
Why does the PRINT statement in T-SQL seem to only sometimes work? What are the constraints on using it? It seems sometimes if a result set is generated, it becomes a null function, I assumed to prevent corrupting the resultset, but could it's output not go out in another result set, such as the row count?
| The `PRINT` statement in T-SQL is primarily used for displaying messages to the user during the execution of a SQL batch or script. However, there are certain constraints and behaviors that might make it seem like the `PRINT` statement is not working as expected in some situations. Here are some key points to consider ... | 34,111 | [
{
"from": "human",
"value": "Why does the PRINT statement in T-SQL seem to only sometimes work? What are the constraints on using it? It seems sometimes if a result set is generated, it becomes a null function, I assumed to prevent corrupting the resultset, but could it's output not go out in another resu... |
I have a Stored Procedure that is constantly failing with the error message "Timeout expired," on a specific user.
All other users are able to invoke the sp just fine, and even I am able to invoke the sp normally using the Query Analyzer--it finishes in just 10 seconds. However with the user in question, the logs show... | To diagnose the timeout issue with the stored procedure for a specific user, you can follow these steps:
1. **Check User Permissions**: Ensure that the user has the necessary permissions to execute the stored procedure and access any underlying tables or views. Sometimes, different users may have different permissions... | 32,402 | [
{
"from": "human",
"value": "I have a Stored Procedure that is constantly failing with the error message \"Timeout expired,\" on a specific user.\nAll other users are able to invoke the sp just fine, and even I am able to invoke the sp normally using the Query Analyzer--it finishes in just 10 seconds. Howe... |
What is the best way to allow a team of programmers to use Netbeans, Eclipse and IntelliJ on the same project, thus eliminating the "which IDE is better" question.
Which files should or should not be checked into source code control?
| To allow a team of programmers to use different Integrated Development Environments (IDEs) like NetBeans, Eclipse, and IntelliJ on the same project while avoiding the "which IDE is better" debate, you should consider the following best practices:
### 1. Use a Common Project Structure
- Define a project structure th... | 31,626 | [
{
"from": "human",
"value": "What is the best way to allow a team of programmers to use Netbeans, Eclipse and IntelliJ on the same project, thus eliminating the \"which IDE is better\" question.\nWhich files should or should not be checked into source code control?\n"
},
{
"from": "gpt",
"value"... |
I was thinking of adding some Achievements to our internal bug-tracking and time logging system. It's connected to an SQL Server back-end.
At first I thought that the system could be run on the database, using triggers to, for example, know when:
you've logged 1000 hours
created 1000 tickets
closed your own ticket
wor... | You're on the right track with the idea of using an event-driven architecture to track achievements in your Win32 application. This design not only allows for better separation of concerns but also provides flexibility in managing and extending achievements without tightly coupling them to your main application logic. ... | 30,724 | [
{
"from": "human",
"value": "I was thinking of adding some Achievements to our internal bug-tracking and time logging system. It's connected to an SQL Server back-end.\nAt first I thought that the system could be run on the database, using triggers to, for example, know when:\n\nyou've logged 1000 hours\ncr... |
Let's have the following class definition:
CThread::CThread ()
{
this->hThread = NULL;
this->hThreadId = 0;
this->hMainThread = ::GetCurrentThread ();
this->hMainThreadId = ::GetCurrentThreadId ();
this->Timeout = 2000; //milliseconds
}
CThread::~CThread ()
{
//waiting for... | In your current implementation, the pointer `m_pMyPointer`, which is allocated in a separate thread, becomes problematic when you try to access it from the main thread. The main issue here is that you are trying to use a pointer to memory allocated in a different thread without ensuring that the allocation has complete... | 33,973 | [
{
"from": "human",
"value": "Let's have the following class definition:\nCThread::CThread ()\n{\n this->hThread = NULL;\n this->hThreadId = 0;\n this->hMainThread = ::GetCurrentThread ();\n this->hMainThreadId = ::GetCurrentThreadId ();\n this->Timeout = 2000; //millisec... |
Are there any libraries out there (preferably a self contained Text Edit Control) for .NET that have Spell Check capabilities. I would like to add the typical red underline to miss-spelled words in the edit area of my application.
Edit: To clarify, this is for WinForms
| Yes, there are several libraries and controls available for WinForms in .NET that include spell-checking capabilities with features such as red underlines for misspelled words. Here are a few options you might consider:
1. **FastColoredTextBox**:
- FastColoredTextBox is a powerful text editor component for .NET Win... | 27,071 | [
{
"from": "human",
"value": "Are there any libraries out there (preferably a self contained Text Edit Control) for .NET that have Spell Check capabilities. I would like to add the typical red underline to miss-spelled words in the edit area of my application.\nEdit: To clarify, this is for WinForms\n"
},... |
How do I import a Python module given its relative path?
For example, if dirFoo contains Foo.py and dirBar, and dirBar contains Bar.py, how do I import Bar.py into Foo.py?
Here's a visual representation:
dirFoo\
Foo.py
dirBar\
Bar.py
Foo wishes to include Bar, but restructuring the folder hierarchy is ... | To import a Python module from a relative path (like `Bar.py` in your case), you can use the following method. Given your directory structure:
```
dirFoo\
Foo.py
dirBar\
Bar.py
```
Here are the steps you can follow to import `Bar.py` from `Foo.py`.
1. **Modify `sys.path`:** You can append the relativ... | 32,963 | [
{
"from": "human",
"value": "How do I import a Python module given its relative path?\nFor example, if dirFoo contains Foo.py and dirBar, and dirBar contains Bar.py, how do I import Bar.py into Foo.py?\nHere's a visual representation:\ndirFoo\\\n Foo.py\n dirBar\\\n Bar.py\n\nFoo wishes to incl... |
In my django application I am using a template to construct email body, one of the parameters is url, note there are two parametes separated by ampersand in the url.
t = loader.get_template("sometemplate")
c = Context({
'foo': 'bar',
'url': 'http://127.0.0.1/test?a=1&b=2',
})
print t.render(c)
After rendering it... | In Django templates, the rendering engine automatically escapes certain characters, including the ampersand (`&`) symbol, to prevent XSS (cross-site scripting) vulnerabilities. When you pass your URL to the template context, it gets encoded to ensure it is safe for display in HTML.
To prevent specific characters from ... | 35,493 | [
{
"from": "human",
"value": "In my django application I am using a template to construct email body, one of the parameters is url, note there are two parametes separated by ampersand in the url.\nt = loader.get_template(\"sometemplate\")\nc = Context({\n 'foo': 'bar',\n 'url': 'http://127.0.0.1/test?a=1... |
I have a Java maven project which includes XSLT transformations. I load the stylesheet as follows:
TransformerFactory tFactory = TransformerFactory.newInstance();
DocumentBuilderFactory dFactory = DocumentBuilderFactory
.newInstance();
dFactory.setNamespaceAware(true);
DocumentBuilder dBuilder = dFac... | The issue you're experiencing is related to how the XSLT processor resolves the `xsl:include` statements when the XSLT stylesheet is loaded from an `InputStream`. When you use relative paths in `href`, the XSLT processor typically resolves them based on the location of the primary stylesheet. However, when you're loadi... | 33,588 | [
{
"from": "human",
"value": "I have a Java maven project which includes XSLT transformations. I load the stylesheet as follows:\nTransformerFactory tFactory = TransformerFactory.newInstance();\n\nDocumentBuilderFactory dFactory = DocumentBuilderFactory\n .newInstance();\n\ndFactory.setNamespa... |
Ok so I've ordered Applying Domain-Driven Design and Patterns: Using .Net, but while I wait for it to arrive I'm looking at starting to apply the techniques in my current project. I really grasp the concepts quite well now, but when I try to apply them I get caught up with the execution and end up leaking my respsonsib... | It's great to hear that you're diving into Domain-Driven Design (DDD) and looking to apply its principles to your current project! The journey can be a bit tricky at first, especially when it comes to maintaining clear boundaries and responsibilities in your code.
### Resources and Samples
1. **DomainDrivenDesign.org... | 33,866 | [
{
"from": "human",
"value": "Ok so I've ordered Applying Domain-Driven Design and Patterns: Using .Net, but while I wait for it to arrive I'm looking at starting to apply the techniques in my current project. I really grasp the concepts quite well now, but when I try to apply them I get caught up with the e... |
public class Item
{
private int _rowID;
private Guid _itemGUID;
public Item() { }
public int Rid
{
get
{
return _rowID;
}
set { }
}
public Guid IetmGuid
{
get
{
... | The issue you're encountering appears to be due to a couple of typos and potential misunderstandings in the code you provided. Let's address them and make sure your code is functioning as expected.
### 1. Correcting the Property Naming
It looks like there's a typo in the property name `IetmGuid`. In the class definit... | 35,313 | [
{
"from": "human",
"value": "public class Item\n{\n private int _rowID;\n private Guid _itemGUID;\n\n public Item() { }\n\n public int Rid\n {\n get\n {\n return _rowID;\n }\n set { }\n\n }\n\n publ... |
I am not a fan of using SQL*PLUS as an interface to Oracle. I usually use yasql, but it hasn't been updated since 2005 and can do with some improvements. A quick Google search shows yasql and SQLPal. I am using linux, so SQLPal is not an option.
Are there any alternatives out there, or am I stuck with an interface... | If you're looking for alternatives to SQL*Plus and yasql for interacting with Oracle databases on Linux, there are several options you can consider:
1. **SQLcl**: This is Oracle's command-line interface that is a modern alternative to SQL*Plus. SQLcl supports many SQL*Plus features and adds enhancements such as comman... | 33,749 | [
{
"from": "human",
"value": "I am not a fan of using SQL*PLUS as an interface to Oracle. I usually use yasql, but it hasn't been updated since 2005 and can do with some improvements. A quick Google search shows yasql and SQLPal. I am using linux, so SQLPal is not an option. \nAre there any alternatives ... |
Is it possible to modify/write data to an XML file without any server-side proxy(e.g. a php or asp script)? Can this be done via javascript? XSLT?
| Modifying or writing data to an XML file directly from a client-side context using JavaScript is generally restricted due to web browser security policies. Client-side JavaScript can read XML files and manipulate their content in memory, but it cannot directly write or save changes back to a file on the server or on th... | 32,343 | [
{
"from": "human",
"value": "Is it possible to modify/write data to an XML file without any server-side proxy(e.g. a php or asp script)? Can this be done via javascript? XSLT?\n"
},
{
"from": "gpt",
"value": "Modifying or writing data to an XML file directly from a client-side context using Java... |
Attempting to deploy a MOSS solution to a UAT server from dev server for the first time. On executing this command
stsadm -o addsolution -filename xxx
I get a "Object reference not set to an instance of an object"
Based on these links: (and others):
[http://social.msdn.microsoft.com/forums/en-US/sharepointdevelopment... | The error you are encountering, "Object reference not set to an instance of an object," along with the SQL Server database access issue you described, suggests that there may be a problem with the permissions or configuration of your SharePoint environment.
Here are some steps you can take to troubleshoot and potentia... | 32,788 | [
{
"from": "human",
"value": "Attempting to deploy a MOSS solution to a UAT server from dev server for the first time. On executing this command \nstsadm -o addsolution -filename xxx\n\nI get a \"Object reference not set to an instance of an object\"\nBased on these links: (and others):\n[http://social.msdn.... |
Essentially what I want is a BlockingQueue of size=1. I have a "listener" thread that simply waits, blocking until an object is put into the queue, and then retrieves it--and a "producer" thread that actually puts the object into the queue.
I can implement this with some synchronized blocks and a BlockingQueue implemen... | Certainly! You can achieve the desired behavior using Java's `Object.wait()` and `Object.notify()` methods to create a simple implementation of the `Wait` interface you defined. This allows a listener thread to wait for a value to be produced without needing a full-fledged `BlockingQueue`. Here's an implementation that... | 31,788 | [
{
"from": "human",
"value": "Essentially what I want is a BlockingQueue of size=1. I have a \"listener\" thread that simply waits, blocking until an object is put into the queue, and then retrieves it--and a \"producer\" thread that actually puts the object into the queue.\nI can implement this with some sy... |
What exactly is this line in the config doing when it is using IIS7 Integrated mode?
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*"
path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Without ... | The line you've provided is part of the configuration for IIS (Internet Information Services), specifically for handling requests related to an ASP.NET application when running in Integrated mode. Let’s break down what each part of this configuration line does:
### Breakdown of the Configuration Line
1. **`<add name=... | 32,121 | [
{
"from": "human",
"value": "What exactly is this line in the config doing when it is using IIS7 Integrated mode?\n<add name=\"UrlRoutingHandler\" preCondition=\"integratedMode\" verb=\"*\"\n path=\"UrlRouting.axd\" type=\"System.Web.HttpForbiddenHandler, System.Web,\n Version=2.0.0.0, Culture=n... |
Is there any way to (unit) test my own HtmlHelpers? In case when I'd like to have custom control (rendered by HtmlHelper) and I know requierements for that control how could I write tests first - and then write code? Is there a specific (nice) way to do that?
Is it worth?
| Unit testing your custom HTML helpers in an ASP.NET application is a great idea, especially if you want to ensure that your code meets the specified requirements and behaves as expected. Here's a structured approach to help you achieve that, including whether it's worth the effort.
### Why Test HTML Helpers?
1. **Ens... | 33,653 | [
{
"from": "human",
"value": "Is there any way to (unit) test my own HtmlHelpers? In case when I'd like to have custom control (rendered by HtmlHelper) and I know requierements for that control how could I write tests first - and then write code? Is there a specific (nice) way to do that? \nIs it worth?\n"
... |
We are troubleshooting a SQL Server 2005 connection issue on a closed-source third-party ASP.NET application. The application is a .NET application and the developing company is using a custom formatted configuration file that stores the SQL Server authentication information.
The application when trying to connect to ... | Debugging a closed-source third-party application can be challenging, especially if you don't have access to the source code. However, there are several approaches you can use to gather information about the SQL Server connection attempts and diagnose the issue:
### 1. **SQL Server Profiler**
SQL Server Profiler is... | 32,826 | [
{
"from": "human",
"value": "We are troubleshooting a SQL Server 2005 connection issue on a closed-source third-party ASP.NET application. The application is a .NET application and the developing company is using a custom formatted configuration file that stores the SQL Server authentication information.\n... |
My problem is:
I have a Canvas which covers part of my Window. The Opacity of the canvas is set to less than 1, i.e. I can view the controls under the Canvas. What I would like to do is place a control, any control, say a Button, on the canvas and not have that Button semitransparent. Is this possible using WPF?
| Yes, it is possible to achieve the effect you're looking for in WPF. When you set the `Opacity` of a Canvas (or any other container), it affects all the children within it, making them semi-transparent as well. However, you can use a workaround to keep the Button (or any other control) fully opaque while allowing the C... | 33,646 | [
{
"from": "human",
"value": "My problem is:\nI have a Canvas which covers part of my Window. The Opacity of the canvas is set to less than 1, i.e. I can view the controls under the Canvas. What I would like to do is place a control, any control, say a Button, on the canvas and not have that Button semitrans... |
So using the system command file we can use file to determine if a file is ASCII Text or "data". I wanted to know if there is a way to check in code which one it was? I want to basically throw a corrupt error if the file is 'data'. I am using ifstream for reading the files. Thanks for any help!
Duplicate of this que... | To determine if a file is ASCII text or binary data in C++, you can read the file and analyze its contents. While the standard library does not provide a direct method for this, you can implement a simple check by reading the file's bytes and looking for non-ASCII characters.
Here's a basic example using `std::ifstrea... | 33,447 | [
{
"from": "human",
"value": "So using the system command file we can use file to determine if a file is ASCII Text or \"data\". I wanted to know if there is a way to check in code which one it was? I want to basically throw a corrupt error if the file is 'data'. I am using ifstream for reading the files. ... |
I'm trying to go deep into Dictionary ADT and Skip List for Java. My textbook doesn't cover a lot about this and whatever it has covered is very complicated. Which is the best online site to get more information on Dictionary ADT and Skip List for Java. I'm looking for the one which talks visually and gives a lot of ex... | For a comprehensive understanding of the Dictionary Abstract Data Type (ADT) and Skip Lists in Java, along with visual aids and examples, here are some recommended online resources:
1. **GeeksforGeeks**:
- This site offers clear explanations, visualizations, and code examples for various data structures and algorit... | 35,074 | [
{
"from": "human",
"value": "I'm trying to go deep into Dictionary ADT and Skip List for Java. My textbook doesn't cover a lot about this and whatever it has covered is very complicated. Which is the best online site to get more information on Dictionary ADT and Skip List for Java. I'm looking for the one w... |
I am currently working on an iPhone 2.1 application. I am new to Objective C, coming from a Java background.
My application has as a base the Utility Application template available in Xcode with the iPhone SDK. Currently I have some controls, such as an UISlider and text box, in the FlipsideView. The UISlider already h... | Welcome to iPhone development and Objective-C! It sounds like you're off to a good start with your application. Since you're looking to share data between views (specifically from `FlipsideView` to `MainView`), it's important to understand how to properly structure your application to facilitate that communication.
#... | 28,457 | [
{
"from": "human",
"value": "I am currently working on an iPhone 2.1 application. I am new to Objective C, coming from a Java background.\nMy application has as a base the Utility Application template available in Xcode with the iPhone SDK. Currently I have some controls, such as an UISlider and text box, i... |
I have a NotifyIcon control that appears in the system tray. How can I find the location (x, y) of the icon on the screen?
Thanks
| To get the location (x, y) of a `NotifyIcon` in the system tray using C#, you can utilize the Windows API. The location of the icon is not directly accessible through the `NotifyIcon` class, so you have to use some P/Invoke calls to find out its position.
Here's a step-by-step example of how to achieve this:
1. Use t... | 32,861 | [
{
"from": "human",
"value": "I have a NotifyIcon control that appears in the system tray. How can I find the location (x, y) of the icon on the screen?\nThanks\n"
},
{
"from": "gpt",
"value": "To get the location (x, y) of a `NotifyIcon` in the system tray using C#, you can utilize the Windows ... |
What I want to do is scroll down the window when I expand elements in my page.
The effect I am trying to achieve is like the Stack Overflow comments. If it expands beyond the page, it scrolls down to fit all the comments in the window.
What is the best way of doing this?
Edit: I am using JQuery.
| To achieve the effect of scrolling down the window when expanding elements on your page using jQuery, you can use the `animate()` method to smoothly scroll the window to the newly expanded element. Here's a step-by-step guide to implement this functionality.
### Step 1: Markup Example
Assuming you have a structure li... | 27,729 | [
{
"from": "human",
"value": "What I want to do is scroll down the window when I expand elements in my page. \nThe effect I am trying to achieve is like the Stack Overflow comments. If it expands beyond the page, it scrolls down to fit all the comments in the window.\nWhat is the best way of doing this?\nEdi... |
Thanks for your support, but will it(integration of exsisting C++ library with iPhone application) effect my application at the time of submision to Apple Store? Are there any chances of disapproval of application from Apple Store?
| Integrating an existing C++ library into your iPhone application is generally permissible and should not inherently lead to issues during the App Store submission process, as long as you adhere to Apple's App Store Review Guidelines. Here are a few considerations to keep in mind to ensure a smooth submission:
1. **Com... | 35,545 | [
{
"from": "human",
"value": "Thanks for your support, but will it(integration of exsisting C++ library with iPhone application) effect my application at the time of submision to Apple Store? Are there any chances of disapproval of application from Apple Store?\n"
},
{
"from": "gpt",
"value": "In... |
I'm setting up CI at present using Thoughtworks Studios' Cruise, Gallio to run xunit.net fact/tests, and ncover 2 to do code-coverage.
I noticed that running the code-coverage pegs one of the four CPUs that our build-agent server has, and wondered whether there was a multi-threaded test-runner that I might use instead,... | When setting up Continuous Integration (CI) with xUnit.net and aiming to utilize multiple CPU cores for running tests, you have a few options to achieve parallel test execution. Here are some suggestions to help you run your tests in parallel and take advantage of your CPU resources:
### 1. Use xUnit.net's Built-in Pa... | 35,391 | [
{
"from": "human",
"value": "I'm setting up CI at present using Thoughtworks Studios' Cruise, Gallio to run xunit.net fact/tests, and ncover 2 to do code-coverage.\nI noticed that running the code-coverage pegs one of the four CPUs that our build-agent server has, and wondered whether there was a multi-thre... |
I have an ASP.NET application that will host multiple tenants (Software-as-a-Service style). Each tenant will have their own domain name (www.mydomain.com, www.yourdomain.com) and their own SSL certificate.
Is there a way to host the application such that all of the tenants are on the same application instance?
I know... | Hosting a multi-tenant ASP.NET application where each tenant has their own custom domain and SSL certificate, while maintaining a single application instance, can be a bit tricky, but it is definitely feasible. Here’s how you can achieve that:
### 1. Use IIS with Application Request Routing (ARR)
You can configure In... | 23,204 | [
{
"from": "human",
"value": "I have an ASP.NET application that will host multiple tenants (Software-as-a-Service style). Each tenant will have their own domain name (www.mydomain.com, www.yourdomain.com) and their own SSL certificate.\nIs there a way to host the application such that all of the tenants are... |
What is the purpose of this UnaryExpression, and how should it be used?
| In programming, a `UnaryExpression` typically refers to an operation that involves a single operand. The purpose of a `UnaryExpression` is to perform a specific operation on that operand, which can vary depending on the programming language and context in which it is used.
### Common Uses of Unary Expressions:
1. **N... | 33,570 | [
{
"from": "human",
"value": "What is the purpose of this UnaryExpression, and how should it be used?\n"
},
{
"from": "gpt",
"value": "In programming, a `UnaryExpression` typically refers to an operation that involves a single operand. The purpose of a `UnaryExpression` is to perform a specific o... |
I've been trying to understand the strict aliasing rules as they apply to the char pointer.
Here this is stated:
It is always presumed that a char* may refer to an alias of any object.
Ok so in the context of socket code, I can do this:
struct SocketMsg
{
int a;
int b;
};
int main(int argc, char** argv)
{
/... | The strict aliasing rules in C and C++ are indeed important to understand, especially when dealing with low-level operations like socket communication, where you're often interpreting raw byte data as structured data.
### Strict Aliasing Rules Overview
1. **Char Pointer as an Alias**: The C standard allows you to us... | 31,250 | [
{
"from": "human",
"value": "I've been trying to understand the strict aliasing rules as they apply to the char pointer.\nHere this is stated:\n\nIt is always presumed that a char* may refer to an alias of any object.\n\nOk so in the context of socket code, I can do this:\nstruct SocketMsg\n{\n int a;\n ... |
I'm trying to use a open source library from a Windows application, and the only pre-built version I can find comes as a file called "lib.dll.a"
What format is this, and can I convert it to a normal dll file?
| The file you have, named `lib.dll.a`, is likely an import library commonly used with the GCC (GNU Compiler Collection) toolchain on Windows, particularly when using MinGW or Cygwin environments. This type of file is not a standard DLL; rather, it is an archive that contains information the linker uses to resolve refere... | 31,733 | [
{
"from": "human",
"value": "I'm trying to use a open source library from a Windows application, and the only pre-built version I can find comes as a file called \"lib.dll.a\"\nWhat format is this, and can I convert it to a normal dll file?\n"
},
{
"from": "gpt",
"value": "The file you have, nam... |
I have an embedded flash that is transparent so it looks like part of the background. I achieved that by setting wmode to transparent.
My problem is that the area underneath the flash becomes inaccessible, even though the flash is transparent. Therefore I cannot click on any links or buttons that are under the flash ob... | To make your embedded Flash object unobtrusive while retaining its transparent features, you can follow these strategies:
1. **Use wmode properly**: You mentioned you have already set `wmode` to `transparent`. However, you may want to ensure that you're also trying `wmode="opaque"` or `wmode="window"` in your Flash em... | 33,097 | [
{
"from": "human",
"value": "I have an embedded flash that is transparent so it looks like part of the background. I achieved that by setting wmode to transparent.\nMy problem is that the area underneath the flash becomes inaccessible, even though the flash is transparent. Therefore I cannot click on any li... |
You can pass a function pointer, function object (or boost lambda) to std::sort to define a strict weak ordering of the elements of the container you want sorted.
However, sometimes (enough that I've hit this several times), you want to be able to chain "primitive" comparisons.
A trivial example would be if you were so... | It sounds like you're tackling a common problem in C++ when it comes to creating flexible sorting criteria for collections. Your approach of building a hierarchy of comparison functions makes sense, and the challenges you've outlined regarding returning values and their interpretations are indeed important to consider.... | 33,115 | [
{
"from": "human",
"value": "You can pass a function pointer, function object (or boost lambda) to std::sort to define a strict weak ordering of the elements of the container you want sorted.\nHowever, sometimes (enough that I've hit this several times), you want to be able to chain \"primitive\" comparison... |
I've got an application that loads .so files as plugins at startup, using dlopen()
The build environment is running on x86 hardware, but the application is being cross compiled for another platform.
It would be great if I could (as part of the automated build process) do a check to make sure that there aren't any unres... | For the requirement of checking unresolved symbols across multiple shared object files (.so files) and the main application binary without deploying, you have a few options. While `nm` can give you a list of symbols in individual files, it doesn't handle cross-references among them very well.
### Suggested Utilities ... | 30,494 | [
{
"from": "human",
"value": "I've got an application that loads .so files as plugins at startup, using dlopen()\nThe build environment is running on x86 hardware, but the application is being cross compiled for another platform.\nIt would be great if I could (as part of the automated build process) do a che... |
I don't want to know how... Just how complicated....
I'm thinking of securing a webservice or 2 based on the incoming client ipaddress of the caller. Is this in any way secure?
Surely if the IPaddress was being spoofed then the result would have to be sent back to the address that was being spoofed and therefore not re... | Securing a web service solely based on the incoming client IP address has several weaknesses and is generally not considered a robust security measure. Let's break down the considerations:
### Risks of IP Address-Based Security
1. **IP Spoofing**: Attackers can easily spoof their IP addresses. While it's true that re... | 33,679 | [
{
"from": "human",
"value": "I don't want to know how... Just how complicated....\nI'm thinking of securing a webservice or 2 based on the incoming client ipaddress of the caller. Is this in any way secure?\nSurely if the IPaddress was being spoofed then the result would have to be sent back to the address ... |
I've got 2 remote databases as part of a query
select p.ID,p.ProjectCode_VC,p.Name_VC,v.*
FROM [serverB].Projects.dbo.Projects_T p
LEFT JOIN [serverA].SOCON.dbo.vw_PROJECT v on
p.ProjectCode_VC = v.PROJ_CODE
The problem is that serverA uses collation Latin1_General_BIN and serverB uses Latin1_General_CP1_CP_AS and th... | You're correct that collation differences can cause issues when trying to perform joins across linked servers in SQL Server. When collations are not compatible, the database engine can refuse to execute the query due to potential conflicts in comparing the character data.
However, since you've found an alternative sol... | 34,041 | [
{
"from": "human",
"value": "I've got 2 remote databases as part of a query \nselect p.ID,p.ProjectCode_VC,p.Name_VC,v.*\nFROM [serverB].Projects.dbo.Projects_T p\nLEFT JOIN [serverA].SOCON.dbo.vw_PROJECT v on\np.ProjectCode_VC = v.PROJ_CODE\n\nThe problem is that serverA uses collation Latin1_General_BIN a... |
I'm trying to create a table with two columns comprising the primary key in MySQL, but I can't figure out the syntax. I understand single-column PKs, but the syntax isn't the same to create a primary key with two columns.
| In MySQL, you can create a composite primary key (a primary key that consists of two or more columns) using the `PRIMARY KEY` constraint in your `CREATE TABLE` statement. The syntax is slightly different from that of a single-column primary key. Here's how you can do it:
### Example of Creating a Table with a Composit... | 29,656 | [
{
"from": "human",
"value": "I'm trying to create a table with two columns comprising the primary key in MySQL, but I can't figure out the syntax. I understand single-column PKs, but the syntax isn't the same to create a primary key with two columns.\n"
},
{
"from": "gpt",
"value": "In MySQL, ... |
I've been trying to programatically feed the paper on a pos printer (Epson TM-U220D). The problem I have is that the last line of the document don't get printed, instead, it is printed as the first line of the next document printed. I tried POS for .NET sending the "ESC|flF" command, also tried to send the raw esc/pos ... | It sounds like you're encountering a common issue when printing to POS thermal printers, such as the Epson TM-U220D. The problem of the last line not being printed on the current document can often be attributed to how the printer buffers the data or how the commands are being sent. Here are a few suggestions you can t... | 32,461 | [
{
"from": "human",
"value": "I've been trying to programatically feed the paper on a pos printer (Epson TM-U220D). The problem I have is that the last line of the document don't get printed, instead, it is printed as the first line of the next document printed. I tried POS for .NET sending the \"ESC|flF\" c... |
Ok, I know how to do this, but I want to know if this is the BEST way.
I have a table called "Topics" which has a list of topics(obv). I have a page with about 20 (+/-10) check boxes with all the different topics a user can subscribe to. I figured the best way to do this is to make a control array of check boxes and p... | When it comes to dynamically managing checkboxes for user subscriptions, there are several approaches you can take, and the best option often depends on your specific requirements, the technologies you're using, and the user experience you want to provide. Here are some considerations and recommendations for implementi... | 32,394 | [
{
"from": "human",
"value": "Ok, I know how to do this, but I want to know if this is the BEST way. \nI have a table called \"Topics\" which has a list of topics(obv). I have a page with about 20 (+/-10) check boxes with all the different topics a user can subscribe to. I figured the best way to do this is ... |
This fails:
my @a = ("a", "b", "c", "d", "e");
my %h = map { "prefix-$_" => 1 } @a;
with this error:
Not enough arguments for map at foo.pl line 4, near "} @a"
but this works:
my @a = ("a", "b", "c", "d", "e");
my %h = map { "prefix-" . $_ => 1 } @a;
why?
| The reason for the error you encountered has to do with how the `map` function is evaluated in Perl.
In Perl, the `map` function applies a block of code or an expression to each element of a list, transforming it and returning a new list. When using the curly braces `{ }`, Perl expects a complete block of code that in... | 31,328 | [
{
"from": "human",
"value": "This fails:\nmy @a = (\"a\", \"b\", \"c\", \"d\", \"e\");\nmy %h = map { \"prefix-$_\" => 1 } @a;\n\nwith this error:\nNot enough arguments for map at foo.pl line 4, near \"} @a\"\n\nbut this works:\nmy @a = (\"a\", \"b\", \"c\", \"d\", \"e\");\nmy %h = map { \"prefix-\" . $_ =>... |
I want your suggestion on the following pseudo-code. Please suggest how could I improve it, whether or not I could use some design patterns.
// i'm receiving a string containing : id operation arguments
data = read(socket);
tokens = tokenize(data," "); // tokenize the string based on spaces
if(tokens[0] == "A") {
... | You're correct in recognizing that deeply nested `if-else` statements can lead to code that's hard to maintain and understand. A good way to improve this pseudo-code is to utilize design patterns that will help make the code more modular and easier to extend. Here are some suggestions:
### 1. Command Pattern
The Comma... | 26,073 | [
{
"from": "human",
"value": "I want your suggestion on the following pseudo-code. Please suggest how could I improve it, whether or not I could use some design patterns.\n\n// i'm receiving a string containing : id operation arguments\ndata = read(socket);\ntokens = tokenize(data,\" \"); // tokenize the... |
I have an application that is built against OpenSceneGraph (2.6.1) and therefore indirectly OpenGL. The application initializes and begins to run, but then I get the following exception "attempt was made to execute an invalid lock sequence" in OpenGL32.dll. When I re-run it, I sometimes get this exception, and sometime... | The errors you're encountering, particularly "attempt was made to execute an invalid lock sequence" and "privileged instruction," suggest that there may be issues related to threading or memory corruption in your application. Here are some steps you can take to troubleshoot and debug the problem:
### 1. **Check Thread... | 33,548 | [
{
"from": "human",
"value": "I have an application that is built against OpenSceneGraph (2.6.1) and therefore indirectly OpenGL. The application initializes and begins to run, but then I get the following exception \"attempt was made to execute an invalid lock sequence\" in OpenGL32.dll. When I re-run it, I... |
I'm running Vista on my laptop, but would like to virtualize Ubuntu so that I can boot it from time to time for my personal use (e.g. running code, testing Linux programs). I tried this with Virtual PC 2007 (I allocated 1G of RAM for Ubuntu), and it was very slow. Should I try Hyper-V instead? (Note: I know very little... | Using virtualization software can be a great way to run multiple operating systems on a single machine, but the performance can vary based on several factors, including the host operating system, hardware specifications, and the virtualization software itself.
### Considerations for Virtualizing Ubuntu on Windows Vist... | 34,971 | [
{
"from": "human",
"value": "I'm running Vista on my laptop, but would like to virtualize Ubuntu so that I can boot it from time to time for my personal use (e.g. running code, testing Linux programs). I tried this with Virtual PC 2007 (I allocated 1G of RAM for Ubuntu), and it was very slow. Should I try H... |
I recently built a program that parses a remote file from \some_server\c$\directory\file.xls and it works fine on my local machine as just a normal aspx page.
Then I put the program into web part
form on my VM SharePoint server and I
get this error: Access to the path
'\some_server\c$\directory\file.xls'
is d... | The issue you're encountering is likely related to permissions and the identity under which your SharePoint application is running. Here are some steps you can take to diagnose and resolve the issue:
### Understanding the Access Denied Error
When accessing a file on a remote server, SharePoint (or any application) wil... | 29,866 | [
{
"from": "human",
"value": "I recently built a program that parses a remote file from \\some_server\\c$\\directory\\file.xls and it works fine on my local machine as just a normal aspx page. \n\nThen I put the program into web part\n form on my VM SharePoint server and I\n get this error: Access to the p... |
Building an iPhone project results in:
Failed to launch simulated application: SpringBoard failed to launch application with error: 7
And the app doesn't install on the simulator. What's this all about? What's SpringBoard and what is error 7?
| The error message you're encountering—specifically "SpringBoard failed to launch application with error: 7"—is related to the iOS Simulator environment in Xcode.
### What is SpringBoard?
SpringBoard is the application that manages the home screen and handles the launch of other applications on iOS devices. It acts as ... | 35,471 | [
{
"from": "human",
"value": "Building an iPhone project results in: \n\nFailed to launch simulated application: SpringBoard failed to launch application with error: 7\n\nAnd the app doesn't install on the simulator. What's this all about? What's SpringBoard and what is error 7?\n"
},
{
"from": "gpt"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.