instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I can't get the inner div (with Hello World) to fit inside the "box" div in this code example (also at http://www.toad-software.com/test.html).
Despite the body being set to 100%, the inner div will not be contained! This is a test case for a larger project in which a variable-width table exceeds the boundaries of its ... | The issue you're facing is due to the way the inner div is styled. The inner div has a fixed width of 1500px, which is causing it to overflow the container div (the "box" div) that does not have any specific width set.
To contain the inner div within the outer "box" div, you can set the `overflow` property of the box ... | 39,445 | [
{
"from": "human",
"value": "I can't get the inner div (with Hello World) to fit inside the \"box\" div in this code example (also at http://www.toad-software.com/test.html).\nDespite the body being set to 100%, the inner div will not be contained! This is a test case for a larger project in which a variabl... |
In HTML, you can send data from one page to another using a GET request in a couple of ways:
http://www.example.com/somepage.php?data=1
...or...
<form action="somepage.php" method="get">
<input type="hidden" name="data" value="1" />
<input type="submit" value="Submit">
</form>
With a POST request though, I've onl... | Yes, if you only need to send a single parameter using a POST request without wrapping it in a form, you can achieve this using JavaScript with the `fetch` API or `XMLHttpRequest`. This allows you to send POST data programmatically without needing a form element. Here’s how you can do it using both methods:
### Using ... | 38,828 | [
{
"from": "human",
"value": "In HTML, you can send data from one page to another using a GET request in a couple of ways:\nhttp://www.example.com/somepage.php?data=1\n\n...or...\n<form action=\"somepage.php\" method=\"get\">\n <input type=\"hidden\" name=\"data\" value=\"1\" />\n <input type=\"submit\" va... |
I have a table in an MS SQL Server db. I want to create a script that will put the table and all records into another db. So I right-click the table in Management Studio and select Create-To new query editor... but all I get is the table structure.
How exactly do I get the values too?
| To copy both the table structure and data from one database to another in SQL Server, you need to follow a couple of steps. Here's how to do it:
### Method 1: Using SQL Server Management Studio (SSMS)
1. **Generate Scripts**:
- Right-click on the database that contains your table.
- Select `Tasks` > `Generate S... | 38,530 | [
{
"from": "human",
"value": "I have a table in an MS SQL Server db. I want to create a script that will put the table and all records into another db. So I right-click the table in Management Studio and select Create-To new query editor... but all I get is the table structure. \nHow exactly do I get the ... |
I occasionally see the list slice syntax used in Python code like this:
newList = oldList[:]
Surely this is just the same as:
newList = oldList
Or am I missing something?
| You're correct in observing that both `newList = oldList` and `newList = oldList[:]` are used to assign a list to a new variable, but there is a key difference between the two.
1. **Assignment** (`newList = oldList`):
- This creates a reference to the same list object in memory. Both `newList` and `oldList` will po... | 38,543 | [
{
"from": "human",
"value": "I occasionally see the list slice syntax used in Python code like this:\nnewList = oldList[:]\n\nSurely this is just the same as:\nnewList = oldList\n\nOr am I missing something?\n"
},
{
"from": "gpt",
"value": "You're correct in observing that both `newList = oldLis... |
When I switch tabs with the following code
tabControl1.SelectTab("MyNextTab");
It calls the tabPage_Enter for the tab it is switching from and the tab it is switching to. I want it to be called for the tab it is switching to, but not the tab it is switching from. How would I turn this off. I do know when it happens so... | In Windows Forms, when you switch tabs in a `TabControl`, the `Enter` event for the tab that is losing focus (the tab you're switching from) will be called, as well as the `Enter` event for the tab that is gaining focus (the tab you're switching to). Unfortunately, there is no built-in way to prevent the `Enter` event ... | 39,688 | [
{
"from": "human",
"value": "When I switch tabs with the following code\ntabControl1.SelectTab(\"MyNextTab\");\n\nIt calls the tabPage_Enter for the tab it is switching from and the tab it is switching to. I want it to be called for the tab it is switching to, but not the tab it is switching from. How would... |
I have a flash file that loads an XML file at runtime. When the .swf file is run locally or on an Apache server it works fine but when hosted on an IIS6 based server the file won't load.
Can anyone help with this?
| When you are experiencing issues with loading an XML file in a Flash application hosted on an IIS6 server while it works fine on other servers like Apache or when run locally, there are a few potential reasons for the issue. Here are some steps to troubleshoot and fix the problem:
1. **Cross-Domain Policy**: Flash has... | 39,752 | [
{
"from": "human",
"value": "I have a flash file that loads an XML file at runtime. When the .swf file is run locally or on an Apache server it works fine but when hosted on an IIS6 based server the file won't load. \nCan anyone help with this?\n"
},
{
"from": "gpt",
"value": "When you are exper... |
Does Ruby have a stepwise debugger, similar to Perl's "perl -d"?
| Yes, Ruby has a built-in debugger that provides stepwise debugging capabilities. You can use the `byebug` gem or the built-in `debug` library (introduced in Ruby 3.1) to achieve stepwise debugging in Ruby, similar to Perl's `perl -d`.
### Using `byebug`
1. First, install the `byebug` gem if you haven't already:
`... | 36,186 | [
{
"from": "human",
"value": "Does Ruby have a stepwise debugger, similar to Perl's \"perl -d\"?\n"
},
{
"from": "gpt",
"value": "Yes, Ruby has a built-in debugger that provides stepwise debugging capabilities. You can use the `byebug` gem or the built-in `debug` library (introduced in Ruby 3.1) ... |
Assuming a variable contains spaces, newlines, and tabs followed by some text, why does this:
${var#"${var%%[![:space:]]*}"} # strip var of everything
# but whitespace
# then remove what's left
# (i.e. the whitespace) fro... | Let's break down both expressions you provided and see why they behave the way they do.
### Expression 1: `${var#"${var%%[![:space:]]*}"}`
This expression is designed to remove leading whitespace from the variable `var` and leave the text that follows.
1. **`${var%%[![:space:]]*}`**: This part of the expression uses ... | 39,077 | [
{
"from": "human",
"value": "Assuming a variable contains spaces, newlines, and tabs followed by some text, why does this:\n${var#\"${var%%[![:space:]]*}\"} # strip var of everything \n # but whitespace\n # then remove what's left \n ... |
Start a new Silverlight application... and in the code behind (in the "Loaded" event), put this code:
// This will *NOT* cause an error.
this.LayoutRoot.DataContext = new string[5];
But...
// This *WILL* cause an error!
this.LayoutRoot.DataContext = this;
The error that is raised is "Value does not fall within the ex... | The issue you're encountering is related to the differences between Silverlight and WPF, particularly in how they handle data binding and the DataContext property.
In WPF, setting the DataContext of a UI element to an instance of a class is common and generally works as expected. However, in Silverlight, there are som... | 39,173 | [
{
"from": "human",
"value": "Start a new Silverlight application... and in the code behind (in the \"Loaded\" event), put this code:\n// This will *NOT* cause an error.\nthis.LayoutRoot.DataContext = new string[5];\n\nBut...\n// This *WILL* cause an error!\nthis.LayoutRoot.DataContext = this;\n\nThe error t... |
I need to upgrade my current version of DNN this week. I am currently using 2.1.1. I don't want to do everything twice, so, I have several questions.
Is there an upgrade tool or some scripts somewhere that will help me to do an upgrade.
Am I better off installing 4.9 or 5.0. It is production.
If I go with 4.9, will I ... | Upgrading from DNN (DotNetNuke) version 2.1.1 is a significant leap, as there have been many changes and improvements in the platform since that version. Here are the answers to your questions:
### 1. Upgrade Tool or Scripts
DNN does not provide a direct upgrade tool that can handle such large jumps between versions s... | 36,878 | [
{
"from": "human",
"value": "I need to upgrade my current version of DNN this week. I am currently using 2.1.1. I don't want to do everything twice, so, I have several questions.\n\nIs there an upgrade tool or some scripts somewhere that will help me to do an upgrade.\nAm I better off installing 4.9 or 5.0.... |
Vista's SuperFetch works well with applications installed, but it does not seem to do so with Eclipse, which is just copied in a directory.
Does anyone know how to correct this ? Or is it simply not possible ?
[I hope this one will not be closed as "not programming related", since I need Eclipse on my machine for progr... | SuperFetch is a Windows feature designed to improve system performance by preloading frequently used applications and files into memory, but it relies on some installation attributes of software. Since Eclipse is often run as a standalone application and might not be installed using a traditional setup method (like an ... | 37,975 | [
{
"from": "human",
"value": "Vista's SuperFetch works well with applications installed, but it does not seem to do so with Eclipse, which is just copied in a directory.\nDoes anyone know how to correct this ? Or is it simply not possible ?\n[I hope this one will not be closed as \"not programming related\",... |
A question to those of you who already looked at VS2010. How big are the changes that add-in developers will have to make in order to get their add-ins working under VS2010?
| The changes required for add-in developers to get their add-ins working in Visual Studio 2010 (VS2010) depend on a few factors, including how the add-in was originally designed and the features it uses. Here are some of the notable changes that developers may need to consider:
1. **Add-in Model Changes**: VS2010 intro... | 40,055 | [
{
"from": "human",
"value": "A question to those of you who already looked at VS2010. How big are the changes that add-in developers will have to make in order to get their add-ins working under VS2010?\n"
},
{
"from": "gpt",
"value": "The changes required for add-in developers to get their add-... |
I'm trying to use XULRunner to add a GUI to a command line based program.
One solution would be to use something like popen from the XUL application to interact with the command line program.
My questions:
Does XPCOM have popen?
Does XPCOM have enough primitives to create popen?
Is there another approach that gives ... | XULRunner, which provides a framework for building applications using XUL (XML User Interface Language), does not provide direct support for process handling functions like `popen` found in languages like Python. However, you can achieve similar functionality in XULRunner through the use of XPCOM (Cross-Platform Compon... | 38,088 | [
{
"from": "human",
"value": "I'm trying to use XULRunner to add a GUI to a command line based program. \nOne solution would be to use something like popen from the XUL application to interact with the command line program. \nMy questions:\n\nDoes XPCOM have popen?\nDoes XPCOM have enough primitives to creat... |
Given the following Delphil DLL declaration
function csd_HandleData(aBuf: PChar; aLen: integer): integer; stdcall;
what would be the VB6 declaration to use it?
I've tried a variety of declarations, e.g.
Declare Function csd_HandleData Lib "chsdet.dll" (ByVal aBuf As String, ByVal aLen As Integer)
Declare Function csd_... | To properly declare and use a Delphi DLL function in VB6, you need to ensure that the string parameter is marshaled correctly. In Delphi, `PChar` is typically a pointer to a null-terminated string, while in VB6, a string type is handled differently.
Here’s the correct declaration for the `csd_HandleData` function in ... | 39,387 | [
{
"from": "human",
"value": "Given the following Delphil DLL declaration\nfunction csd_HandleData(aBuf: PChar; aLen: integer): integer; stdcall;\n\nwhat would be the VB6 declaration to use it?\nI've tried a variety of declarations, e.g.\nDeclare Function csd_HandleData Lib \"chsdet.dll\" (ByVal aBuf As Stri... |
I need to round any non-integers up to the nearest integer, regardless of whether the number after the decimal place is >5 or not.
| To round any non-integer up to the nearest integer, you can use the mathematical operation known as the ceiling function. In programming or mathematics, this is often represented by the symbol \( \lceil x \rceil \), where \( x \) is the number you want to round up.
Here's how you can do it in various scenarios:
1. **... | 39,195 | [
{
"from": "human",
"value": "I need to round any non-integers up to the nearest integer, regardless of whether the number after the decimal place is >5 or not.\n"
},
{
"from": "gpt",
"value": "To round any non-integer up to the nearest integer, you can use the mathematical operation known as the... |
I want to write a function that accepts a parameter which can be either a sequence or a single value. The type of value is str, int, etc., but I don't want it to be restricted to a hardcoded list.
In other words, I want to know if the parameter X is a sequence or something I have to convert to a sequence to avoid spec... | To check if a parameter is a sequence without restricting yourself to a hardcoded list of types, you can utilize the `collections.abc` module, which provides a way to check if an object is an instance of `Iterable` or `Sequence`. Here's a generic function to help you with that:
```python
from collections.abc import It... | 37,106 | [
{
"from": "human",
"value": "I want to write a function that accepts a parameter which can be either a sequence or a single value. The type of value is str, int, etc., but I don't want it to be restricted to a hardcoded list. \nIn other words, I want to know if the parameter X is a sequence or something I h... |
Consider the following use of template template parameters...
#include <iostream>
template <typename X>
class A
{
X _t;
public:
A(X t)
:_t(t)
{
}
X GetValue()
{
return _t;
}
};
template <typename T, template <typename T> class C >
class B
{
C<T> _c;
public:
B(T t)
... | Yes, you can achieve what you are trying to do by using a different approach to parameterize the class `B`. In your example, you want to remove the template parameter `T` and directly instantiate `C` using a specific type, such as `A<int>`.
To accomplish this, we can utilize a template template parameter that expects... | 36,709 | [
{
"from": "human",
"value": "Consider the following use of template template parameters...\n#include <iostream>\n\ntemplate <typename X>\nclass A\n{\n X _t;\npublic:\n A(X t)\n :_t(t)\n {\n }\n X GetValue()\n {\n return _t;\n }\n};\n\ntemplate <typename T, template <typena... |
For a simple linked list in which random access to list elements is not a requirement, are there any significant advantages (performance or otherwise) to using std::list instead of std::vector? If backwards traversal is required, would it be more efficient to use std::slist and reverse() the list prior to iterating ov... | When choosing between `std::list` and `std::vector` for a simple linked list where random access is not a requirement, there are several factors to consider regarding performance, memory overhead, and operations:
### Advantages of `std::list` over `std::vector`:
1. **Insertion and Deletion**:
- `std::list` provide... | 37,195 | [
{
"from": "human",
"value": "For a simple linked list in which random access to list elements is not a requirement, are there any significant advantages (performance or otherwise) to using std::list instead of std::vector? If backwards traversal is required, would it be more efficient to use std::slist and... |
For those who had developed applications with D,
which libraries did you use to build your application?
those libraries were good documented?
did you use Tango?
do you feel that D is ready to build big applications?
which IDE did you use? Descent maybe?
| When developing applications with the D programming language, many developers utilize a variety of libraries to enhance functionality and productivity. Here’s a summary based on common practices and tools in the D ecosystem:
1. **Libraries Used:**
- **Phobos:** The standard library that comes with D, offering a wid... | 38,280 | [
{
"from": "human",
"value": "For those who had developed applications with D,\n\nwhich libraries did you use to build your application?\nthose libraries were good documented?\ndid you use Tango?\ndo you feel that D is ready to build big applications?\nwhich IDE did you use? Descent maybe?\n\n"
},
{
... |
I have the string
a.b.c.d
I want to count the occurrences of '.' in an idiomatic way, preferably a one-liner.
(Previously I had expressed this constraint as "without a loop", in case you're wondering why everyone's trying to answer without using a loop).
| You can count the occurrences of `.` in the string `a.b.c.d` using the `count` method in a one-liner. Here’s how you can do it:
```python
count_dots = 'a.b.c.d'.count('.')
```
This will give you the number of times `.` appears in the string. For `a.b.c.d`, the result will be `3`. | 43,043 | [
{
"from": "human",
"value": "I have the string \na.b.c.d\n\nI want to count the occurrences of '.' in an idiomatic way, preferably a one-liner.\n(Previously I had expressed this constraint as \"without a loop\", in case you're wondering why everyone's trying to answer without using a loop).\n"
},
{
... |
I was just curious how others work with this kind of WinForm code in C#.
Lets say I have a Form lets call it Form1. And I have a DataGridView called dgvMain.
Where do you put the code:
this.dgvMain.CellEndEdit += new DataGridViewCellEventHandler(dgvMain_CellEndEdit);
Do you put it in the Form1 code or the Form1 desi... | In WinForms development using C#, event wiring is commonly done in the form's code-behind, usually within the constructor or the `Load` event of the form, rather than in the designer-generated code. The designer code is meant to be auto-generated by Visual Studio and typically should not be modified manually because an... | 39,311 | [
{
"from": "human",
"value": "I was just curious how others work with this kind of WinForm code in C#.\nLets say I have a Form lets call it Form1. And I have a DataGridView called dgvMain.\nWhere do you put the code: \nthis.dgvMain.CellEndEdit += new DataGridViewCellEventHandler(dgvMain_CellEndEdit);\n\nDo ... |
I have a textfield within a repeating table. I am able to validate what's inside but if the text does not pass my validation it should change it's color to red.
Does anybody know how I can achieve this goal by code?
I have found a solution for a rich text box by setting the innerXml to the following:
"This is just a p... | To change the color of text within a text field in a repeating table in an InfoPath form based on validation, you will typically use a combination of rules and conditional formatting rather than manipulating the inner XML directly. Since you want to keep the text field without a rich text editor menu, you can achieve t... | 38,338 | [
{
"from": "human",
"value": "I have a textfield within a repeating table. I am able to validate what's inside but if the text does not pass my validation it should change it's color to red. \nDoes anybody know how I can achieve this goal by code?\nI have found a solution for a rich text box by setting the i... |
I am working on a very large legacy code base. We are looking to introduce FindBugs into the development practice.
I intend to have FindBugs run whenever the code is built by eclipse.
I would like to be able to make the findbugs warnings appear as errors in the code much in this way you can change the severity level in... | Yes, it is possible to configure Eclipse to treat FindBugs warnings as errors, allowing you to enforce more stringent code quality standards in your development practice. You can achieve this by following these steps:
### Step 1: Install FindBugs Plugin
1. **Install FindBugs (or SpotBugs)**: If you haven't done so, yo... | 37,098 | [
{
"from": "human",
"value": "I am working on a very large legacy code base. We are looking to introduce FindBugs into the development practice.\nI intend to have FindBugs run whenever the code is built by eclipse.\nI would like to be able to make the findbugs warnings appear as errors in the code much in th... |
I was wondering if I could pop up JOptionPanes or other Swing components from within a browser using JSP.
| Using Swing components such as `JOptionPane` directly within a web browser via JSP is not possible. JSP (JavaServer Pages) is used to create dynamic web content on the server side, and Swing is a Java library for building graphical user interfaces on the client side, specifically for desktop applications.
### Why This... | 28,828 | [
{
"from": "human",
"value": "I was wondering if I could pop up JOptionPanes or other Swing components from within a browser using JSP.\n"
},
{
"from": "gpt",
"value": "Using Swing components such as `JOptionPane` directly within a web browser via JSP is not possible. JSP (JavaServer Pages) is us... |
For a beginner, which is the best book to start with for studying Bayesian Networks?
| For beginners interested in studying Bayesian Networks, a highly recommended book is:
**"Bayesian Networks and Decision Graphs" by Finn Jensen and Thomas Nielsen**.
This book provides a clear introduction to the concepts and foundations of Bayesian networks, along with practical examples and applications. It balance... | 42,157 | [
{
"from": "human",
"value": "For a beginner, which is the best book to start with for studying Bayesian Networks? \n"
},
{
"from": "gpt",
"value": "For beginners interested in studying Bayesian Networks, a highly recommended book is:\n\n**\"Bayesian Networks and Decision Graphs\" by Finn Jensen ... |
This question is simple. What function would I use in a PHP script to load data from a URL into a string?
| In PHP, you can use the `file_get_contents()` function to load data from a URL into a string. Here's a basic example:
```php
$url = "http://example.com/data.txt";
$data = file_get_contents($url);
if ($data === false) {
// Handle error
echo "Failed to retrieve data.";
} else {
// Process the data
echo ... | 40,659 | [
{
"from": "human",
"value": "This question is simple. What function would I use in a PHP script to load data from a URL into a string?\n"
},
{
"from": "gpt",
"value": "In PHP, you can use the `file_get_contents()` function to load data from a URL into a string. Here's a basic example:\n\n```php\... |
How do I run a batch file each time windows boots up also I need to run it in the back ground(without that command window getting displayed)? I use Windows Xp.
My actuall requirement is I want to start the Tracd server using the command line commands whenever Windows boots up.
| To run a batch file each time Windows XP boots up without displaying the command window, you can follow these steps:
### Step 1: Create the Batch File
1. Open Notepad or any text editor.
2. Write the commands you want to execute in the batch file. For example, if your command is `tracd`, include it in the file.
3. Sav... | 39,355 | [
{
"from": "human",
"value": "How do I run a batch file each time windows boots up also I need to run it in the back ground(without that command window getting displayed)? I use Windows Xp.\nMy actuall requirement is I want to start the Tracd server using the command line commands whenever Windows boots up.\... |
In another question on SO I answered with code like the one below and got a comment that the LINQ-query probably was evaluated in every iteration of the for/each. Is that true?
I know that LINQ-querys does not executes before its items is evaluated so it seems possible that this way to iterate the result can make it ru... | Yes, the comment you received about the LINQ query being evaluated in every iteration of the `For Each` loop is indeed correct.
In your code snippet, the LINQ query `From e In d Where e.Value.StartsWith("W") Select e.Key` creates an enumerable sequence that is evaluated each time it is iterated over. In the context of... | 39,951 | [
{
"from": "human",
"value": "In another question on SO I answered with code like the one below and got a comment that the LINQ-query probably was evaluated in every iteration of the for/each. Is that true?\nI know that LINQ-querys does not executes before its items is evaluated so it seems possible that thi... |
When reading lines from a text file using python, the end-line character often needs to be truncated before processing the text, as in the following example:
f = open("myFile.txt", "r")
for line in f:
line = line[:-1]
# do something with line
Is there an elegant way or idiom for retrieving text lines without t... | Yes, there is a more elegant and Pythonic way to read lines from a text file without the trailing newline character. You can use the `strip()` method, which removes leading and trailing whitespace characters, including newline characters. Here's how you can do it:
```python
with open("myFile.txt", "r") as f:
for l... | 40,809 | [
{
"from": "human",
"value": "When reading lines from a text file using python, the end-line character often needs to be truncated before processing the text, as in the following example:\nf = open(\"myFile.txt\", \"r\")\nfor line in f:\n line = line[:-1]\n # do something with line\n\nIs there an elega... |
How do I utilize a ?: operator in the SELECT clause of a LINQ query? If this can't be done, how can I emulate one? The goal is to get a CASE block in my select clause. As you might suspect, I'm getting an error: Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignmen... | In LINQ, the conditional operator (`?:`) can be used, but it must be assigned to a named member in your anonymous type. The error you are encountering indicates that you're trying to use the conditional operator without providing a proper member name for the anonymous type you're creating.
To utilize a conditional exp... | 39,160 | [
{
"from": "human",
"value": "\nHow do I utilize a ?: operator in the SELECT clause of a LINQ query? If this can't be done, how can I emulate one? The goal is to get a CASE block in my select clause. As you might suspect, I'm getting an error: Invalid anonymous type member declarator. Anonymous type member... |
What do I have to do to convert a DIB to a BMP?
| To convert a Device Independent Bitmap (DIB) to a Bitmap (BMP) file, you need to understand that DIB is a format that represents a bitmap in memory, while BMP is a file format used to store bitmap images on disk. Here are the general steps to perform the conversion:
### Method 1: Using an Image Editing Software
1. **... | 39,759 | [
{
"from": "human",
"value": "What do I have to do to convert a DIB to a BMP?\n"
},
{
"from": "gpt",
"value": "To convert a Device Independent Bitmap (DIB) to a Bitmap (BMP) file, you need to understand that DIB is a format that represents a bitmap in memory, while BMP is a file format used to st... |
Ignoring payload size, what is relative difference in latency between an in-proc call (say in C++ or Java), a socket call to a process on the same machine, and a socket call to a process on another machine? This can be expressed as a minimum latency in ns/ms or in terms of relative orders of magnitude.
I'm looking for... | Latency in computing can vary significantly depending on the method of inter-process communication (IPC) used. Here's a breakdown of the relative latencies for in-process calls, socket calls to a process on the same machine, and socket calls to a process on a different machine.
### 1. In-Process Call (In-Proc)
**Laten... | 40,057 | [
{
"from": "human",
"value": "Ignoring payload size, what is relative difference in latency between an in-proc call (say in C++ or Java), a socket call to a process on the same machine, and a socket call to a process on another machine? This can be expressed as a minimum latency in ns/ms or in terms of relat... |
When a site is used with URL test.com handlers are not fired. Whereas if the site is used with www.test.com the handlers work properly? The site is behind an ISA firewall. How should I fix this?
| The issue you're experiencing with handlers not firing on `test.com` but working correctly on `www.test.com` could be related to several factors, particularly in how the ISA (Internet Security and Acceleration) firewall is configured or how DNS is set up. Here are steps to help you troubleshoot and potentially resolve ... | 38,333 | [
{
"from": "human",
"value": "When a site is used with URL test.com handlers are not fired. Whereas if the site is used with www.test.com the handlers work properly? The site is behind an ISA firewall. How should I fix this?\n"
},
{
"from": "gpt",
"value": "The issue you're experiencing with hand... |
I received this error "Arithmetic operation resulted in an overflow." when trying to upload any file in the Repository module of DotNetNuke. I'm using dotnetnuke version 4.5.1.
| The "Arithmetic operation resulted in an overflow" error in DotNetNuke (DNN) typically indicates that a numeric operation has exceeded the storage capacity of a variable or type. In the context of DNN's Repository module, this could happen due to a few reasons. Here are some steps to troubleshoot and potentially resolv... | 39,162 | [
{
"from": "human",
"value": "I received this error \"Arithmetic operation resulted in an overflow.\" when trying to upload any file in the Repository module of DotNetNuke. I'm using dotnetnuke version 4.5.1.\n"
},
{
"from": "gpt",
"value": "The \"Arithmetic operation resulted in an overflow\" e... |
What is the maximum number of publishers one can create on one Database on that same database server itself?
Also, Vice - versa ,
What is the maximum number of subscribers one can create on one Database on that same database server itself?
| The maximum number of publishers and subscribers in SQL Server replication can depend on several factors, including the version of SQL Server you are using and the specifics of your configuration. Here’s a general overview:
### Maximum Number of Publishers:
- **SQL Server Standard Edition**: You can have up to 50 publ... | 41,355 | [
{
"from": "human",
"value": "What is the maximum number of publishers one can create on one Database on that same database server itself?\nAlso, Vice - versa ,\nWhat is the maximum number of subscribers one can create on one Database on that same database server itself?\n"
},
{
"from": "gpt",
"v... |
I'm using the following as a way of seeing listing the various methods in my developement
print basename(__FILE__) . "::serve_table()"
is there any function that's able to return the name of a class method so I don't have to trpe it each time?
| In PHP, you can use the `__METHOD__` magic constant to get the name of the class method that is currently executing. The `__METHOD__` constant returns the name of the class and method in the format `"ClassName::methodName"`.
Here’s how you can use it in your context:
```php
class MyClass {
public function serve_t... | 41,161 | [
{
"from": "human",
"value": "I'm using the following as a way of seeing listing the various methods in my developement\nprint basename(__FILE__) . \"::serve_table()\"\n\nis there any function that's able to return the name of a class method so I don't have to trpe it each time?\n"
},
{
"from": "gpt"... |
In a form, I added an overload of ShowDialog(). In Visual Studio, this overload shows up in Intellisense as the third version. How can I make my overloaded function appear as #1 (i.e. the default)?
| In Visual Studio's Intellisense, the order of overloads typically depends on several factors, including the number of parameters, their types, and the visibility of the method. However, you can't directly control the order in which overloads appear in Intellisense as it is determined by the compiler based on its own lo... | 37,320 | [
{
"from": "human",
"value": "In a form, I added an overload of ShowDialog(). In Visual Studio, this overload shows up in Intellisense as the third version. How can I make my overloaded function appear as #1 (i.e. the default)?\n"
},
{
"from": "gpt",
"value": "In Visual Studio's Intellisense, t... |
I'm using a regex that strips the href tags out of an html doc saved to a string. The following code is how I'm using it in my C# console app.
Match m = Regex.Match(htmlSourceString, "href=[\\\"\\\'](http:\\/\\/|\\.\\/|\\/)?\\w+(\\.\\w+)*(\\/\\w+(\\.\\w+)?)*(\\/|\\?\\w*=\\w*(&\\w*=\\w*)*)?[\\\"\\\']");
if (m.S... | The issue you’re experiencing is that the `Regex.Match` method only returns the first match it finds in the input string. To find all matches, you should use the `Regex.Matches` method instead, which returns a collection of all matches.
Here’s how you can modify your code to retrieve and print all the href values:
``... | 36,717 | [
{
"from": "human",
"value": "I'm using a regex that strips the href tags out of an html doc saved to a string. The following code is how I'm using it in my C# console app.\nMatch m = Regex.Match(htmlSourceString, \"href=[\\\\\\\"\\\\\\'](http:\\\\/\\\\/|\\\\.\\\\/|\\\\/)?\\\\w+(\\\\.\\\\w+)*(\\\\/\\\\w+(\\\... |
One of the modules for my app uses functions from a .pyd file. There's an option to exclude dlls (exclude_dlls) but is there one for including them? The build process doesn't seem to be copying the .pyd in my module despite copying the rest of the files (.py). I also need to include a .dll. How do I get py2exe to incl... | When using `py2exe`, you have options to explicitly include additional files in your build, including `.pyd` and `.dll` files. The `exclude_dlls` option allows you to exclude specific DLLs, but to include files that are not automatically included, you should use the `data_files` option in your `setup.py` configuration.... | 38,486 | [
{
"from": "human",
"value": "One of the modules for my app uses functions from a .pyd file. There's an option to exclude dlls (exclude_dlls) but is there one for including them? The build process doesn't seem to be copying the .pyd in my module despite copying the rest of the files (.py). I also need to inc... |
What is the regex for a alpha numeric word, at least 6 characters long (but at most 50).
| To create a regular expression (regex) that matches an alphanumeric word with at least 6 characters and at most 50 characters, you can use the following pattern:
```regex
^[a-zA-Z0-9]{6,50}$
```
### Explanation:
- `^` asserts the start of the string.
- `[a-zA-Z0-9]` matches any alphanumeric character (both lowercase ... | 42,091 | [
{
"from": "human",
"value": "What is the regex for a alpha numeric word, at least 6 characters long (but at most 50).\n"
},
{
"from": "gpt",
"value": "To create a regular expression (regex) that matches an alphanumeric word with at least 6 characters and at most 50 characters, you can use the fo... |
I'm attempting to use the following code to serialize an anonymous type to JSON:
var serializer = new DataContractJsonSerializer(thing.GetType());
var ms = new MemoryStream();
serializer.WriteObject(ms, thing);
var json = Encoding.Default.GetString(ms.ToArray());
However, I get the following exception when this is ex... | You're correct that anonymous types cannot be decorated with attributes like `DataContract` or `DataMember` because they are created on-the-fly and do not have a defined type that you can modify.
Instead of using `DataContractJsonSerializer`, you can use other libraries that support serialization of anonymous types d... | 39,098 | [
{
"from": "human",
"value": "I'm attempting to use the following code to serialize an anonymous type to JSON:\nvar serializer = new DataContractJsonSerializer(thing.GetType());\nvar ms = new MemoryStream();\nserializer.WriteObject(ms, thing);\nvar json = Encoding.Default.GetString(ms.ToArray()); \n\nHowever... |
I'm currently using Rcov to get C0 code coverage analysis for a rails project that I'm working on.
However, those results are practically meaningless- I have 100% coverage according to rcov (as it only covers C0 analysis) and I've barely written half the test cases for the functionality that exists thus far.
I'm used t... | For Ruby, there are several tools that offer more advanced coverage analysis beyond the basic C0 coverage that Rcov provides. If you're looking for tools that can give you more insights, including C1 coverage (branch coverage) or even more detailed metrics, consider the following options:
1. **SimpleCov**: This is one... | 39,284 | [
{
"from": "human",
"value": "I'm currently using Rcov to get C0 code coverage analysis for a rails project that I'm working on.\nHowever, those results are practically meaningless- I have 100% coverage according to rcov (as it only covers C0 analysis) and I've barely written half the test cases for the func... |
Has anyone got the steps to compile darwin libraries on gcc for arm on ubuntu?
| Compiling Darwin libraries (like those from macOS) on a Linux system such as Ubuntu using GCC for ARM is a complex task and may not be straightforward due to several factors including compatibility issues and licensing restrictions. However, here are general steps you can follow to compile libraries for ARM:
### Prere... | 36,520 | [
{
"from": "human",
"value": "Has anyone got the steps to compile darwin libraries on gcc for arm on ubuntu?\n"
},
{
"from": "gpt",
"value": "Compiling Darwin libraries (like those from macOS) on a Linux system such as Ubuntu using GCC for ARM is a complex task and may not be straightforward due ... |
I using GWT and have created a login form. I've tried all sorts of ways to get IE7 to prompt to remember the login info but with no success. I thought that maybe this would have worked (but it didn't):
TextBox submit = new TextBox();
submit.getElement().setAttribute("type", "submit");
Any ideas?
| To get Internet Explorer 7 to prompt for saving login information in a GWT (Google Web Toolkit) application, you need to ensure that the login form is correctly structured and follows some guidelines that help the browser recognize it as a form that contains login credentials.
Here are a few suggestions to achieve thi... | 37,969 | [
{
"from": "human",
"value": "I using GWT and have created a login form. I've tried all sorts of ways to get IE7 to prompt to remember the login info but with no success. I thought that maybe this would have worked (but it didn't):\n TextBox submit = new TextBox();\n submit.getElement().setAttribute(... |
We have a 50 projects solution in VS 2005.
Is any way to get incremental build if nothing was changed?
It is kind of doing it now, but it executes all prebuild and post build events for each project.
The compiling itself is not happenning, but it iterates through all projects and executes all prebuild and post ... | In Visual Studio 2005, incremental builds are designed to only compile projects that have changed. However, the behavior you're experiencing, where all pre-build and post-build events are executed even when no actual compilation occurs, can be a result of how the project configuration is set up. Unfortunately, VS 2005 ... | 38,206 | [
{
"from": "human",
"value": "We have a 50 projects solution in VS 2005. \nIs any way to get incremental build if nothing was changed? \nIt is kind of doing it now, but it executes all prebuild and post build events for each project. \nThe compiling itself is not happenning, but it iterates through all ... |
I want to add text to speech user guided instruction to my applications. Where can I find a Text to speech component to do that. I do not want to use the Windows functions.
| If you're looking to integrate text-to-speech (TTS) functionality into your application without relying on Windows-specific functions, there are several alternatives you can consider. Below are some popular libraries and APIs you can use, depending on the programming language and platform you are working with:
### 1. ... | 38,509 | [
{
"from": "human",
"value": "I want to add text to speech user guided instruction to my applications. Where can I find a Text to speech component to do that. I do not want to use the Windows functions.\n"
},
{
"from": "gpt",
"value": "If you're looking to integrate text-to-speech (TTS) functiona... |
Assuming I have a tree structure
UL
--LI
---INPUT (checkbox)
And I want to grab the checked inputs, I would select
$('ul li input:checked')
However, I want to select the checked inputs of a specific object $myUL that doesn't have an ID.
$myUL.children('li input:checked')
returns all li's since children filters imme... | Yes, you can use the `find()` method to select all descendant elements of a specific object (in your case, `$myUL`). The `find()` method will search through all levels of descendants, which is what you need to select the checked inputs within the list items of your specific unordered list.
Here's how you can do it:
`... | 40,627 | [
{
"from": "human",
"value": "Assuming I have a tree structure\nUL\n--LI\n---INPUT (checkbox)\n\nAnd I want to grab the checked inputs, I would select \n$('ul li input:checked')\n\nHowever, I want to select the checked inputs of a specific object $myUL that doesn't have an ID.\n$myUL.children('li input:check... |
I am building a relatively simple Django application and apart from the main page where most of the dynamic parts of the application are, there are a few pages that I will need that will not be dynamic at all (About, FAQ, etc.). What is the best way to integrate these into Django, idealing still using the Django templa... | Yes, creating a template for each static page and having a view that simply renders those templates is a common and effective approach in Django for integrating non-dynamic pages like About, FAQ, etc. Here's how you can set it up step-by-step:
### Step 1: Create Templates
First, create the HTML templates for your sta... | 37,506 | [
{
"from": "human",
"value": "I am building a relatively simple Django application and apart from the main page where most of the dynamic parts of the application are, there are a few pages that I will need that will not be dynamic at all (About, FAQ, etc.). What is the best way to integrate these into Djang... |
How do i backup a SQL database using PHP.
Is there a vendor agnostic way to do this that conforms to ANSI SQL?
If not maybe you can list how to do it for each of the database vendors?
| Backing up a SQL database is an important task that can vary significantly based on the database system you are using. Unfortunately, there isn't a vendor-agnostic way to perform backups that conforms strictly to ANSI SQL, as ANSI SQL does not define backup or restore operations. Each database vendor has its own method... | 38,457 | [
{
"from": "human",
"value": "How do i backup a SQL database using PHP.\nIs there a vendor agnostic way to do this that conforms to ANSI SQL?\nIf not maybe you can list how to do it for each of the database vendors?\n"
},
{
"from": "gpt",
"value": "Backing up a SQL database is an important task t... |
Is there a call I can make to determine whether my session is still alive in a gsoap client?
The only way I see to check if a session is still alive is to check to see if all the cookie values match after each soap call. It seems like gsoap would be aware of the session being alive since the tcp_keep_alive flag is set.... | In gSOAP, session management, particularly when using cookies for stateful connections, requires you to implement your own checks for session validity, as gSOAP does not inherently provide automatic session management or keep-alive checking out of the box. Here are some options to handle session validity:
1. **Dummy S... | 39,095 | [
{
"from": "human",
"value": "Is there a call I can make to determine whether my session is still alive in a gsoap client?\nThe only way I see to check if a session is still alive is to check to see if all the cookie values match after each soap call. It seems like gsoap would be aware of the session being a... |
A complicated-sounding term with no good explanations from a simple google search... are there any more academically-oriented folk who could explain this one?
| Of course! If you provide me with the complicated-sounding term you're curious about, I can help explain it in a more understandable way or provide context and background information. Just let me know what it is! | 42,691 | [
{
"from": "human",
"value": "A complicated-sounding term with no good explanations from a simple google search... are there any more academically-oriented folk who could explain this one?\n"
},
{
"from": "gpt",
"value": "Of course! If you provide me with the complicated-sounding term you're curi... |
i want to create a number of databases in ms-access using a code or any option of ms-access, but i want delete databases also.
Please help me
| To create and delete databases in Microsoft Access programmatically, you can use VBA (Visual Basic for Applications). Below are some examples showing how to create and delete databases using VBA in Access.
### Creating Databases
You can create a database using the `CreateDatabase` method. Here is a simple example of ... | 38,118 | [
{
"from": "human",
"value": "i want to create a number of databases in ms-access using a code or any option of ms-access, but i want delete databases also.\n Please help me\n"
},
{
"from": "gpt",
"value": "To create and delete databases in Microsoft Access programmatically, you can us... |
I have a source XML file that is used to create C# files that are then compiled as part of a project.
Currently I have a BeforeBuild target that runs my XML to C# converter.
The problem is that by the time the BeforeBuild step is run the old files appear to have been stored by the build system so the new files are igno... | To ensure that your XML to C# converter runs and the newly generated files are considered in the build process, you can take several approaches:
### 1. Clean Before Build
You can modify your build process to clean the output directory before the build starts. This ensures that any previously generated files are remov... | 36,508 | [
{
"from": "human",
"value": "I have a source XML file that is used to create C# files that are then compiled as part of a project.\nCurrently I have a BeforeBuild target that runs my XML to C# converter.\nThe problem is that by the time the BeforeBuild step is run the old files appear to have been stored by... |
I posted a question earlier today when I'd not zeroed in quite so far on the problem. I'll be able to be more concise here.
I'm running RoR 2.1.2, on Windows, with MySQL. The SQL server's native time zone is UTC. My local timezone is Pacific (-0800)
I have a model with a :timestamp type column which I can do things ... | It looks like you're encountering a common issue with time zones in Rails, especially given that you are using an older version (Rails 2.1.2) on Windows with MySQL. Let's break down the behavior you're observing:
1. **Storing the Time**: When you set `record.the_time = Time.now()`, Rails is likely converting that time... | 37,941 | [
{
"from": "human",
"value": "I posted a question earlier today when I'd not zeroed in quite so far on the problem. I'll be able to be more concise here.\nI'm running RoR 2.1.2, on Windows, with MySQL. The SQL server's native time zone is UTC. My local timezone is Pacific (-0800)\nI have a model with a :t... |
I need to make DISTRIBUTED TRANSACTION between two MS SQL Server 2005,
it drops an error that NO ACTIVE TRANSACTION IS PRESENT or smth like this.
DTCTESTER programs drops an error that transaction could not be done.
btw 135 port is open on the firewall.
Maybe anyone knows what a problem, or have a suggestion?
| When you're dealing with distributed transactions in SQL Server, particularly between two SQL Server instances, there are several common issues and configurations that you should check. Here's a list of things to consider in order to troubleshoot the "No active transaction is present" error and similar issues when usin... | 37,652 | [
{
"from": "human",
"value": "I need to make DISTRIBUTED TRANSACTION between two MS SQL Server 2005, \nit drops an error that NO ACTIVE TRANSACTION IS PRESENT or smth like this.\nDTCTESTER programs drops an error that transaction could not be done.\nbtw 135 port is open on the firewall.\nMaybe anyone knows w... |
Website started life originally under IIS 6 and the site worked great there. Now after relocating to a new server running W2K8S, everything but mail delivery from the website now works great under IIS 7.
Researched briefly on the Web to see if anybody had a good resolution, but no avail... Not even a glimmer of hope on... | It sounds like you've done quite a bit of troubleshooting already, but let's go through some steps to further diagnose and hopefully resolve the email delivery issue from your website hosted on IIS 7.
### 1. Verify SMTP Configuration
Make sure that your SMTP service is correctly configured:
- **SMTP Relay Settings**:... | 36,854 | [
{
"from": "human",
"value": "Website started life originally under IIS 6 and the site worked great there. Now after relocating to a new server running W2K8S, everything but mail delivery from the website now works great under IIS 7.\nResearched briefly on the Web to see if anybody had a good resolution, but... |
I have learnt the factory method design pattern, and at the same time, I have come across the Activator object and how to use it, from reading a tutorial (I have come across this object in intellisense a lot thougha).
Activator allows late binding, which can be extremely useful. But this is because we don't know what c... | You're correct in your understanding of the Factory Method pattern and how it relates to the `Activator` class in .NET. Let's clarify your points and answer your questions about polymorphism and reducing coupling.
### Factory Method Pattern
The Factory Method pattern is a creational design pattern that allows the ins... | 36,417 | [
{
"from": "human",
"value": "I have learnt the factory method design pattern, and at the same time, I have come across the Activator object and how to use it, from reading a tutorial (I have come across this object in intellisense a lot thougha).\nActivator allows late binding, which can be extremely useful... |
In Visual Studio's "Attach to Process" dialog I can see a Title column for each of the processes available. Is there any way for me to set the title for a specific w3wp.exe process to reflect the application pool it's hosting?
PS - I'm aware of iisapp.vbs and the way it enables me to identify which w3wp.exe belongs to ... | In IIS 6, the `w3wp.exe` process does not provide a built-in way to change its title or display a custom name that reflects the application pool directly in the "Attach to Process" dialog in Visual Studio. However, there are a few approaches you can consider to achieve a more user-friendly identification of application... | 39,489 | [
{
"from": "human",
"value": "In Visual Studio's \"Attach to Process\" dialog I can see a Title column for each of the processes available. Is there any way for me to set the title for a specific w3wp.exe process to reflect the application pool it's hosting?\nPS - I'm aware of iisapp.vbs and the way it enabl... |
I am following the learning ASP.NET 3.5 by O'REILLY to write some ASP.NET 3.5 code using Visual Studio 2008 SP1. I have gotten to the point to where I need to Configure a Data Source using the SqlDataSource control. I chose Microsoft SQL Server (SqlClient) even though I have SQL Server Express 2005 - This seems like ... | It seems like you're encountering an issue with a missing assembly related to SQL Server Management. The error message indicates that your Visual Studio installation is trying to access the `Microsoft.SqlServer.Management.Sdk.Sfc` assembly, but it cannot find it. This can happen for a few reasons, especially if there i... | 35,848 | [
{
"from": "human",
"value": "I am following the learning ASP.NET 3.5 by O'REILLY to write some ASP.NET 3.5 code using Visual Studio 2008 SP1. I have gotten to the point to where I need to Configure a Data Source using the SqlDataSource control. I chose Microsoft SQL Server (SqlClient) even though I have S... |
I have just upgraded our company's domain controller from NT 4.0 to Windows 2008 Server. I used the in-place upgrade path, going first from NT 4.0 to Windows 2003 Server and then 2003 Server to 2008 Server. The orginal NT 4.0 domain was name Company. The new domain is Company.local. I have confirmed user and computer i... | It sounds like you're on the right track with troubleshooting the issue of the GPO user login script not executing properly. Given the behavior you're observing, there are a few areas to focus on:
1. **Trusting the Domain Controller**: The security warning you're seeing indicates that the client is unable to verify th... | 39,065 | [
{
"from": "human",
"value": "I have just upgraded our company's domain controller from NT 4.0 to Windows 2008 Server. I used the in-place upgrade path, going first from NT 4.0 to Windows 2003 Server and then 2003 Server to 2008 Server. The orginal NT 4.0 domain was name Company. The new domain is Company.lo... |
I would like to provide the raw text referring to an environment variable to a command instead of evaluating the environment variable.
I need this to configure BizTalk from the command line, for example:
BTSTask.exe AddResource -ApplicationName:App1
-Type:System.BizTalk:BizTalkAssembly -Overwrite
-Source:..\Schemas\b... | In Windows command line, the behavior of environment variable evaluation can differ between running commands directly in the command prompt and executing scripts (like batch files). When running a command in a script, the shell might evaluate environment variables differently, especially if it's running in a different ... | 38,112 | [
{
"from": "human",
"value": "I would like to provide the raw text referring to an environment variable to a command instead of evaluating the environment variable.\nI need this to configure BizTalk from the command line, for example:\nBTSTask.exe AddResource -ApplicationName:App1 \n-Type:System.BizTalk:BizT... |
I have a section on my ASP.net web.config for the Enterprise library logging block. Is it possible to separate the logging configuration into another configuration file? How do I do that?
| Yes, you can separate the logging configuration of the Enterprise Library Logging Application Block into another configuration file. This is particularly useful for maintaining cleaner configuration files and for situations where you may need to change logging settings independently from your main `web.config` file.
H... | 39,905 | [
{
"from": "human",
"value": "I have a section on my ASP.net web.config for the Enterprise library logging block. Is it possible to separate the logging configuration into another configuration file? How do I do that?\n"
},
{
"from": "gpt",
"value": "Yes, you can separate the logging configuratio... |
Update: Please read this question in the context of design principles, elegance, expression of intent, and especially the "signals" sent to other programmers by design choices.
I have two "views" of a set of objects. One is a dictionary/map indexing the objects by a string value. The other is a dictionary/map indexing ... | Your scenario highlights a common challenge in software design: the tension between maintaining data integrity, reducing redundancy, and ensuring clarity of intent through your design choices. Given your requirements and the principles you've laid out—such as elegance, expression of intent, and minimizing "signals" of ... | 36,277 | [
{
"from": "human",
"value": "Update: Please read this question in the context of design principles, elegance, expression of intent, and especially the \"signals\" sent to other programmers by design choices.\nI have two \"views\" of a set of objects. One is a dictionary/map indexing the objects by a string ... |
When using CDT I would like to have std::string show up in the 'variable' debug window with the string it contains. For instance if it is currently holding the word "history" I would like to see history in the debugger window labeled "variables".
I think that there is a general way to have it drill down into objects b... | When working with the CDT (C/C++ Development Tooling) in an IDE like Eclipse or similar, displaying the contents of a `std::string` directly in the variable window during debugging can be a bit tricky, especially if the default behavior doesn't suit your needs. However, there are ways to achieve what you want. Here's a... | 39,598 | [
{
"from": "human",
"value": "When using CDT I would like to have std::string show up in the 'variable' debug window with the string it contains. For instance if it is currently holding the word \"history\" I would like to see history in the debugger window labeled \"variables\". \nI think that there is a ge... |
Are any of you aware of a library that helps you build/manipulate SQL queries, that supports JOIN's?
It would give a lot of flexibility i'd think if you have something where you could return an object, that has some query set, and still be able to apply JOIN's to it, subqueries and such.
I've search around, and have on... | Yes, there are several libraries across different programming languages that help you build and manipulate SQL queries programmatically, including support for JOIN operations. Here are a few popular ones:
### 1. **Knex.js (JavaScript/Node.js)**
- **Description**: A SQL query builder for Node.js that supports variou... | 33,526 | [
{
"from": "human",
"value": "Are any of you aware of a library that helps you build/manipulate SQL queries, that supports JOIN's?\nIt would give a lot of flexibility i'd think if you have something where you could return an object, that has some query set, and still be able to apply JOIN's to it, subqueries... |
Does anyone have experience deploying GWT apps to EC2?
If I were to install tomcat or apache on a ec2 instance, could I have users connect directly to a url pointing there?
Would that be cost effective, or would java hosting services be best?
Is there any downside to hosting the edge HTTP server on a regular hosting se... | Deploying GWT (Google Web Toolkit) applications on EC2 (Amazon Elastic Compute Cloud) is a common approach and can be quite effective. Here’s a breakdown of your questions:
### 1. Deploying GWT Apps on EC2
You can indeed install Tomcat or Apache on an EC2 instance to host your GWT application. Users can connect direct... | 39,275 | [
{
"from": "human",
"value": "Does anyone have experience deploying GWT apps to EC2?\nIf I were to install tomcat or apache on a ec2 instance, could I have users connect directly to a url pointing there?\nWould that be cost effective, or would java hosting services be best?\nIs there any downside to hosting ... |
I have the following code that sets a cookie:
string locale = ((DropDownList)this.LoginUser.FindControl("locale")).SelectedValue;
HttpCookie cookie = new HttpCookie("localization",locale);
cookie.Expires= DateTime.Now.AddYears(1);
Response.Cookies.Set(cookie);
However, when I try to read the cookie, the Value... | It seems like you're successfully creating and setting the cookie, but when you're trying to read it, you're encountering a `null` value. Here are a few things to check to help you troubleshoot the issue:
### 1. Cookie Path
Make sure the cookie's path is correctly set. By default, cookies are set for the current path ... | 37,159 | [
{
"from": "human",
"value": "I have the following code that sets a cookie:\n string locale = ((DropDownList)this.LoginUser.FindControl(\"locale\")).SelectedValue;\n HttpCookie cookie = new HttpCookie(\"localization\",locale);\n cookie.Expires= DateTime.Now.AddYears(1);\n Response.Cookies.Set(cookie);\n... |
I have to give a general note to some huge Java project for which I have but little visibility and I was wondering if there were any guidelines for determining:
what number of classes per package can be considered right, to low, or to high (this project has 3.89 classes per package, which seems a bit too small for me)... | When assessing the volumetry of a large Java project, it's useful to have some general guidelines based on industry practices. Keep in mind that these numbers can vary significantly depending on the nature of the project, its complexity, and its architecture.
### 1. Number of Classes per Package
- **Typical Range**: I... | 35,634 | [
{
"from": "human",
"value": "I have to give a general note to some huge Java project for which I have but little visibility and I was wondering if there were any guidelines for determining:\n\nwhat number of classes per package can be considered right, to low, or to high (this project has 3.89 classes per p... |
I'm a new to MSBuild and wanted to play around with it a bit, but I just cannot figure out why this isn't working.
So my solution has two projects: "Model" and "BuildTasks". BuildTasks just has a single class:
using Microsoft.Build.Utilities;
namespace BuildTasks
{
public class Test : Task
{
public ov... | It seems like you're on the right track, but there are a couple of common issues that could be causing the error with loading your `BuildTasks.dll`. Here are some suggestions to troubleshoot and resolve the issue:
### 1. **Build Order and Output Path**
Ensure that the `BuildTasks` project is built successfully and th... | 38,010 | [
{
"from": "human",
"value": "I'm a new to MSBuild and wanted to play around with it a bit, but I just cannot figure out why this isn't working.\nSo my solution has two projects: \"Model\" and \"BuildTasks\". BuildTasks just has a single class:\nusing Microsoft.Build.Utilities;\n\nnamespace BuildTasks\n{\n ... |
Is it possible to achieve better data transfer rate with multiple parallel TCP connections in high-latency environment (public internet with large geographical distance assuming no traffic shaping per connection or stuff like that) or can TCP utilize the whole bandwidth with a single connection?
Is TCP sending data as... | In a high-latency environment, such as the public internet with large geographical distances, achieving better data transfer rates using multiple parallel TCP connections can indeed be beneficial, although it may depend on various factors, including network conditions, the application being used, and the specific imple... | 37,905 | [
{
"from": "human",
"value": "Is it possible to achieve better data transfer rate with multiple parallel TCP connections in high-latency environment (public internet with large geographical distance assuming no traffic shaping per connection or stuff like that) or can TCP utilize the whole bandwidth with a s... |
We're using Spring/Hibernate on a Websphere Application Server for AIX. On my Windows machine, the problem doesn't occur--only when running off AIX. When a user logs in with an account number, if they prefix the '0' to their login ID, the application rejects the login. In the DB2 table, the column is of numeric type... | The issue you're experiencing seems related to the way leading zeros in the login ID are being processed or validated in your application when running on the AIX environment. Here are a few approaches you can take to diagnose and potentially resolve the problem:
### 1. Check Input Handling
Ensure that the input handl... | 38,072 | [
{
"from": "human",
"value": "We're using Spring/Hibernate on a Websphere Application Server for AIX. On my Windows machine, the problem doesn't occur--only when running off AIX. When a user logs in with an account number, if they prefix the '0' to their login ID, the application rejects the login. In the... |
I've been studying OOP for quite a while now and I have a good grasp of the theory. I read the Head First book on OOP and, while it reinforced a lot of the theory, I found the case studies to be somewhat trivial.
I find that I'm applying OOP principles to my code each day, but I'm not sure if I'm applying them correct... | It's great to hear that you have a solid grasp of OOP theory and are actively applying it in your daily coding! Here are some recommendations that can help you deepen your understanding and skills in object-oriented programming:
### Books
1. **"Clean Code: A Handbook of Agile Software Craftsmanship" by Robert C. Marti... | 37,784 | [
{
"from": "human",
"value": "I've been studying OOP for quite a while now and I have a good grasp of the theory. I read the Head First book on OOP and, while it reinforced a lot of the theory, I found the case studies to be somewhat trivial.\nI find that I'm applying OOP principles to my code each day, but... |
I know how to set up a local webserver using xampp on windows... I enter my alias and target on the hosts file (c:\windows\system32\drivers\etc\hosts) and then add a respective entry on my apache vhosts config file. This way, assuming that my webserver is listening to port 80, I can for example map example.com to my lo... | You're correct in your understanding that the hosts file is primarily used for mapping hostnames to IP addresses, and it does not handle port numbers. When you specify an entry in the hosts file, it only directs traffic for that hostname to a specified IP address (like `127.0.0.1`), but it does not allow you to specify... | 39,754 | [
{
"from": "human",
"value": "I know how to set up a local webserver using xampp on windows... I enter my alias and target on the hosts file (c:\\windows\\system32\\drivers\\etc\\hosts) and then add a respective entry on my apache vhosts config file. This way, assuming that my webserver is listening to port ... |
I have the the following html elements:
<tr>
<td> <label for="casenumber">Case:</label></td>
<td>
<%=Html.TextBox("casenumber", "", new Dictionary<string, object>
{
{"id", "casenumberID"}
})%>
</td>
</tr>
<tr>
<td><label for="fogbugzUser">Users:</label></td>
<td>
<%=Html.DropDownList("... | To achieve the desired behavior when the case number input loses focus, you'll need to send an AJAX request to your `GetOpenByUser` method, retrieve the user associated with the provided case number, and then update the dropdown accordingly. Below is an example of how to implement this.
### Updated JavaScript
Here's ... | 36,594 | [
{
"from": "human",
"value": "I have the the following html elements:\n<tr> \n <td> <label for=\"casenumber\">Case:</label></td>\n <td>\n <%=Html.TextBox(\"casenumber\", \"\", new Dictionary<string, object>\n {\n {\"id\", \"casenumberID\"}\n })%>\n </td>\n</tr>\n<tr>\n <td><label for=\"fog... |
I am running a sproc on an SQL Server 2005 server which is resulting in the following error:
Msg 64, Level 20, State 0, Line 0 A
transport-level error has occurred
when receiving results from the
server. (provider: TCP Provider,
error: 0 - The specified network name
is no longer available.)
Once the error o... | The error message you're encountering, specifically "A transport-level error has occurred when receiving results from the server," generally indicates that there is an issue with the connection between your client application and the SQL Server. Here are several potential causes and solutions for this issue:
1. **Netw... | 39,619 | [
{
"from": "human",
"value": "I am running a sproc on an SQL Server 2005 server which is resulting in the following error:\n\nMsg 64, Level 20, State 0, Line 0 A\n transport-level error has occurred\n when receiving results from the\n server. (provider: TCP Provider,\n error: 0 - The specified network na... |
Is tilde a legitimate character in an XML SOAP message? I get a SAXParseException:Content not allowed in prolog. I included most of the SOAP message just in case I'm barking up the wrong tree.
POST /... HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, t... | The tilde (`~`) character is indeed a legitimate character in an XML document, including within a SOAP message. However, the issue you're encountering, specifically the `SAXParseException: Content not allowed in prolog`, suggests that there may be a problem with the structure of your XML or with the content being sent ... | 36,450 | [
{
"from": "human",
"value": "Is tilde a legitimate character in an XML SOAP message? I get a SAXParseException:Content not allowed in prolog. I included most of the SOAP message just in case I'm barking up the wrong tree.\nPOST /... HTTP/1.0\nContent-Type: text/xml; charset=utf-8\nAccept: application/soap... |
Is it possible to get the equivalent of the focus and blur events that we have on other form controls for the RTE? That is, I would like to know when a given RTE gets the focus and when it loses it.
I see that the RTE supports lots of events (http://developer.yahoo.com/yui/editor/#events), but I don't see anything abou... | In the context of Rich Text Editors (RTE) like the YUI Editor, you may not find native focus and blur events explicitly listed. However, you can achieve similar functionality by using the underlying `iframe` or `contentEditable` area that the RTE utilizes.
Here’s how you can implement focus and blur events in a YUI Ed... | 39,478 | [
{
"from": "human",
"value": "Is it possible to get the equivalent of the focus and blur events that we have on other form controls for the RTE? That is, I would like to know when a given RTE gets the focus and when it loses it.\nI see that the RTE supports lots of events (http://developer.yahoo.com/yui/edit... |
I want to create a trace on a database server from my C# app, like what you do in SQL Server Profiler. I have found stored procedures (sys.sp_trace_create etc...) that dont seem to work for my SQL management studio. I was wondering if anyone could help with the coding, or where i would start to do this?!
| To create a trace similar to what SQL Server Profiler does directly from your C# application, you will need to utilize the SQL Server Trace functionality using the `SQL Server Management Objects (SMO)` or `Transact-SQL` commands directly. However, using SQL Server Profiler functionality has been deprecated in SQL Serve... | 38,490 | [
{
"from": "human",
"value": "I want to create a trace on a database server from my C# app, like what you do in SQL Server Profiler. I have found stored procedures (sys.sp_trace_create etc...) that dont seem to work for my SQL management studio. I was wondering if anyone could help with the coding, or where ... |
I tried this:
ALTER TABLE My.Table DROP MyField
and got this error:
-MyField is not a constraint.
-Could not drop constraint. See previous errors.
There is just one row of data in the table and the field was just added.
EDIT:
Just to follow up, the sql was missing COLUMN indeed.
Now I get even more seriously looking e... | It looks like you encountered a couple of issues while trying to drop a column from your table. Here’s a summary of the steps you took and some additional information that might be helpful for others facing similar challenges:
1. **Initial Command**: You attempted to use the command
```sql
ALTER TABLE My.Table ... | 31,169 | [
{
"from": "human",
"value": "I tried this:\nALTER TABLE My.Table DROP MyField\n\nand got this error:\n-MyField is not a constraint.\n-Could not drop constraint. See previous errors.\nThere is just one row of data in the table and the field was just added.\nEDIT:\nJust to follow up, the sql was missing COLUM... |
I know that Flash Catalyst is still in Beta, but I'm trying to look ahead. A lot of our users are on intranets whose IT staff require a lot of lead time to upgrade the Flash Player on user's computers. Right now most users are on Flash Player 9.
So my question is, will SWF files created with Flash Catalyst require Fla... | Yes, SWF files created with Flash Catalyst will require Flash Player 10 to run. Flash Catalyst uses features and capabilities that are part of Flash Player 10, so if your users are still on Flash Player 9, they will not be able to view or interact with the content created using Flash Catalyst.
If you are concerned ab... | 42,892 | [
{
"from": "human",
"value": "I know that Flash Catalyst is still in Beta, but I'm trying to look ahead. A lot of our users are on intranets whose IT staff require a lot of lead time to upgrade the Flash Player on user's computers. Right now most users are on Flash Player 9. \nSo my question is, will SWF fil... |
while writing a custom attribute in C# i was wondering if there are any guidelines or best practices regarding exceptions in attributes.
Should the attribute check the given parameters for validity? Or is this the task of the user of the property?
In a simple test I did the exception was not thrown until i used GetCust... | When creating custom attributes in C#, there are indeed some best practices and guidelines to consider regarding the handling of exceptions:
1. **Validation in the Constructor**: It is generally a good practice to validate the parameters of an attribute in its constructor. This way, you can enforce correct usage of th... | 37,341 | [
{
"from": "human",
"value": "while writing a custom attribute in C# i was wondering if there are any guidelines or best practices regarding exceptions in attributes.\nShould the attribute check the given parameters for validity? Or is this the task of the user of the property?\nIn a simple test I did the ex... |
Does anybody know how I can get diff's color margins in VIM (if it is possible)? I mean something like this: (e.g., in NetBeans: Netbeans color margins). It was very useful when I was working with NetBeans, maybe somebody wrote such useful plugin for VIM?
Thanks!
| In Vim, there isn't a built-in feature specifically for colored margins like you would find in IDEs such as NetBeans. However, you can achieve a similar effect through the use of Vim's highlighting capabilities and some custom configurations. Here are a few approaches you can take:
### 1. Using `signs` in Vim
Vim has ... | 38,022 | [
{
"from": "human",
"value": "Does anybody know how I can get diff's color margins in VIM (if it is possible)? I mean something like this: (e.g., in NetBeans: Netbeans color margins). It was very useful when I was working with NetBeans, maybe somebody wrote such useful plugin for VIM?\nThanks!\n"
},
{
... |
Please let me know how can I disable basic authentication on Tomcat 5.5.27
| To disable Basic Authentication in Tomcat 5.5.27, you will need to modify the `web.xml` file of your web application where the authentication is configured. Here are the steps to do this:
1. **Locate the web.xml file**: This file is usually found in the `WEB-INF` directory of your web application. For example, the pat... | 37,902 | [
{
"from": "human",
"value": "Please let me know how can I disable basic authentication on Tomcat 5.5.27\n"
},
{
"from": "gpt",
"value": "To disable Basic Authentication in Tomcat 5.5.27, you will need to modify the `web.xml` file of your web application where the authentication is configured. He... |
What is the purpose of the LongLength property for arrays in .Net. Using a standard integer for length, you could accommodate up to 2 billion indices. Are there really people using .Net to maintain a single array with more the 2 billion elements. Even if each element was a single byte, that would still be 2 GB of da... | The `LongLength` property in .NET arrays provides the total number of elements in a multi-dimensional array as a `long` (Int64) value, which allows for a larger range than the standard `Length` property that returns an `int`. While the `Length` property is sufficient for most practical use cases (supporting up to appro... | 39,954 | [
{
"from": "human",
"value": "What is the purpose of the LongLength property for arrays in .Net. Using a standard integer for length, you could accommodate up to 2 billion indices. Are there really people using .Net to maintain a single array with more the 2 billion elements. Even if each element was a si... |
Create a flat text file in c++ around 50 - 100 MB
with the content 'Added first line' should be inserted in to the file for 4 million times
| You can create a C++ program to generate a flat text file with the specified content repeated 4 million times. Below is a simple C++ program that accomplishes this:
```cpp
#include <iostream>
#include <fstream>
#include <string>
int main() {
const std::string filename = "output.txt"; // Output file name
const... | 39,216 | [
{
"from": "human",
"value": "Create a flat text file in c++ around 50 - 100 MB\nwith the content 'Added first line' should be inserted in to the file for 4 million times\n"
},
{
"from": "gpt",
"value": "You can create a C++ program to generate a flat text file with the specified content repeated... |
Consider the following dialog with the command-line interface to the kernel:
$ math
Mathematica 6.0 for Linux x86 (32-bit)
In[1]:= p = Plot[x^2, {x,-1,1}]
Out[1]= -Graphics-
In[2]:= Export["foo.png", p]
Out[2]= foo.png
That works fine on a machine with $Version = 6.0 for Linux x86 (32-bit) (June 2, 2008) but fails o... | The issue you're encountering stems from the fact that in Mathematica version 7, unlike version 6, the front end is not automatically started or used in certain scenarios, such as when running the kernel without a graphical display (like in a server environment without X11). In version 6, it seems that the front end wa... | 39,421 | [
{
"from": "human",
"value": "Consider the following dialog with the command-line interface to the kernel:\n$ math\nMathematica 6.0 for Linux x86 (32-bit)\n\nIn[1]:= p = Plot[x^2, {x,-1,1}]\nOut[1]= -Graphics-\n\nIn[2]:= Export[\"foo.png\", p]\nOut[2]= foo.png\n\nThat works fine on a machine with $Version = ... |
Many times I use 'mqsc' for create MQ queue manager from script files but I don't know how to generate script files.
Thanks
| Creating a script file for managing IBM MQ Queue Managers using `mqsc` commands involves writing a series of MQSC commands in a text file. Below are the steps to generate a script file and an example of common commands you may include:
### Steps to Create MQSC Script Files
1. **Open a Text Editor**: You can use any t... | 37,984 | [
{
"from": "human",
"value": "Many times I use 'mqsc' for create MQ queue manager from script files but I don't know how to generate script files.\nThanks\n"
},
{
"from": "gpt",
"value": "Creating a script file for managing IBM MQ Queue Managers using `mqsc` commands involves writing a series of ... |
If I type this line in an MS-DOS command prompt window:
ipy -X:ColorfulConsole
IronPython starts up as expected with the colorful console option enabled. However, if I type the same line in Windows PowerShell I get the message:
File -X: does not exist
Can someone explain what I'm doing wrong?
| The issue you're encountering stems from the way command-line arguments are processed differently in Windows PowerShell compared to MS-DOS or the Command Prompt (cmd.exe).
In PowerShell, the syntax for passing arguments to executables is slightly different. When you use `-` before an argument, PowerShell interprets it... | 40,603 | [
{
"from": "human",
"value": "If I type this line in an MS-DOS command prompt window: \nipy -X:ColorfulConsole\n\nIronPython starts up as expected with the colorful console option enabled. However, if I type the same line in Windows PowerShell I get the message: \nFile -X: does not exist\n\nCan someone exp... |
I need a java api, that cannot use JMF, to play video interpreted by the SO codecs but i want to retrieve the each frames in java code. Somebody know some?
| If you want to play video in Java without using the Java Media Framework (JMF) and still be able to access individual frames, you can consider using the following libraries:
### 1. **JavaCV (OpenCV for Java)**
**JavaCV** is a wrapper around OpenCV and FFmpeg. It allows you to decode video files and access individual ... | 35,413 | [
{
"from": "human",
"value": "I need a java api, that cannot use JMF, to play video interpreted by the SO codecs but i want to retrieve the each frames in java code. Somebody know some?\n"
},
{
"from": "gpt",
"value": "If you want to play video in Java without using the Java Media Framework (JMF)... |
I´m trying to separate a gridViewColumn into two rows. Im using default style for the listView. Its no problem to separate the column header into two rows, but it seems like the content is placed over the original style with the border etc hidden under my customized gridViewHeader content. The code looks like:
<GridVie... | To customize the `GridViewColumnHeader` in WPF while preserving its original appearance (like borders and background), you'll need to modify the `ControlTemplate` carefully. Your custom template should incorporate elements from the default style of `GridViewColumnHeader`, rather than completely replacing it.
Instead ... | 36,551 | [
{
"from": "human",
"value": "I´m trying to separate a gridViewColumn into two rows. Im using default style for the listView. Its no problem to separate the column header into two rows, but it seems like the content is placed over the original style with the border etc hidden under my customized gridViewHead... |
This is a follow up question. So, Java store's integers in two's-complements and you can do the following:
int ALPHA_MASK = 0xff000000;
In C# this requires the use of an unsigned integer, uint, because it interprets this to be 4278190080 instead of -16777216.
My question, how do declare negative values in hexadecimal ... | In C#, integers are stored using two's complement representation, just like in Java. However, the way hexadecimal values are interpreted can differ based on the type used (signed vs. unsigned). Let's go through your questions step by step.
### Declaring Negative Hexadecimal Values in C#
In C#, you can represent a neg... | 38,129 | [
{
"from": "human",
"value": "This is a follow up question. So, Java store's integers in two's-complements and you can do the following:\nint ALPHA_MASK = 0xff000000;\n\nIn C# this requires the use of an unsigned integer, uint, because it interprets this to be 4278190080 instead of -16777216.\nMy question, h... |
Does anyone know how to change the color of a row (or row background) in the UIPickerView control from the iPhone SDK? Similiar to the below title for row, however I would also like to change the color of the row:
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)com... | In a `UIPickerView`, you cannot directly change the background color of a specific row using the built-in methods like `titleForRow`. However, you can customize the row appearance by using the delegate method `pickerView:viewForRow:forComponent:reusingView:`. This allows you to return a custom UIView for each row, whic... | 37,351 | [
{
"from": "human",
"value": "Does anyone know how to change the color of a row (or row background) in the UIPickerView control from the iPhone SDK? Similiar to the below title for row, however I would also like to change the color of the row:\n- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:... |
I have the following markup for buttons (can be changed, but I really don't want to):
<a href="#" class="button">
Button text
<img src="someimage.png" />
</a>
This is styled using CSS to become a rather neat button with an icon on it. I am using jQuery to round the leftmost side of the buttons:
$('a.button').corne... | Yes, you can definitely achieve this using jQuery selectors to differentiate between the buttons with images and those without. You can use the `:has()` pseudo-selector to target the buttons based on the presence of an `<img>` child. Here’s how you can do it:
1. To select buttons **with** an `<img>` child, you can use... | 40,644 | [
{
"from": "human",
"value": "I have the following markup for buttons (can be changed, but I really don't want to):\n<a href=\"#\" class=\"button\">\n Button text\n <img src=\"someimage.png\" />\n</a>\n\nThis is styled using CSS to become a rather neat button with an icon on it. I am using jQuery to round ... |
I have created a clickonce deployment and published it to a website. I want to put the installer (version 1.0.0) on a cd for distribution to clients. A setup.exe was created in the route of the published folder but this is very small and cannot be the whole thing required for a cd.
I passed this on to a co developer w... | When you publish a ClickOnce application, the publish process generates a set of files needed for the installation, including the setup.exe and the application files themselves. The setup.exe you mentioned is just a bootstrapper that helps launch the installation, but it doesn't contain the application files themselves... | 36,737 | [
{
"from": "human",
"value": "I have created a clickonce deployment and published it to a website. I want to put the installer (version 1.0.0) on a cd for distribution to clients. A setup.exe was created in the route of the published folder but this is very small and cannot be the whole thing required for a ... |
I've been working with LINQ To SQL for a little while now and when it comes to removing an entity from the DB, I've always called the table's .DeleteOnSubmit and passed in the entity. Sometimes I've found myself writing something like:
db.Users.DeleteOnSubmit(db.Users.Where(c => c.ID == xyz).Select(c => c).Single());
... | Yes, there is a more direct way to remove an entity from the database using LINQ to SQL when you already have the ID of the record. Instead of querying for the entity first, you can create a new instance of the entity with the ID set, attach it to the context, and then mark it for deletion. This approach avoids the ove... | 40,290 | [
{
"from": "human",
"value": "I've been working with LINQ To SQL for a little while now and when it comes to removing an entity from the DB, I've always called the table's .DeleteOnSubmit and passed in the entity. Sometimes I've found myself writing something like:\ndb.Users.DeleteOnSubmit(db.Users.Where(c =... |
I'm trying to setup the Entity Framework with SQL Server 2008. I'm using Guids for the keys on my tables. Is there a way to set it up so the keys are automatically generated by the database? I tried setting "RowGuid" to true and also set the column's default value to be "(newid())". Either way the mapped class stil... | When you're using Entity Framework with SQL Server and want to use GUIDs as primary keys that are automatically generated by the database, there are a few things you need to configure properly. Here’s a step-by-step guide to achieve that:
### Step 1: Database Configuration
1. **Create Table with GUID Key**: In your S... | 39,370 | [
{
"from": "human",
"value": "I'm trying to setup the Entity Framework with SQL Server 2008. I'm using Guids for the keys on my tables. Is there a way to set it up so the keys are automatically generated by the database? I tried setting \"RowGuid\" to true and also set the column's default value to be \"(... |
I've got a Polish version of Windows installed and therefore I get exception messages in Polish. Is there a way to make asp.net display error messages in English? Other than installing English version of Windows.
| Yes, you can configure your ASP.NET application to display error messages in English regardless of the operating system's language settings. Here are a few methods to achieve that:
### 1. Set the Culture in the Web.config File
You can specify the culture and UI culture for your ASP.NET application in the `web.config`... | 38,260 | [
{
"from": "human",
"value": "I've got a Polish version of Windows installed and therefore I get exception messages in Polish. Is there a way to make asp.net display error messages in English? Other than installing English version of Windows.\n"
},
{
"from": "gpt",
"value": "Yes, you can configur... |
I'm trying to automate some stuff in MS Excel. When I try to set the Calculation property I get the following error message: 'Unable to set the Calculation property of the Application class'
I believe this property should be settable.
Any advice appreciated!
| The error message 'Unable to set the Calculation property of the Application class' when trying to change the Calculation property in Excel generally indicates that there is an issue with the context in which you are trying to set this property. Here are some common reasons for this error and some potential solutions:
... | 40,191 | [
{
"from": "human",
"value": "I'm trying to automate some stuff in MS Excel. When I try to set the Calculation property I get the following error message: 'Unable to set the Calculation property of the Application class'\nI believe this property should be settable.\nAny advice appreciated!\n"
},
{
"f... |
Just wondering what people think is the best practice when implementing an IValueConverter which does not have a meaningfull ConvertBack implementation (or one that is only to be used as OneWay)?
Should it throw (and in that case what exception), return null or return some default value.
Thoughts?
| When implementing an `IValueConverter` in WPF (Windows Presentation Foundation) that doesn't have a meaningful `ConvertBack` implementation—especially when it's intended for one-way binding—there are several best practices you can consider:
### Options for `ConvertBack`
1. **Throw a NotImplementedException**:
- T... | 39,214 | [
{
"from": "human",
"value": "Just wondering what people think is the best practice when implementing an IValueConverter which does not have a meaningfull ConvertBack implementation (or one that is only to be used as OneWay)?\nShould it throw (and in that case what exception), return null or return some defa... |
I'm trying to find a way to get the open tasks in C#. I've been searching on google and can only find how to get a list of the processes. I want the only the tasks that would show up on the taskbar.
Also, along with that, it would be cool if I could get the process the task is associated with. And if possible get th... | To retrieve open tasks that appear on the taskbar in C#, you can use a combination of PInvoke to access Windows APIs. The `EnumWindows` function can be used to enumerate through top-level windows, while `GetWindowThreadProcessId` can help you associate the windows with their corresponding processes.
Here’s a sample co... | 36,894 | [
{
"from": "human",
"value": "I'm trying to find a way to get the open tasks in C#. I've been searching on google and can only find how to get a list of the processes. I want the only the tasks that would show up on the taskbar.\nAlso, along with that, it would be cool if I could get the process the task i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.