instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I have 2 pages on the screen (actually more as it is a kind of proprietary web application with a few frames and I cannot figure out actually the whole structure)
I enter the search criteria in a page, I press ‘Enter’ on the keyboard , search is executed and the other view is filled with data. There is a button ‘Confir... | The behavior you're observing with the alerts is likely related to the way JavaScript execution is handled in the browser. Let's break this down:
1. **Focus Timing**: The `focus()` method in JavaScript tries to set focus on the specified element immediately when called. However, the focus might not change if the brows... | 43,990 | [
{
"from": "human",
"value": "I have 2 pages on the screen (actually more as it is a kind of proprietary web application with a few frames and I cannot figure out actually the whole structure)\nI enter the search criteria in a page, I press ‘Enter’ on the keyboard , search is executed and the other view is f... |
I have the following string:
<SEM>electric</SEM> cu <SEM>hello</SEM> rent <SEM>is<I>love</I>, <PARTITION />mind
I want to find the last "SEM" start tag before the "PARTITION" tag. not the SEM end tag but the start tag. The result should be:
<SEM>is <Im>love</Im>, <PARTITION />
I have tried this regular expression:
<S... | To find the last `<SEM>` start tag before the `<PARTITION />` tag, taking into consideration that there may be other tags between them, you can use a regular expression that looks for the `<SEM>` tag and captures everything up to the `<PARTITION />`.
Here's a regex pattern you can use:
```regex
<SEM>.*?(?=<PARTITION\... | 49,795 | [
{
"from": "human",
"value": "I have the following string:\n<SEM>electric</SEM> cu <SEM>hello</SEM> rent <SEM>is<I>love</I>, <PARTITION />mind\n\nI want to find the last \"SEM\" start tag before the \"PARTITION\" tag. not the SEM end tag but the start tag. The result should be:\n<SEM>is <Im>love</Im>, <PARTI... |
Using only MySQL, I'm seeing if it's possible run an insert statement ONLY if the table is new. I successfully created a user variable to see if the table exists. The problem is that you can't use "WHERE" along with an insert statement. Any ideas on how to get this working?
// See if the "country" table exists -- savin... | In MySQL, you cannot use a `WHERE` clause directly in an `INSERT` statement. However, you can achieve the desired result by using a stored procedure, a conditional control structure, or a combination of a check and an insert statement.
Here are two common methods to perform an insert only if the table is new (or if it... | 46,908 | [
{
"from": "human",
"value": "Using only MySQL, I'm seeing if it's possible run an insert statement ONLY if the table is new. I successfully created a user variable to see if the table exists. The problem is that you can't use \"WHERE\" along with an insert statement. Any ideas on how to get this working?\n/... |
I'm writing an HTML form generation library. There's a top-level Form class, and at the bottom there are classes for each type of HTML form input object (Select, Textfield, Radio, etc.). There's a class in between, that holds groupings of 1 or more semantically related input objects.
For example, one type of this class... | Choosing a name for your intermediate classes that clearly conveys their purpose is important for maintainability and usability. Here are some suggestions that might resonate with the purpose of grouping related form inputs:
1. **FieldGroup** - Simple and descriptive, indicating a group of fields together.
2. **InputS... | 49,183 | [
{
"from": "human",
"value": "I'm writing an HTML form generation library. There's a top-level Form class, and at the bottom there are classes for each type of HTML form input object (Select, Textfield, Radio, etc.). There's a class in between, that holds groupings of 1 or more semantically related input obj... |
I use codes below to see a result like picture 1, but a result like picture 2 is coming. What should be done to solve it?
aspx code:
<asp:datalist id="dtlUrun" runat="server" RepeatDirection="Horizontal">
<ItemTemplate>
<table class="dtlTable">
<tr>
... | To help you resolve the issue where the displayed output (Picture 2) does not match the expected output (Picture 1), we can analyze the ASP.NET code and CSS you provided. Here are some possible adjustments and debugging steps:
### 1. Data Source Check
First, ensure that the data being returned from `objUrun.GetBy_MAMU... | 45,078 | [
{
"from": "human",
"value": "I use codes below to see a result like picture 1, but a result like picture 2 is coming. What should be done to solve it?\naspx code:\n<asp:datalist id=\"dtlUrun\" runat=\"server\" RepeatDirection=\"Horizontal\">\n <ItemTemplate>\n <table class=\"dtlTab... |
I'd like to write a simple detail formatter that displays byte[] data in the form of a String (using String.<init>([B) to do the dirty work).
However, I'm not sure how to find the class name for [B to use when creating the formatter. Is this even possible? Or, alternatively, is there another way to view byte arrays a... | In Java, the notation `[B` indicates an array of bytes (i.e., `byte[]`). However, getting the exact name of this class in a string format can be a bit tricky since it is a special type. When you want to create a detail formatter to display a `byte[]` as a string, you typically need to register a detail formatter for th... | 47,891 | [
{
"from": "human",
"value": "I'd like to write a simple detail formatter that displays byte[] data in the form of a String (using String.<init>([B) to do the dirty work).\nHowever, I'm not sure how to find the class name for [B to use when creating the formatter. Is this even possible? Or, alternatively, ... |
I want to get a list of all Django auth user with a specific permission group, something like this:
user_dict = {
'queryset': User.objects.filter(permisson='blogger')
}
I cannot find out how to do this. How are the permissions groups saved in the user model?
| In Django, user permissions are managed through the `Group` and `Permission` models, which are part of the `django.contrib.auth` app. To filter users by a specific group (e.g., users who belong to the "blogger" group), you need to filter users based on their related `Group` objects.
Here’s how you can get all users in... | 49,852 | [
{
"from": "human",
"value": "I want to get a list of all Django auth user with a specific permission group, something like this:\nuser_dict = {\n 'queryset': User.objects.filter(permisson='blogger')\n}\n\nI cannot find out how to do this. How are the permissions groups saved in the user model?\n"
},
... |
Why does it (apparently) make a difference whether I pass null as an argument directly, or pass an Object that I assigned the value null?
Object testVal = null;
test.foo(testVal); // dispatched to foo(Object)
// test.foo(null); // compilation problem -> "The method foo(String) is ambiguous"
public void foo(St... | The behavior you're observing in Java regarding method overloading and the use of `null` as an argument is a common point of confusion. Let's break it down step by step.
### Method Overloading and Argument Matching
When you have multiple overloaded methods in Java, the compiler determines which method to invoke based... | 48,540 | [
{
"from": "human",
"value": "Why does it (apparently) make a difference whether I pass null as an argument directly, or pass an Object that I assigned the value null?\nObject testVal = null;\ntest.foo(testVal); // dispatched to foo(Object)\n// test.foo(null); // compilation problem -> \"The method foo... |
Is there a way to vertically stack selected td elments? I would like to have the same table, though display it differently using only css. Would this be possible, or do I have to have separate html markups? I would like to try to have the same html markup, though use different css for different sites/looks.
<table>
<... | Yes, you can achieve a vertical stacking of selected `<td>` elements using only CSS. One common approach to do this is by utilizing CSS Flexbox or CSS Grid. Below, I'll show you an example of how to use Flexbox to create the desired effect without altering your HTML markup.
### CSS Flexbox Solution
Here's how you can... | 46,243 | [
{
"from": "human",
"value": "Is there a way to vertically stack selected td elments? I would like to have the same table, though display it differently using only css. Would this be possible, or do I have to have separate html markups? I would like to try to have the same html markup, though use different c... |
Normally it's easy to see unused variables in Netbeans, just a grey squiggly line.
But how would I find all of these unused variables in my project or of a single class?
Reason: I'm debugging a code base which had lots of copy and paste, but it wasn't done carefully. There's many bug of not replacing with the right v... | To find unused variables in your NetBeans project or a specific class, you can follow these steps:
### Option 1: Using Code Analysis
1. **Enable Warnings for Unused Variables:**
- Go to `Tools` > `Options`.
- Click on the `Editor` tab, then select `Hints`.
- In the "Code" section, make sure "Unused Local Var... | 45,821 | [
{
"from": "human",
"value": "Normally it's easy to see unused variables in Netbeans, just a grey squiggly line. \nBut how would I find all of these unused variables in my project or of a single class?\nReason: I'm debugging a code base which had lots of copy and paste, but it wasn't done carefully. There's... |
The example below throws an InvalidOperationException, "Collection was modified; enumeration operation may not execute." when executing the code.
var urls = new List<string>();
urls.Add("http://www.google.com");
foreach (string url in urls)
{
// Get all links from the url
List<string> newUrls = GetLinks(url);... | You are correct that modifying a collection while iterating over it results in an `InvalidOperationException`. Instead of modifying the original list during the iteration, you can create a separate list to hold the newly found URLs. Here’s one way to rewrite your code using a loop and a queue to avoid recursion, which ... | 48,412 | [
{
"from": "human",
"value": "The example below throws an InvalidOperationException, \"Collection was modified; enumeration operation may not execute.\" when executing the code. \nvar urls = new List<string>();\nurls.Add(\"http://www.google.com\");\n\nforeach (string url in urls)\n{\n // Get all links fro... |
I have not been able to find a way to cancel/terminate asynchronous read operation after successful HttpWebRequest. There is no way to set timeout, ThreadPool.RegisterWaitForSingleObject is not working too. And closing the underlying socket is not an option too because neither HttpWebRequest/Reponse provide access to i... | Handling asynchronous HTTP operations, especially with `HttpWebRequest` and its underlying streams, can be tricky when it comes to managing timeouts or cancellations. Here are a few strategies you might consider to deal with the situation where the server fails to close the socket and you end up waiting indefinitely du... | 47,197 | [
{
"from": "human",
"value": "I have not been able to find a way to cancel/terminate asynchronous read operation after successful HttpWebRequest. There is no way to set timeout, ThreadPool.RegisterWaitForSingleObject is not working too. And closing the underlying socket is not an option too because neither H... |
I have a c++ program that is using the openMPI library to pass messages between different processors. It is a parallel program that uses a genetic algorithm to get a good solution for the traveling salesperson problem. I am trying to set up the MPI environment on my two dual processor computers at my house so that I ... | It sounds like you are encountering an issue where all processes in your MPI program are reporting as rank 0, which typically indicates that the processes are not being properly initialized or are incorrectly configured. Here are a few steps and considerations to help you troubleshoot and fix this issue:
1. **Check MP... | 43,875 | [
{
"from": "human",
"value": "I have a c++ program that is using the openMPI library to pass messages between different processors. It is a parallel program that uses a genetic algorithm to get a good solution for the traveling salesperson problem. I am trying to set up the MPI environment on my two dual p... |
I'm developing a Django app, and I'm trying to use Python's logging module for error/trace logging. Ideally I'd like to have different loggers configured for different areas of the site. So far I've got all of this working, but one thing has me scratching my head.
I have the root logger going to sys.stderr, and I hav... | The issue you're facing with the logger being configured twice is a common one in Django (and Python) applications due to the way logging and Django's settings module are structured. When you start your Django application, especially when using a development server or certain testing setups, the `settings.py` file can ... | 47,471 | [
{
"from": "human",
"value": "I'm developing a Django app, and I'm trying to use Python's logging module for error/trace logging. Ideally I'd like to have different loggers configured for different areas of the site. So far I've got all of this working, but one thing has me scratching my head.\nI have the ... |
I am running two different sites on two different servers with two different domains. One site is running Joomla, the other Moodle. I have configured the Moodle server to base its authentication on the users table on the Joomla site, so we have an authoritative source of user information.
What I'd like to do is this: a... | Implementing a secure and efficient single sign-on (SSO) solution between Joomla and Moodle requires careful consideration to ensure that user credentials are not exposed. Here’s an approach you can take to accomplish this using token-based authentication, while keeping the users’ passwords secure.
### Suggested Appro... | 46,266 | [
{
"from": "human",
"value": "I am running two different sites on two different servers with two different domains. One site is running Joomla, the other Moodle. I have configured the Moodle server to base its authentication on the users table on the Joomla site, so we have an authoritative source of user in... |
Using JDBC (with jt400 driver / connection, naming=system) I'm running these SQL statements:
"CREATE ALIAS QTEMP/SOURCETEMP FOR " + library + "/" + file + " (" + member + ")"
"SELECT SRCDTA FROM QTEMP/SOURCETEMP"
"DROP ALIAS QTEMP/SOURCETEMP"
This works. However, when the member String has a . in it this confuses eve... | When using the `jt400` driver to interact with an IBM i (AS/400) database, dealing with member names that contain a period (`.`) can be problematic because periods are typically used as delimiters in SQL syntax (e.g., separating the library from the file).
To manage this issue, you can handle the member names with quo... | 46,616 | [
{
"from": "human",
"value": "Using JDBC (with jt400 driver / connection, naming=system) I'm running these SQL statements:\n\"CREATE ALIAS QTEMP/SOURCETEMP FOR \" + library + \"/\" + file + \" (\" + member + \")\"\n\"SELECT SRCDTA FROM QTEMP/SOURCETEMP\"\n\"DROP ALIAS QTEMP/SOURCETEMP\"\n\nThis works. Howev... |
In the Application_Error method in Global.asax I am trying to retrieve a value from session state.
I am able to access session state as long as I throw the exception. EG:
thow new Exception("Test exception");
However if it is an unhandled exception, i get the following error when trying to access session state: "Sess... | In ASP.NET, the behavior you're experiencing is due to how and when the session state is made available within the application's lifecycle, particularly in the context of unhandled exceptions.
### Explanation
1. **Session State Availability**: The ASP.NET session state is generally available during the execution of t... | 47,640 | [
{
"from": "human",
"value": "In the Application_Error method in Global.asax I am trying to retrieve a value from session state.\nI am able to access session state as long as I throw the exception. EG: \nthow new Exception(\"Test exception\");\n\nHowever if it is an unhandled exception, i get the following e... |
I'm using windbg to examine some crash dumps sent in by an app. There seems to be some correlation between a crash I'm seeing and having a certain 3rd party DLL loaded into the process (a flaky Winsock LSP, I suspect). To make this sort of analysis easier in the future, is there a windbg script that would just show m... | Yes, you can create a WinDbg script that filters the list of loaded modules to show only non-Microsoft DLLs. Below is a simple WinDbg script you can use to achieve this.
1. Open WinDbg and load your crash dump.
2. Enter the following script in the command window, or save it as a `.cmd` file and run it when you have y... | 49,847 | [
{
"from": "human",
"value": "I'm using windbg to examine some crash dumps sent in by an app. There seems to be some correlation between a crash I'm seeing and having a certain 3rd party DLL loaded into the process (a flaky Winsock LSP, I suspect). To make this sort of analysis easier in the future, is the... |
I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example "-Dmy.prop=value".
I am wondering if there is a cleaner way of doing this by specifying the property values in the context.xml file or some other tomcat configuration file. I would like to do this because... | In Apache Tomcat, especially in versions like 5.5, you don't have a direct way to specify system properties (the ones you would typically define with the `-D` option) directly within the `context.xml` file or other configuration files. However, there are a few alternative approaches to achieve similar results:
### 1. ... | 46,076 | [
{
"from": "human",
"value": "I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example \"-Dmy.prop=value\".\nI am wondering if there is a cleaner way of doing this by specifying the property values in the context.xml file or some other tomcat configu... |
I am a beginner at SQL Server and I have a question about how best to do this.
I have a table that looks like this:
ID Parent Level
1 NULL 0
2 1 1
3 1 1
4 2 2
5 2 2
6 3 2
7 2 2
8 5 4
9 4 ... | To update the `Level` in your table based on the `Parent` relationship, you will want to adjust the level of each entry so that it is always one more than the level of its parent. This means that for any row, the `Level` should be calculated as `Parent.Level + 1`.
To accomplish this, you can use a Common Table Expres... | 48,195 | [
{
"from": "human",
"value": "I am a beginner at SQL Server and I have a question about how best to do this.\nI have a table that looks like this:\nID Parent Level\n1 NULL 0\n2 1 1\n3 1 1\n4 2 2\n5 2 2\n6 3 2\n7 ... |
Having some SSIS permissions issue.
I am calling the SSIS package in my .net console application with:
Package pkg = app.LoadFromSqlServer(packagePath, serverName, serverUsername, serverPassword, dtsEvents);
It is working when manually running it using the windows accout, but fails with the above call in my console ap... | When you're encountering permission issues while executing an SSIS package from a .NET console application, there are several factors to consider, especially when it works when run manually under a Windows account. Here are some steps and considerations to help troubleshoot and resolve the issue:
1. **Check SQL Server... | 45,871 | [
{
"from": "human",
"value": "Having some SSIS permissions issue.\nI am calling the SSIS package in my .net console application with:\nPackage pkg = app.LoadFromSqlServer(packagePath, serverName, serverUsername, serverPassword, dtsEvents);\n\nIt is working when manually running it using the windows accout, b... |
I have a fairly standard rails app and would like to be able to access the basic CRUD (Create, Update, Delete) operations as well as queries I have added, from an iPhone app. Rails provides the REST API for these operations more or less out of the box.
What is the best approach to deal with the REST/XML part on the ip... | To interact with a Rails API from an iPhone app, you can leverage the RESTful nature of your Rails backend. Here's a step-by-step approach to set this up, including libraries and techniques you might find useful.
### 1. Set Up Your Rails API
Ensure that your Rails application has a properly configured REST API. This ... | 44,849 | [
{
"from": "human",
"value": "I have a fairly standard rails app and would like to be able to access the basic CRUD (Create, Update, Delete) operations as well as queries I have added, from an iPhone app. Rails provides the REST API for these operations more or less out of the box. \nWhat is the best approac... |
I'm trying to achieve a 50px space at the bottom of my page, below the main content area so that no matter what text size the user is at, or how much content happens to be inside the page - there is always a proceeding 50px space after the content area which will make either the container div(transparent) or body show.... | To ensure that there is always a 50px space at the bottom of your page after the main content area, you can use a combination of CSS properties. Here’s a clean approach to achieve this:
### HTML Structure
Make sure your HTML structure is as follows, with a wrapper `div` for the main content:
```html
<!DOCTYPE html>
<... | 48,886 | [
{
"from": "human",
"value": "I'm trying to achieve a 50px space at the bottom of my page, below the main content area so that no matter what text size the user is at, or how much content happens to be inside the page - there is always a proceeding 50px space after the content area which will make either the... |
I have a directory on a linux box that I want to make publicly readable using Tomcat (5.5). I think this is easy to set up but can't find the appropriate documentation. Is there a simple way to accomplish this?
| Yes, you can make a directory publicly readable through Tomcat (5.5) by serving the content from that directory using a web application. Here's a step-by-step guide on how to set it up:
### Step 1: Create a Directory
First, create a directory that you want to serve publicly. You can do this from the terminal:
```bas... | 46,008 | [
{
"from": "human",
"value": "I have a directory on a linux box that I want to make publicly readable using Tomcat (5.5). I think this is easy to set up but can't find the appropriate documentation. Is there a simple way to accomplish this?\n"
},
{
"from": "gpt",
"value": "Yes, you can make a d... |
One of our programs is erroring out because a stored procedure was "created with QUOTED_IDENTIFIER option ON". This is a Microsoft SQL Server (8).
All that happened to it yesterday was:
Stored procedures were editted.
A table was created.
I have removed the edits. I have deleted the table. The error is still coming up... | The issue you are facing with the "QUOTED_IDENTIFIER option ON" typically arises when there are conflicts with how identifiers are used in your SQL statements, especially when you are using strings and identifiers interchangeably.
To troubleshoot which stored procedure is causing the problem, you can follow these step... | 48,908 | [
{
"from": "human",
"value": "One of our programs is erroring out because a stored procedure was \"created with QUOTED_IDENTIFIER option ON\". This is a Microsoft SQL Server (8). \nAll that happened to it yesterday was:\nStored procedures were editted.\nA table was created.\nI have removed the edits. I have ... |
When converting from PNG to JPG using the MagickWand API, how do I set the background to white for transparent pixels?
| When converting a PNG image with transparent pixels to JPG using the MagickWand API, you will want to set the background color to white so that the transparent areas become white instead of remaining transparent.
Here's a step-by-step guide on how to achieve this:
1. **Initialize the MagickWand**: Before you start, ... | 46,232 | [
{
"from": "human",
"value": "When converting from PNG to JPG using the MagickWand API, how do I set the background to white for transparent pixels?\n"
},
{
"from": "gpt",
"value": "When converting a PNG image with transparent pixels to JPG using the MagickWand API, you will want to set the backg... |
I'm using Fedex's web services and getting an annoying error right up front before I can actually get anywhere.
There was an error in serializing body of message addressValidationRequest1: 'Unable to generate a temporary class (result=1).
error CS0030: Cannot convert type 'FedEx.InterOp.AddressValidationServiceReferenc... | The error you're encountering is related to the serialization of the request object being sent to the FedEx Address Validation web service. The message indicates that there is a mismatch in the expected types—specifically, the service expects an array of `ParsedElement` but is receiving a single `ParsedElement` instead... | 42,275 | [
{
"from": "human",
"value": "I'm using Fedex's web services and getting an annoying error right up front before I can actually get anywhere.\nThere was an error in serializing body of message addressValidationRequest1: 'Unable to generate a temporary class (result=1).\nerror CS0030: Cannot convert type 'Fed... |
I have an API call in my application where I am checking the time taken for a single call. I have put this in a FOR loop and using 10000 calls to get the average times of all calls. Now the issue which came up was that the actual application using the API, is multi-threaded. If I wish to make my application also do the... | To implement multi-threading in C++ for making concurrent API calls, you can use the C++ Standard Library's `<thread>` and `<mutex>` headers to create and manage threads. If you want to measure the time taken for each API call and calculate an average over multiple calls, you can also use `<chrono>` for timing.
Here ... | 45,131 | [
{
"from": "human",
"value": "I have an API call in my application where I am checking the time taken for a single call. I have put this in a FOR loop and using 10000 calls to get the average times of all calls. Now the issue which came up was that the actual application using the API, is multi-threaded. If ... |
I am writing an application where all the request to the internet should go from it like in firewall. so that i can block the request for a particular website. In my case the program will be running on the same machine. I have tried the promiscous method but using that we can only capture all the packets comming and go... | Creating an application that acts as a local firewall to block certain websites involves several components. Given that you're trying to create a program that intercepts all internet requests originating from the same machine, you might consider the following approaches:
### 1. Using a Proxy Server
One common approach... | 44,223 | [
{
"from": "human",
"value": "I am writing an application where all the request to the internet should go from it like in firewall. so that i can block the request for a particular website. In my case the program will be running on the same machine. I have tried the promiscous method but using that we can on... |
I'm trying to create a custom WPF control that is draggable, but I also need to animate it as it is dragged. I need to override OnMouseDown to implement the dragging functionality, but I also want my animation triggered on the MouseDown event.
Without dragging functionality--i.e., when OnMouseDown is not overriden--the... | To create a custom WPF control that is both draggable and animatable, you need to manage the mouse events and the animations carefully. If you override `OnMouseDown`, you should still ensure that the animation is triggered when the mouse is pressed, as you've noticed that overriding it may stop the animation from being... | 43,643 | [
{
"from": "human",
"value": "I'm trying to create a custom WPF control that is draggable, but I also need to animate it as it is dragged. I need to override OnMouseDown to implement the dragging functionality, but I also want my animation triggered on the MouseDown event.\nWithout dragging functionality--i.... |
I'm using version 3.3.2, I know that regular Eclipse for Java does variable highlighting.
Notepad++ does it regardless of what language you're using (if you select any text, it highlights similar text)
I know it's not critically important, and a back/forward incremental search is an adequate workaround, but it would be... | It looks like you are exploring the features of Eclipse and comparing it to Notepad++. You're right that Eclipse has some powerful features, especially with the proper plugins installed.
Since you mentioned that you were using PDT (PHP Development Tools), upgrading to the latest version (2.0 as you noted) could bring... | 49,221 | [
{
"from": "human",
"value": "I'm using version 3.3.2, I know that regular Eclipse for Java does variable highlighting.\nNotepad++ does it regardless of what language you're using (if you select any text, it highlights similar text)\nI know it's not critically important, and a back/forward incremental search... |
I'm deving PHP at the moment using Visual Studio as my IDE. I've installed the Phalanger Visutal studio integration to get PHP projects etc but I want VS to recognise the PHP start and end tags like the standard ASP ones.
i.e when I type <% %> into the html editor, I want the PHP tags to behave the same <? ?>
I've... | To configure Visual Studio to recognize PHP tags (`<? ?>`) similarly to how it recognizes ASP tags (`<% %>`), you'll need to make some adjustments to the settings. However, Visual Studio's built-in support for PHP is limited, and since you're using Phalanger, you may face some limitations.
Here’s a general approach yo... | 48,080 | [
{
"from": "human",
"value": "I'm deving PHP at the moment using Visual Studio as my IDE. I've installed the Phalanger Visutal studio integration to get PHP projects etc but I want VS to recognise the PHP start and end tags like the standard ASP ones. \ni.e when I type <% %> into the html editor, I want ... |
What's the difference between a keystore and a truststore?
| A keystore and a truststore are both security mechanisms used to manage cryptographic keys and certificates, but they serve different purposes in the context of secure communications, such as those using SSL/TLS. Here's a breakdown of the differences:
### Keystore
- **Purpose**: A keystore is used to store private key... | 48,892 | [
{
"from": "human",
"value": "What's the difference between a keystore and a truststore?\n"
},
{
"from": "gpt",
"value": "A keystore and a truststore are both security mechanisms used to manage cryptographic keys and certificates, but they serve different purposes in the context of secure communi... |
While playing around with localization using Matt Hawley's approach. I wonder if someone has figured to localize routes. I can do this using global resources per site. But when I would try to make it a users choice (so users can switch between languages) the architecture does not allow it because the routes are mapped ... | When dealing with localization of routes in a web application, you want to enable users to switch languages dynamically, which presents a unique challenge because routes are typically configured at application startup. Here are some strategies you might consider:
### 1. **Dynamic Route Localization:**
Instead of defi... | 45,594 | [
{
"from": "human",
"value": "While playing around with localization using Matt Hawley's approach. I wonder if someone has figured to localize routes. I can do this using global resources per site. But when I would try to make it a users choice (so users can switch between languages) the architecture does no... |
I have a database for an E-commerce storefront. MSSQL 2008.
I have a table called Products and a table called Tags. This is a many to many relationship that is bound together by a table called ProductTags.
Products:
id, name, price
Tags:
id, name, sortorder, parentid(allow nulls)
ProductTags:
productid, tagid
I'm tryin... | To create the desired view that includes the `Tags` information along with the `ProductCount` and `ChildTagCount`, you can use a combination of `JOIN` statements and aggregate functions. Below is an example SQL query that defines the view based on your requirements.
Here's how you can create the view:
```sql
CREATE V... | 49,365 | [
{
"from": "human",
"value": "I have a database for an E-commerce storefront. MSSQL 2008.\nI have a table called Products and a table called Tags. This is a many to many relationship that is bound together by a table called ProductTags.\nProducts:\nid, name, price\nTags:\nid, name, sortorder, parentid(allow ... |
I have one site that is displaying html content that needs to be displayed on another site (first site is front end to content management system).
So site1 page = http://site1/pagecontent
and on site 2 (http://site2/pagecontent) I need to be able to display the contents shown on site 1 page.
I am using .Net C# (MVC), a... | Yes, you can fetch and display HTML content from one site to another in an ASP.NET MVC application without using an `<iframe>`. You can achieve this by making an HTTP request to the source site, retrieving the HTML content, and then rendering that content in your view. Here's a basic example of how you can do this usin... | 47,733 | [
{
"from": "human",
"value": "I have one site that is displaying html content that needs to be displayed on another site (first site is front end to content management system).\nSo site1 page = http://site1/pagecontent\nand on site 2 (http://site2/pagecontent) I need to be able to display the contents shown ... |
I came across this article on "A List Apart" that suggests spliting css information in (at least) three separate files, one for typography, one for layout and one for color information. Color seems pretty obvious, but how would you explain to your average programmer (that would be me) what's type and what's layout?
| Sure! Let's break down the concepts of typography and layout in CSS and explain why it's beneficial to separate these into different files.
### Typography
Typography refers to the style and appearance of text in your design. This includes:
- **Font Families**: The typeface you are using (e.g., Arial, Times New Roman,... | 47,704 | [
{
"from": "human",
"value": "I came across this article on \"A List Apart\" that suggests spliting css information in (at least) three separate files, one for typography, one for layout and one for color information. Color seems pretty obvious, but how would you explain to your average programmer (that woul... |
I am trying to guarantee the integrity of a file after download. I store the MD5 of the file in database and compare that MD5 to the file after it is downloaded. However, I always get different MD5 results when I hash the file after it is downloaded. I am wondering if the byte array that is being hashed contains the me... | When calculating the MD5 hash of a file, it is important to ensure that you are hashing the actual content of the file, not any additional metadata associated with it. The MD5 hash is generated based on the raw byte content of the file, so if you are consistently getting different MD5 results after downloading, it is l... | 46,939 | [
{
"from": "human",
"value": "I am trying to guarantee the integrity of a file after download. I store the MD5 of the file in database and compare that MD5 to the file after it is downloaded. However, I always get different MD5 results when I hash the file after it is downloaded. I am wondering if the byte a... |
I need to understand a good way to design a web page with dynamically updated graphs. It should be something close to what stock market graphs look like (e.g. Google Finance), although with a bit more complicated functionality, which is not the point. Naturally I am thinking of writing an ajaxy-style flash control, whi... | While Flash was once a popular choice for creating dynamic web content and interactive applications, it has been phased out and is no longer supported by most browsers as of 2020. Consequently, it's highly advisable to consider modern alternatives. Here’s a guide on how to approach designing a web page with dynamically... | 44,791 | [
{
"from": "human",
"value": "I need to understand a good way to design a web page with dynamically updated graphs. It should be something close to what stock market graphs look like (e.g. Google Finance), although with a bit more complicated functionality, which is not the point. Naturally I am thinking of ... |
I want to display print dialog in servlet/jsp. Below is my code:
DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet () ;
PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
PrintService defaultService = PrintServiceLookup.l... | The code you've provided for displaying a print dialog and sending print jobs is designed for a desktop application that interacts with the local printer subsystem directly. In a web application (Servlet/JSP), you typically cannot interact directly with the client's printer settings or display a print dialog. This is b... | 44,978 | [
{
"from": "human",
"value": "I want to display print dialog in servlet/jsp. Below is my code:\nDocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\nPrintRequestAttributeSet pras = new HashPrintRequestAttributeSet () ;\nPrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\nPrint... |
I'm trying to use Rhinomocks 3.5 and the new lambda notation to mock some tests. I've read this, but have so many more questions. Are there any complete examples out there, especially for a MVC type of architecture?
For example what is the best way to mock this.
public void OnAuthenticateUnitAccount()
{
... | Using Rhino Mocks with lambda notation to create mocks and stubs for unit testing in an MVC architecture can indeed be a bit confusing at first, especially when dealing with events. Let's break down the code you provided and improve upon it to ensure it meets your testing needs.
In your case, you want to test the beha... | 45,993 | [
{
"from": "human",
"value": "I'm trying to use Rhinomocks 3.5 and the new lambda notation to mock some tests. I've read this, but have so many more questions. Are there any complete examples out there, especially for a MVC type of architecture? \nFor example what is the best way to mock this.\n publi... |
I've been doing some performance testing around the use of System.Diagnostics.Debug, and it seems that all code related to the static class Debug gets completely removed when the Release configuration is built. I was wondering how the compiler knows that. Maybe there is some class or configuration attribute that allows... | The behavior you're observing with the `System.Diagnostics.Debug` class is indeed a product of the C# compiler and its handling of conditional compilation symbols. When you build your project in Release mode, the compiler removes code that is conditionally compiled using the `DEBUG` symbol.
The key to this is the use ... | 44,441 | [
{
"from": "human",
"value": "I've been doing some performance testing around the use of System.Diagnostics.Debug, and it seems that all code related to the static class Debug gets completely removed when the Release configuration is built. I was wondering how the compiler knows that. Maybe there is some cla... |
I am adding a custom background image to my navigation bar by creating an image view and doing a [navigationController.navigationBar addSubview:imageView].
The background comes in fine. But as soon as I do this, my other navigation items start behaving in a strange manner. Sometimes the navigationItem.title appears, th... | Adding a custom background image to your navigation bar by directly adding a subview like this can lead to unexpected behavior because the navigation bar manages its own subviews and layout. When you manually add a subview, you may disrupt the layout and rendering of the navigation items, causing the issues you're expe... | 48,955 | [
{
"from": "human",
"value": "I am adding a custom background image to my navigation bar by creating an image view and doing a [navigationController.navigationBar addSubview:imageView].\nThe background comes in fine. But as soon as I do this, my other navigation items start behaving in a strange manner. Some... |
I have started to play a little with Qt 4. And then I have come across a problem with the Qt Designer.
In the Signal/Slots editor I can only setup the connections that are listed there, and not all the slots are listed.
If I try to add it manualy in the .ui file, the connection would not work.
If I add it in the ui_*.h... | When working with Qt Designer, it's common to encounter issues with signal/slot connections, especially when not all slots are listed or accessible in the Signal/Slots editor. Here are some suggestions to help you work around this limitation:
1. **Check Slot Accessibility**: Ensure that the slots you want to connect t... | 46,393 | [
{
"from": "human",
"value": "I have started to play a little with Qt 4. And then I have come across a problem with the Qt Designer.\nIn the Signal/Slots editor I can only setup the connections that are listed there, and not all the slots are listed.\nIf I try to add it manualy in the .ui file, the connectio... |
I'm having trouble trying to optimize the following query for sql server 2005. Does anyone know how could I improve it. Each one of the tables used there have about 40 million rows each. I've tried my best trying to optimize it but I manage to do the exact opposite.
Thanks
SELECT
cos
, SIN
FROM
... | Optimizing SQL queries, especially against large tables, can be quite challenging. Given your scenario, here are some strategies you can consider to improve the performance of your query:
1. **Check Existing Indexes**: Since you already mentioned that there's an index on `cos` and `SIN`, ensure that it is a composite ... | 38,694 | [
{
"from": "human",
"value": "I'm having trouble trying to optimize the following query for sql server 2005. Does anyone know how could I improve it. Each one of the tables used there have about 40 million rows each. I've tried my best trying to optimize it but I manage to do the exact opposite.\nThanks\nSEL... |
It appears that on CDMA Blackberry 8330, almost every mp3 file I'm trying to play using J2ME, gets cut-of a few seconds before it's actual end. Does anybody has a clue?
| The issue you're experiencing with the Blackberry 8330 and MP3 playback in J2ME could be due to a few reasons:
1. **File Format Compatibility**: Ensure that the MP3 files you are using are encoded in a format that is compatible with the Blackberry's media player. Sometimes, specific encoding settings can cause playbac... | 49,423 | [
{
"from": "human",
"value": "It appears that on CDMA Blackberry 8330, almost every mp3 file I'm trying to play using J2ME, gets cut-of a few seconds before it's actual end. Does anybody has a clue?\n"
},
{
"from": "gpt",
"value": "The issue you're experiencing with the Blackberry 8330 and MP3 pl... |
I have a site that I've developed that makes decent use of Javascript, and minimal use of AJAX for a few things. The site worked fine on the iPhone until I added the function to create an HttpRequest handle at which point all Javascript on the iPhone now silently fails. So, I have a few questions.
(1) It seems that AJA... | It seems you are facing some issues with AJAX functionality on the iPhone. Let's address each of your questions:
### (1) Does AJAX work on the iPhone?
AJAX (using XMLHttpRequest) does work on the iPhone's web browser (Safari). However, older versions of iOS may have had limitations or bugs that could affect AJAX funct... | 43,711 | [
{
"from": "human",
"value": "I have a site that I've developed that makes decent use of Javascript, and minimal use of AJAX for a few things. The site worked fine on the iPhone until I added the function to create an HttpRequest handle at which point all Javascript on the iPhone now silently fails. So, I ha... |
I'm evaluating subversion's branch/merge capabilities, and I decided to do a simple test - I branched an existing project, changed a comment in one file, and then did a merge reintegrate via Tortoise.
It failed:
Command: Reintegrate merge https://oscar/svn/Baxtech/ViM/Branches/Test3 into C:\Inntec\VS2008\Baxtech\ViM
... | Hi Brian,
It sounds like you're encountering a common issue with Subversion's merge tracking and reintegration process, particularly with its handling of mergeinfo. The error message you're seeing indicates that there are revisions in the branch that have not been merged back into the trunk or reintegration target. He... | 45,934 | [
{
"from": "human",
"value": "I'm evaluating subversion's branch/merge capabilities, and I decided to do a simple test - I branched an existing project, changed a comment in one file, and then did a merge reintegrate via Tortoise.\nIt failed:\n\nCommand: Reintegrate merge https://oscar/svn/Baxtech/ViM/Branch... |
Questions:
What does the kernel do if you stick a shell-script into the shebang line?
How does the Kernel know which interpreter to launch?
Explanation:
I recently wanted to write a wrapper around /usr/bin/env because my CGI Environment does not allow me to set the PATH variable, except globally (which of course suc... | Let's break down your questions regarding the shebang line and how the kernel interacts with it.
### What does the kernel do if you stick a shell-script into the shebang line?
When you execute a script in a Unix-like operating system, the kernel uses the shebang (i.e., `#!`) line to determine which interpreter to use... | 44,718 | [
{
"from": "human",
"value": "Questions:\n\nWhat does the kernel do if you stick a shell-script into the shebang line? \nHow does the Kernel know which interpreter to launch?\n\nExplanation:\nI recently wanted to write a wrapper around /usr/bin/env because my CGI Environment does not allow me to set the PATH... |
Hey all, I have something of an interesting requirement for my project. I need a has_one relationship where it is either one class or the other, but without inheritance. I could get away with inheritance if it is the only way, but the two associate records have completely different data and aren't related at all.
Wha... | Certainly! You can achieve the behavior you're looking for using polymorphic associations in Rails. Polymorphic associations allow a model to belong to more than one other model on a single association. In your case, you want `Foo` to have a relationship with either `Bar` or `Baz`, but they do not share common data str... | 48,689 | [
{
"from": "human",
"value": "Hey all, I have something of an interesting requirement for my project. I need a has_one relationship where it is either one class or the other, but without inheritance. I could get away with inheritance if it is the only way, but the two associate records have completely diff... |
I have a framework that loads a lot of child collections from a non-database source. I recently got a use case where the resource is on network drives, and it is taking forever to get the collections loaded. I still need to support the eager loading scenario, but I now need to add lazy loading.
I had the solution to th... | It sounds like you're dealing with a challenging scenario of loading collections from a network resource, where both eager loading and lazy loading need to be effectively managed. While it's difficult to point to a specific resource without more context, I can provide some general strategies that can help you implement... | 43,831 | [
{
"from": "human",
"value": "I have a framework that loads a lot of child collections from a non-database source. I recently got a use case where the resource is on network drives, and it is taking forever to get the collections loaded. I still need to support the eager loading scenario, but I now need to a... |
I have a GridView that has columns such as:
| A | B C | D E / F |
I want these to be wrapped in a particular way - that is, I do not want to leave it up to the browser to work out whether to wrap or not depending on the column width. So in the above example I may want the following:
| A | B ... | To achieve the desired wrapping in a GridView where you have specific cell content that you want to display on multiple lines, you can use HTML and CSS styling to control the presentation. Here's how you can approach this:
1. **Use HTML `<br/>` Tags:** You mentioned that you tried `<br/>` tags, but it's worth ensuring... | 46,297 | [
{
"from": "human",
"value": "I have a GridView that has columns such as:\n| A | B C | D E / F |\n\nI want these to be wrapped in a particular way - that is, I do not want to leave it up to the browser to work out whether to wrap or not depending on the column width. So in the above example ... |
I would like to do the equivalent off this (ruby code) in python for a Django project I am working on. I want to make a filmstrip image of X number of images in a folder.
| To create a filmstrip image from multiple images in a directory using Python for a Django project, you can utilize the Pillow library (PIL) for image manipulation. Below is a step-by-step guide, along with example code to help you achieve this.
### Step 1: Install Pillow
If you haven’t already installed Pillow, you c... | 47,001 | [
{
"from": "human",
"value": "I would like to do the equivalent off this (ruby code) in python for a Django project I am working on. I want to make a filmstrip image of X number of images in a folder. \n"
},
{
"from": "gpt",
"value": "To create a filmstrip image from multiple images in a director... |
I have a dependency which is scoped as "system".
I'd like to know if there's a way to define the attached source and javadoc for the dependency. This seems like something that should've been taken care of, but I can't seem to fine any documentation on it or why it was neglected.
I am specifically looking for the confi... | In Maven, when you use a dependency with the scope set to "system," it requires you to provide the path to the JAR file on your local file system. However, the "system" scope does not support the automatic handling of source or Javadoc attachments as it does for dependencies with other scopes (like "compile" or "runtim... | 44,023 | [
{
"from": "human",
"value": "I have a dependency which is scoped as \"system\". \nI'd like to know if there's a way to define the attached source and javadoc for the dependency. This seems like something that should've been taken care of, but I can't seem to fine any documentation on it or why it was neglec... |
I am a newbie in the software development field. I am hungry for more avenues through which I can develop, nurture, and mature in my development, scripting, and programming skills, more so outside of work time. I'd like to know what type of set-up (hardware and/or software) would be extremely beneficial or that others ... | It's great to hear that you're eager to develop your skills in software development! Setting up a conducive home office is an important step in fostering your growth. Here are some recommendations for both hardware and software that can help you on your journey:
### Hardware Setup
1. **Computer**:
- **Laptop vs. ... | 45,393 | [
{
"from": "human",
"value": "I am a newbie in the software development field. I am hungry for more avenues through which I can develop, nurture, and mature in my development, scripting, and programming skills, more so outside of work time. I'd like to know what type of set-up (hardware and/or software) woul... |
We are investigating the Magento ecommerce platform and refining our deployment and version control strategy.
Right now, we are looking for the best way to keep multiple environments in sync (e.g. QA/Development environments/Production) when it comes to settings that are adjusted in the admin interface (e.g. Adding pro... | Managing multiple environments in Magento while maintaining consistency across them can be challenging, especially with a platform that heavily relies on configurations set through the admin interface. However, with a well-structured approach, you can streamline the process. Here are some recommendations and best pract... | 45,276 | [
{
"from": "human",
"value": "We are investigating the Magento ecommerce platform and refining our deployment and version control strategy.\nRight now, we are looking for the best way to keep multiple environments in sync (e.g. QA/Development environments/Production) when it comes to settings that are adjust... |
I have created 2 dropdownlists that are binded to a SQL DB and then pulling up a GridView. But, more specifically is there a way to have 3 user picked boxes and then have a Gridview show up? I would like to have a quick efficient way to do this without problems. I created the first 2 DDLs with autopostback and not w... | To achieve your goal of having three user-selected dropdowns and showing the results in a GridView or FormView based on those selections, you can follow these steps. Below is a streamlined approach for implementing three dropdown lists, where the selection of each dropdown list can influence the subsequent dropdowns an... | 43,662 | [
{
"from": "human",
"value": "I have created 2 dropdownlists that are binded to a SQL DB and then pulling up a GridView. But, more specifically is there a way to have 3 user picked boxes and then have a Gridview show up? I would like to have a quick efficient way to do this without problems. I created the... |
I'm preparing to send mass email to customers which is in html + images.
What are general rules to do make it display correctly in most popular mail clients?
EDIT:
Well it's for my customers - about few k clients.
My question is - how to code this email that it will display correctly in customer mailclient(thunderbir... | Creating an HTML email that displays correctly across various mail clients can be challenging due to varying support for HTML and CSS features. Here are some general rules and best practices to help ensure your email looks good in popular mail clients like Thunderbird, Outlook, and Gmail:
### 1. Use Inline CSS
- **Inl... | 44,079 | [
{
"from": "human",
"value": "I'm preparing to send mass email to customers which is in html + images. \nWhat are general rules to do make it display correctly in most popular mail clients?\nEDIT:\nWell it's for my customers - about few k clients.\nMy question is - how to code this email that it will displa... |
I've been seeing so much recently about functional programming and Clojure looks particularly interesting. While I 'understand' the basic description of what it is, I can't figure out how I would use it on a day to day basis as a web developer, if I can at all. A lot of what I have read focuses on the maths side of fun... | Functional programming (FP) is not unrelated to web development at all; in fact, it can be quite beneficial in building web applications. Clojure, as a functional programming language that runs on the Java Virtual Machine (JVM), brings many functional programming concepts that can improve your web development experienc... | 43,420 | [
{
"from": "human",
"value": "I've been seeing so much recently about functional programming and Clojure looks particularly interesting. While I 'understand' the basic description of what it is, I can't figure out how I would use it on a day to day basis as a web developer, if I can at all. A lot of what I h... |
I was thinking of implementing shortcut keys in a pet web application, I am developing for me. I am using c# and asp.net.
I have seen very few web-sites( frankly I remember only g-mail), which have shortcut keys.
Has anyone ever implemented shortcut keys for a web application, if yes how to go about it?
Thanks.
| Implementing shortcut keys in a web application can enhance user experience significantly, especially for applications that require frequent interactions, like a pet management application. Here’s a general guide on how to implement keyboard shortcuts using C# and ASP.NET (or any modern web technology stack).
### Step... | 44,996 | [
{
"from": "human",
"value": "I was thinking of implementing shortcut keys in a pet web application, I am developing for me. I am using c# and asp.net. \nI have seen very few web-sites( frankly I remember only g-mail), which have shortcut keys. \nHas anyone ever implemented shortcut keys for a web applicatio... |
Is there a Java-based program (executable-jar) that can format java code (indenting/spacing)?
If it would be configurable, that would be great.
| Yes, there are several Java-based tools that can format Java code and can be run as executable JAR files. Here are a couple of popular options:
### 1. **Google Java Format**
Google Java Format is a program that reformats Java source code to comply with Google Java Style. It can be run from the command line and is avai... | 49,581 | [
{
"from": "human",
"value": "Is there a Java-based program (executable-jar) that can format java code (indenting/spacing)?\nIf it would be configurable, that would be great.\n"
},
{
"from": "gpt",
"value": "Yes, there are several Java-based tools that can format Java code and can be run as execu... |
I'm using MySQL replication, and I'd like a status script running on the slave to report the last statement that was replicated over to the slave.
I can use "SHOW SLAVE STATUS" to get the current read and execute positions. But how do I use that information with mysqlbinlog to read the last entry? Assuming the slave ... | To find the last statement that was replicated to your MySQL slave server, you can indeed use the `SHOW SLAVE STATUS` command, which provides the necessary information about the master log file and the position up to which the slave has replicated.
However, when you want to extract the last executed statement from the... | 47,121 | [
{
"from": "human",
"value": "I'm using MySQL replication, and I'd like a status script running on the slave to report the last statement that was replicated over to the slave.\nI can use \"SHOW SLAVE STATUS\" to get the current read and execute positions. But how do I use that information with mysqlbinlog ... |
I'm researching this for a project and I'm wondering what other people are doing to prevent stale CSS and JavaScript files from being served with each new release. I don't want to append a timestamp or something similar which may prevent caching on every request.
I'm working with the Spring 2.5 MVC framework and I'm a... | Preventing stale CSS and JavaScript files from being served while still allowing for effective caching can be a bit of a balancing act. Here are several strategies you might consider for your Spring 2.5 MVC project:
1. **Versioning Files**: Instead of appending a timestamp, you can use version numbers in your file nam... | 47,589 | [
{
"from": "human",
"value": "I'm researching this for a project and I'm wondering what other people are doing to prevent stale CSS and JavaScript files from being served with each new release. I don't want to append a timestamp or something similar which may prevent caching on every request. \nI'm working w... |
I'm trying to get this:
//C.h
#ifndef C_H
#define C_H
#include "c.h"
class C
{
public:
C();
int function(int, int);
};
#endif
which is defined in this:
//c.cpp
#include "c.h"
C::C()
{
}
int C::function(int a, int b)
{
return a * b;
}
to work in this:
//crp.cpp
#include <iostream>
#include "c.... | It looks like you're running into a linking issue due to the way your project is set up. You have separate source files, and it seems like your C++ compiler is not linking them together properly. Let's walk through the steps to ensure everything works correctly.
### Issues in Your Code
1. **Circular Include Guard**: I... | 46,868 | [
{
"from": "human",
"value": "I'm trying to get this:\n//C.h\n#ifndef C_H\n#define C_H\n#include \"c.h\"\n\nclass C\n{\n public:\n C();\n int function(int, int);\n};\n#endif\n\nwhich is defined in this:\n//c.cpp\n#include \"c.h\"\nC::C()\n{\n}\nint C::function(int a, int b)\n{\n return a ... |
I have the following XML document:
<projects>
<project>
<name>Shockwave</name>
<language>Ruby</language>
<owner>Brian May</owner>
<state>New</state>
<startDate>31/10/2008 0:00:00</startDate>
</project>
<project>
<name>Other</name>
<language>Erlang</language>
<owner>Takashi Miike</ow... | Certainly! To transform your XML document to the desired CSV format using XSLT, you can use the following XSLT stylesheet. This stylesheet will take each `<project>` element and output its child elements in the desired comma-separated format.
Here’s the XSLT code:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:st... | 45,400 | [
{
"from": "human",
"value": "I have the following XML document:\n<projects>\n <project>\n <name>Shockwave</name> \n <language>Ruby</language> \n <owner>Brian May</owner> \n <state>New</state> \n <startDate>31/10/2008 0:00:00</startDate> \n </project>\n <project>\n <name>Other</name> \n <lan... |
Do you know any resources that teach to good habits of working in UNIX command line?
EDIT: I don't mean general books about shell or man pages. I mean the things that you can only see watching professionals working with command line. For example when changing frequently between two directories they use "pushd" command... | Absolutely! Developing good habits while working in the UNIX command line is a valuable skill, and observing professional practices can help a lot. Here are some resources and tips to help you cultivate effective command line habits:
### 1. **Tutorials and Guides**
- **"The Linux Command Line" by William Shotts**: Whi... | 43,888 | [
{
"from": "human",
"value": "Do you know any resources that teach to good habits of working in UNIX command line?\nEDIT: I don't mean general books about shell or man pages. I mean the things that you can only see watching professionals working with command line. For example when changing frequently between... |
I have a number of projects in a solution file that have unit tests written for them and I want to set them up to be run by our continuous integration server. However, because many of the tests have been written poorly and have not been run regularly, there are many that are failing.
I don't have the time at the moment... | It's great that you recognize the importance of having your unit tests run in a continuous integration (CI) environment, even if they aren't all currently passing. Here are some strategies to consider that might improve your approach to handling failing tests while still providing value:
### 1. **Use a Dedicated Test ... | 48,247 | [
{
"from": "human",
"value": "I have a number of projects in a solution file that have unit tests written for them and I want to set them up to be run by our continuous integration server. However, because many of the tests have been written poorly and have not been run regularly, there are many that are fai... |
We have an HttpHandler that deals directly with binary posts over HTTP from custom client software. The client software occasionally sends data which results in IIS 7 responding with a 400 - Bad Request. Since the "400 Bad Request" is special in that HTTP.SYS transparently handles it in kernel mode without notifying us... | Handling a 400 Bad Request error in ASP.NET, especially in the context of IIS and HTTP.SYS, can indeed be challenging due to the way that HTTP.SYS handles low-level HTTP requests in kernel mode. Unfortunately, when a 400 error is generated by HTTP.SYS, the ASP.NET pipeline is bypassed, meaning that you cannot directly ... | 46,463 | [
{
"from": "human",
"value": "We have an HttpHandler that deals directly with binary posts over HTTP from custom client software. The client software occasionally sends data which results in IIS 7 responding with a 400 - Bad Request. Since the \"400 Bad Request\" is special in that HTTP.SYS transparently han... |
Is it possible to use 2 CSS classes that have the same name for the selectors, etc. in the same HTML file? If so, how do you differentiate between the two when styling elements?
| Yes, it is possible to use two CSS classes with the same name in the same HTML file. However, you need to be aware that the way you apply styles will depend on the specificity and the order in which the styles are declared.
### Differentiating Between Classes with the Same Name
1. **Different Selectors**: Even if the... | 46,052 | [
{
"from": "human",
"value": "Is it possible to use 2 CSS classes that have the same name for the selectors, etc. in the same HTML file? If so, how do you differentiate between the two when styling elements?\n"
},
{
"from": "gpt",
"value": "Yes, it is possible to use two CSS classes with the same... |
Given the following XML 'template':
<Request module="CRM" call="list_service_features" id="{ID}">
<block name="auth">
<a name="username" format="text">{USERNAME}</a>
<a name="password" format="password">{PASSWORD}</a>
<a name="client-id" format="counting">{CLIENT-ID}</a>
</block>
<a name="service-i... | You can achieve your goal of setting the values in the XML using LINQ to XML with a combination of `Descendants`, `FirstOrDefault`, and proper comparison of attributes. Here's a concise way to set the values for each of the `<a>` nodes, including those inside the `<block>` element.
First, make sure to include the nece... | 44,857 | [
{
"from": "human",
"value": "Given the following XML 'template':\n<Request module=\"CRM\" call=\"list_service_features\" id=\"{ID}\">\n <block name=\"auth\">\n <a name=\"username\" format=\"text\">{USERNAME}</a>\n <a name=\"password\" format=\"password\">{PASSWORD}</a>\n <a name=\"client-id\" f... |
I have successfully connected to an HTTP server with ActionScript 3 over sockets. The only problem is, the server is sending chunked HTTP. Is there a generic function in any other language I can look at that clearly shows how to decode the chunking? I'm pretty sure there are no ActionScript libraries around for this.
| Yes, you can look at examples in other programming languages to understand how to decode chunked HTTP responses. Here's a generic function in Python that demonstrates how to decode chunked transfer encoding. The concept can be applied similarly in other languages.
### Python Example
```python
def decode_chunked_respo... | 43,065 | [
{
"from": "human",
"value": "I have successfully connected to an HTTP server with ActionScript 3 over sockets. The only problem is, the server is sending chunked HTTP. Is there a generic function in any other language I can look at that clearly shows how to decode the chunking? I'm pretty sure there are no ... |
I need to implement webservices in an upcoming project and wanted to know what are the main points to base the decision on whether to implement using java or .NET
I'm a C++er...
| Choosing between Java and .NET for implementing web services involves several considerations. Here are the main points to help you decide:
### 1. **Development Environment**
- **Java**: Utilizes tools like Eclipse, IntelliJ IDEA, or NetBeans. It's cross-platform, running on any OS with a JVM.
- **.NET**: Primari... | 46,068 | [
{
"from": "human",
"value": "I need to implement webservices in an upcoming project and wanted to know what are the main points to base the decision on whether to implement using java or .NET\nI'm a C++er...\n"
},
{
"from": "gpt",
"value": "Choosing between Java and .NET for implementing web ser... |
I'm trying to get started with USSD. I'm familiar with other forms of SMS.
Ultimately i want to use USSD as part of a real-time payment platform.
Thanks.
| Getting started with USSD (Unstructured Supplementary Service Data) can be a rewarding endeavor, especially for developing a real-time payment platform. Here’s a structured approach to help you get started:
### 1. Understand USSD Basics
**What is USSD?**
- USSD is a protocol used by GSM cellular telephones to communi... | 44,226 | [
{
"from": "human",
"value": "I'm trying to get started with USSD. I'm familiar with other forms of SMS.\nUltimately i want to use USSD as part of a real-time payment platform.\nThanks.\n"
},
{
"from": "gpt",
"value": "Getting started with USSD (Unstructured Supplementary Service Data) can be a r... |
Sorry if this is a bit long whinded... consider this:
I have a COM+ application in a namespace called Company that exposes an object called Server which has the following methods:
bool Server.Execute(IOptions options)
IOptions Server.CreateOptions()
IOptions simply has a couple of boolean read/write properties as fol... | Hi Carl,
The issue you're facing relates to how COM+ handles type marshaling and security when dealing with objects that are passed between processes, especially across machine boundaries.
When you create an instance of `IOptions` using `s.CreateOptions()` on the server side, that instance is managed by the COM+ appl... | 47,959 | [
{
"from": "human",
"value": "Sorry if this is a bit long whinded... consider this:\nI have a COM+ application in a namespace called Company that exposes an object called Server which has the following methods:\nbool Server.Execute(IOptions options)\n\nIOptions Server.CreateOptions()\n\nIOptions simply has a... |
How can I combine two images?
I mean I have two images: one small and another big one. I want to add small image onto big one at a specific point and I need to get an UIImage as the result.
I have tried CGCreateImageFromMask but that makes small image to cover bigger image completely.
| To combine two images in iOS, you can use Core Graphics to draw the smaller image onto the larger image at a specific point. Here's a step-by-step approach to accomplish this:
1. Create a new context with the size of the larger image.
2. Draw the larger image in the context.
3. Draw the smaller image at the desired po... | 46,563 | [
{
"from": "human",
"value": "How can I combine two images? \nI mean I have two images: one small and another big one. I want to add small image onto big one at a specific point and I need to get an UIImage as the result. \nI have tried CGCreateImageFromMask but that makes small image to cover bigger image c... |
Open App.Path & "\Folder\" & str(0) For Output
Seems to get a path not found however if directly before that I do
MsgBox App.Path & "\Folder\" & str(0)
It Provides the correct directory/filename that I want
and if I replace that string with the direct path in quotes it works fine however that won't be very good for ... | The issue you're experiencing seems to be related to how the path is being constructed or how the folders are being accessed in your application. Let's break it down and address potential causes and solutions.
1. **Path Construction**: It's important to ensure that `App.Path` is returning the correct base path and tha... | 46,251 | [
{
"from": "human",
"value": "Open App.Path & \"\\Folder\\\" & str(0) For Output\n\nSeems to get a path not found however if directly before that I do\nMsgBox App.Path & \"\\Folder\\\" & str(0)\n\nIt Provides the correct directory/filename that I want\nand if I replace that string with the direct path in qu... |
I have a MS SQL table that I don't have any control over and I need to write to. This table has a int primary key that isn't automatically incremented. I can't use stored procs and I would like to use Linq to SQL since it makes other processing very easy.
My current solution is to read the last value, increment it, try... | Your current approach to handle inserting records with a non-auto-incrementing primary key is functional, but it can indeed lead to performance issues and possible contention in a multi-threaded environment. The method of reading the maximum ID, incrementing it, and retrying can be risky if multiple processes are tryin... | 48,269 | [
{
"from": "human",
"value": "I have a MS SQL table that I don't have any control over and I need to write to. This table has a int primary key that isn't automatically incremented. I can't use stored procs and I would like to use Linq to SQL since it makes other processing very easy.\nMy current solution is... |
I'm using a streamwriter to log errors
the way it has been designed (please dont ask why) is to open a new streamwriter everytime the application has to log a message. It outputs everything to ./Logs/[current-date].txt which usually resolves to "c:\myappfolder\logs[current-date].txt"
Everything works correctly, but aft... | What you're experiencing is related to the way relative paths work in file systems. When you open a file dialog and the user selects a file in a different directory (e.g., "C:\home\myfolder\myfile"), the current working directory for your application changes to that directory. As a result, when you try to create a new ... | 47,085 | [
{
"from": "human",
"value": "I'm using a streamwriter to log errors\nthe way it has been designed (please dont ask why) is to open a new streamwriter everytime the application has to log a message. It outputs everything to ./Logs/[current-date].txt which usually resolves to \"c:\\myappfolder\\logs[current-d... |
I need to send mail via data extension I am having Visual Studio 2008. I am migrating from Visual Studio 2005.
Will it possible.
| Yes, you can send emails via a data extension while using Visual Studio 2008. However, you'll need to consider a few factors depending on the specific technologies and frameworks you're working with.
1. **.NET Framework**: If your project is using .NET Framework (likely since you're using Visual Studio 2008), ensure t... | 46,817 | [
{
"from": "human",
"value": "I need to send mail via data extension I am having Visual Studio 2008. I am migrating from Visual Studio 2005.\nWill it possible.\n"
},
{
"from": "gpt",
"value": "Yes, you can send emails via a data extension while using Visual Studio 2008. However, you'll need to co... |
I have a query which is meant to show me any rows in table A which have not been updated recently enough. (Each row should be updated within 2 months after "month_no".):
SELECT A.identifier
, A.name
, TO_NUMBER(DECODE( A.month_no
, 1, 200803
, 2, 200804
, 3, 200805
... | The error you're encountering occurs because `MONTH_NO` is an alias defined in the `SELECT` clause, and you cannot reference an alias in the `WHERE` clause in SQL. Instead, you can achieve the same result by using a common table expression (CTE) or a subquery to define `MONTH_NO` first, then use it in the outer query's... | 49,255 | [
{
"from": "human",
"value": "I have a query which is meant to show me any rows in table A which have not been updated recently enough. (Each row should be updated within 2 months after \"month_no\".):\nSELECT A.identifier\n , A.name\n , TO_NUMBER(DECODE( A.month_no\n , 1, 200803 \n ... |
In the grails-framework some objects are using log. This is normally injected by grails. It works on execution of grails test-app. But the same test (an integration-test) fails on execution of grails test-app -integration.
What goes wrong here and can I force the injection of the log-object somehow?
| In Grails, logging is typically handled through dependency injection (DI) using the `log` property provided by the framework. When running tests with `grails test-app`, the Grails testing environment usually sets up the application context correctly, allowing DI to work as expected. However, when you switch to integrat... | 44,098 | [
{
"from": "human",
"value": "In the grails-framework some objects are using log. This is normally injected by grails. It works on execution of grails test-app. But the same test (an integration-test) fails on execution of grails test-app -integration.\nWhat goes wrong here and can I force the injection of t... |
I have a table named categories, which contains ID(long), Name(varchar(50)), parentID(long), and shownByDefault(boolean) columns.
This table contains 554 records. All the shownByDefaultValues are 'false'.
When I execute 'select id, name from categories', pg returns me all the categories,
orderer by its id.
Then I upd... | The behavior you are observing is due to the fact that when you execute a `SELECT` query without an `ORDER BY` clause in SQL, the database does not guarantee any specific order for the results. While you might have noticed that the results were ordered by `ID` initially, this is not guaranteed and can change based on v... | 46,768 | [
{
"from": "human",
"value": "I have a table named categories, which contains ID(long), Name(varchar(50)), parentID(long), and shownByDefault(boolean) columns. \nThis table contains 554 records. All the shownByDefaultValues are 'false'.\nWhen I execute 'select id, name from categories', pg returns me all th... |
I've added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error:
Could not find default endpoint element that references contract 'IMySOAPWebService' in the ServiceModel client configuration section. This might be because no configuaration file was found for your a... | The error message you’re encountering suggests that the .NET runtime is unable to locate the specified endpoint configuration for the contract `IMySOAPWebService`. Given that you mentioned you have used the full namespace, let’s go through a few potential reasons and solutions for this issue:
1. **Namespace Verificati... | 45,518 | [
{
"from": "human",
"value": "I've added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error:\n\nCould not find default endpoint element that references contract 'IMySOAPWebService' in the ServiceModel client configuration section. This might be because ... |
There are lots of additional control "packs" (libraries) that you can enable in VB6 via Project>Components.
I'm trying to find good replacements for the Sheridan SScommand and SSframe controls. But I also want to find additional controls like a Tabbed dialog.
I'm not sure which of the ones in the list of Components are... | When looking for replacements for the Sheridan SSCommand and SSFrame controls in VB6, as well as additional controls like tabbed dialogs, you have a variety of options. Here’s a guide that can help you navigate through your choices, particularly focusing on distribution rights and maturity:
### Replacements for SSComm... | 44,969 | [
{
"from": "human",
"value": "There are lots of additional control \"packs\" (libraries) that you can enable in VB6 via Project>Components.\nI'm trying to find good replacements for the Sheridan SScommand and SSframe controls. But I also want to find additional controls like a Tabbed dialog.\nI'm not sure wh... |
Trying to set up caching on our datasets - we're using clr stored procedures -
The database doesn't seem to notify the application of data changes
| When working with CLR stored procedures and caching, it's important to understand that changes in the database do not automatically notify your application of data changes. SQL Server does not provide built-in change notifications for CLR stored procedures in the way that some other systems might. However, there are se... | 45,739 | [
{
"from": "human",
"value": "Trying to set up caching on our datasets - we're using clr stored procedures -\nThe database doesn't seem to notify the application of data changes\n"
},
{
"from": "gpt",
"value": "When working with CLR stored procedures and caching, it's important to understand that... |
I have a problem.
I'm working on another guy's code and there is a JFrame with lots of JSeparators(he used them as borders for 'panels') now I'm replacing them for a JBorderedPanel class that follows the same border style of the whole application.
The problem is that some of his separators are not clear to determine w... | Replacing `JSeparator` instances with a custom `JBorderedPanel` can be challenging, especially if the codebase is large and it's not immediately clear where each separator is used. Here are some strategies to help you identify which `JSeparator` corresponds to which location in the GUI:
### 1. Visual Identification:
I... | 47,559 | [
{
"from": "human",
"value": "I have a problem. \nI'm working on another guy's code and there is a JFrame with lots of JSeparators(he used them as borders for 'panels') now I'm replacing them for a JBorderedPanel class that follows the same border style of the whole application.\nThe problem is that some of ... |
Are there any publicly available SOAP 1.2/WSDL 2.0 compliant free web services for testing a Python based soap client library (e.g. Zolera SOAP Infrastructure)?
So far, it appears to me that Google Web API may be the only option.
Otherwise, how can one test a SOAP 1.2 compliant client library?
| Finding publicly available SOAP 1.2/WSDL 2.0 compliant web services can be a bit challenging, as many services tend to use RESTful APIs or older versions of SOAP. However, here are a few suggestions and resources that you can use to test a Python-based SOAP client library like Zolera SOAP Infrastructure:
### Publicly ... | 43,848 | [
{
"from": "human",
"value": "Are there any publicly available SOAP 1.2/WSDL 2.0 compliant free web services for testing a Python based soap client library (e.g. Zolera SOAP Infrastructure)? \nSo far, it appears to me that Google Web API may be the only option.\nOtherwise, how can one test a SOAP 1.2 complia... |
I need to deploy a Delphi app in an environment that needs centralized data and file storage system (for document imaging) but has multiple branch offices with relatively poor inter connectivity. I believe a 3 tier database application is the best way to go so I can provide a rich desktop experience with relatively li... | Deploying a Delphi application in a challenging environment with multiple branch offices and limited bandwidth is indeed a complex task, but a three-tier architecture can be a good choice for your requirements. Let's briefly discuss the options you mentioned: **DataSnap**, **kbmMW**, and **RemObjects SDK**, along with ... | 46,384 | [
{
"from": "human",
"value": "I need to deploy a Delphi app in an environment that needs centralized data and file storage system (for document imaging) but has multiple branch offices with relatively poor inter connectivity. I believe a 3 tier database application is the best way to go so I can provide a r... |
We have enableviewstate property for all the server controls in ASP.net.
We know that its going to have the member datas and values in viewstate across postbacks
What is the actual example for this?
| In ASP.NET, the `EnableViewState` property allows you to persist the state of server controls across postbacks. When this property is set to `true` (which is the default value), the values of the control are saved in a hidden field in the HTML markup generated by the server, which allows the control to maintain its sta... | 44,177 | [
{
"from": "human",
"value": "We have enableviewstate property for all the server controls in ASP.net. \nWe know that its going to have the member datas and values in viewstate across postbacks\nWhat is the actual example for this?\n"
},
{
"from": "gpt",
"value": "In ASP.NET, the `EnableViewState... |
Does anybody know how I can close all modal dialogs created by Dojo ? Apparently there used to be a dojo.popup.closeAll function, but this is no longer available in the latest version of the Dojo API that comes with Spring JS.
| As of the later versions of the Dojo Toolkit, `dojo.popup.closeAll` is no longer part of the API. However, you can manage modal dialogs manually using a combination of Dojo's dialog management and a custom function. Here's an approach you can use to close all active modal dialogs:
1. **Keep Track of Open Dialogs**: Yo... | 43,860 | [
{
"from": "human",
"value": "Does anybody know how I can close all modal dialogs created by Dojo ? Apparently there used to be a dojo.popup.closeAll function, but this is no longer available in the latest version of the Dojo API that comes with Spring JS.\n"
},
{
"from": "gpt",
"value": "As of t... |
I have a Div with five float divs inside:
var div=document.createElement("div");
div.className="cssDivNino";
var divFolio=document.createElement("div");
divFolio.className="cssFolio";
div.appendChild(divFolio);
var divCurp=document.createElement("div");
divCurp.className="cssCurp";
div.appendChild(divCurp);
var divN... | The extra space issue you are experiencing with the parent `div` in IE6 is typically caused by how IE6 handles `float` elements. In this case, the parent `div` does not automatically expand to contain its floated children, which can lead to layout problems.
To fix this issue, there are a couple of techniques you can u... | 47,775 | [
{
"from": "human",
"value": "I have a Div with five float divs inside:\nvar div=document.createElement(\"div\");\ndiv.className=\"cssDivNino\";\n\nvar divFolio=document.createElement(\"div\");\ndivFolio.className=\"cssFolio\";\ndiv.appendChild(divFolio);\n\nvar divCurp=document.createElement(\"div\");\ndivC... |
I'd like to allow user to change the setting of app. But I am not sure where shall I save the configuration.
Is there any local space allocated for app?
| Yes, when developing applications, you have several options for storing configuration settings locally on the user's device. The choice largely depends on the platform you are targeting (e.g., web, mobile, desktop) and the nature of the configuration data (simple key-value pairs, complex objects, etc.). Here are some c... | 43,004 | [
{
"from": "human",
"value": "I'd like to allow user to change the setting of app. But I am not sure where shall I save the configuration. \nIs there any local space allocated for app?\n"
},
{
"from": "gpt",
"value": "Yes, when developing applications, you have several options for storing configu... |
I would appreciate opinions or suggestions.
For several years, I have had an html and javascript website that was housed on a shared Apache server hosted by Wild West. Recently I decided to migrate it to .NET 3.5 and put it on a shared Windows IIS7 server also hosted by Wild West. I rewrote all of the pages using V... | Hi John,
It sounds like you've put a lot of effort into migrating your website to .NET, and it seems you've hit a couple of bumps along the way. Let’s address the potential causes of the issue you're experiencing and offer some suggestions.
### Connection String Issue
1. **Connection String Configuration**:
Since... | 47,956 | [
{
"from": "human",
"value": "I would appreciate opinions or suggestions. \nFor several years, I have had an html and javascript website that was housed on a shared Apache server hosted by Wild West. Recently I decided to migrate it to .NET 3.5 and put it on a shared Windows IIS7 server also hosted by Wild... |
Would anybody know why my parameter is being "converted" to lowercase when it hits my ASP.NET MVC controller action?
I can only assume it is being converted as looking at data value just prior to the ajax request it is in correct casing, but then when debugging my action method within .NET during the ajax request and c... | In ASP.NET MVC, the model binder is generally case-insensitive when it comes to parameter names, meaning it doesn't differentiate between uppercase and lowercase letters for the names of parameters being passed to an action method. This behavior can lead to cases where you experience issues like you have described, esp... | 48,303 | [
{
"from": "human",
"value": "Would anybody know why my parameter is being \"converted\" to lowercase when it hits my ASP.NET MVC controller action?\nI can only assume it is being converted as looking at data value just prior to the ajax request it is in correct casing, but then when debugging my action meth... |
Is there any way that I could get the source of a website (as a string preferably), let's say www.google.com, from some c# code inside code behind of asp.net website?
edit: of course i mean html code - in every browser you can view it using "view source" in context menu.
| Yes, you can retrieve the HTML source of a website such as www.google.com using C# in an ASP.NET application. You can use the `HttpClient` class to send a request to the URL and get the HTML as a string. Below is a simple example demonstrating how to do this:
1. Make sure you have the necessary using directive:
```cs... | 48,541 | [
{
"from": "human",
"value": "Is there any way that I could get the source of a website (as a string preferably), let's say www.google.com, from some c# code inside code behind of asp.net website?\nedit: of course i mean html code - in every browser you can view it using \"view source\" in context menu.\n"
... |
I have an IIS 6 server with a virtual directory pointing to a network share on another machine. That web server also serves ColdFusion scripts. When I access regular HTML pages that reside in the virtual directory, they are served properly. Anytime I try to get to a ColdFusion script, however, ColdFusion throws a "File... | When using a virtual directory in IIS to point to a network share, there are a few important considerations when serving ColdFusion scripts:
1. **ColdFusion Access Permissions**: Ensure that the ColdFusion service has the necessary permissions to access the network share. ColdFusion runs under a specific user account ... | 47,836 | [
{
"from": "human",
"value": "I have an IIS 6 server with a virtual directory pointing to a network share on another machine. That web server also serves ColdFusion scripts. When I access regular HTML pages that reside in the virtual directory, they are served properly. Anytime I try to get to a ColdFusion s... |
Is it possible in Delphi to have a class method invoke an inherited instance method with the same name? For example, I tried something like this:
//... Skipped surrounding class definitions
function TSomeAbstractDialogForm.Execute: Boolean;
begin
Result := ShowModal = mrOk;
end;
I had a couple of specialized dialog... | In Delphi, when a method in a descendant class has the same name as a method in its ancestor class, the descendant method "hides" the ancestor method. This is a behavior that is often referred to as method hiding rather than method overriding.
In your case, since both `Execute` methods in `TSomeInheritingDialogForm` ... | 49,698 | [
{
"from": "human",
"value": "Is it possible in Delphi to have a class method invoke an inherited instance method with the same name? For example, I tried something like this:\n//... Skipped surrounding class definitions\n\nfunction TSomeAbstractDialogForm.Execute: Boolean;\nbegin\n Result := ShowModal = mr... |
I try to write to a large file, but it seems like it does not work for files larger than 2GB.
I have tried with boost::iostreams::file_sink. Is this just a limit with the boost stream? Is there some other way I can write a large file on Win64 and win32?
| The limitation you're encountering when trying to write files larger than 2GB is not specifically due to Boost Iostreams itself, but rather a common issue associated with file handling in 32-bit applications. In a 32-bit environment, the maximum file size that can be addressed is typically limited to 2GB due to the way... | 46,359 | [
{
"from": "human",
"value": "I try to write to a large file, but it seems like it does not work for files larger than 2GB.\nI have tried with boost::iostreams::file_sink. Is this just a limit with the boost stream? Is there some other way I can write a large file on Win64 and win32?\n"
},
{
"from": ... |
When using the following function (compare 2 user's group membership), I get results that do not make sense.
function Compare-ADUserGroups <br>
{ #requires -pssnapin Quest.ActiveRoles.ADManagement
param (
[string] $FirstUser = $(Throw "logonname required."),
[string] $SecondUser = $(Throw "logonn... | The behavior you're encountering with the `Compare-Object` cmdlet in PowerShell is due to how the cmdlet works with the default output. The `Compare-Object` function returns results indicating both differences and similarities when the elements of the two collections being compared are considered the same in terms of t... | 49,480 | [
{
"from": "human",
"value": "When using the following function (compare 2 user's group membership), I get results that do not make sense.\nfunction Compare-ADUserGroups <br>\n{ #requires -pssnapin Quest.ActiveRoles.ADManagement \n param (\n [string] $FirstUser = $(Throw \"logonname required.\"),... |
I need to insert 20,000 rows in a single table (SQL Server 2005) using iBatis. What's the fastest way to do it ? I'm already using batch mode, but it didn't help much:
try {
sqlMap.startTransaction();
sqlMap.startBatch();
// ... execute statements in between
sqlMap.commitTransaction();
} finally {
sqlMap.endT... | Inserting a large number of rows (like 20,000) into a SQL Server database using iBatis can be optimized in several ways, especially since you are already using batch mode. Here are some recommendations to help improve the performance of your insertion process:
### 1. Optimize the Batch Size
Instead of trying to inser... | 45,194 | [
{
"from": "human",
"value": "I need to insert 20,000 rows in a single table (SQL Server 2005) using iBatis. What's the fastest way to do it ? I'm already using batch mode, but it didn't help much:\ntry {\n sqlMap.startTransaction();\n sqlMap.startBatch();\n // ... execute statements in between\n sqlMap.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.