instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I know there is a registry key indicating the install directory, but I don't remember what it is off-hand.
I am currently interested in Visual Studio 2008 install directory, though it wouldn't hurt to list others for future reference.
| In Windows, Visual Studio installations typically have their paths recorded in the registry. For Visual Studio 2008 specifically, the install directory can be found at the following registry key:
### Visual Studio 2008
- **Registry Key:** `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0`
- **Install Directory V... | 1,014 | [
{
"from": "human",
"value": "I know there is a registry key indicating the install directory, but I don't remember what it is off-hand.\nI am currently interested in Visual Studio 2008 install directory, though it wouldn't hurt to list others for future reference.\n"
},
{
"from": "gpt",
"value":... |
I'm trying to write a script to allow me to log in to a console servers 48 ports so that I can quickly determine what devices are connected to each serial line.
Essentially I want to be able to have a script that, given a list of hosts/ports, telnets to the first device in the list and leaves me in interactive mode so ... | When you run your script using `echo "hostname" | ./telnetTest.sh`, the input is being piped to the script, which doesn't allow you to interact with the `telnet` session as you intended. The `telnet` command expects to interact directly with the terminal, but piping input like this causes it to terminate immediately be... | 9,917 | [
{
"from": "human",
"value": "I'm trying to write a script to allow me to log in to a console servers 48 ports so that I can quickly determine what devices are connected to each serial line.\nEssentially I want to be able to have a script that, given a list of hosts/ports, telnets to the first device in the ... |
Is it possible under any set of circumstances to be able to accomplish this?
My current circumstances are this:
public class CustomForm : Form
{
public class CustomGUIElement
{
...
public event MouseEventHandler Click;
// etc, and so forth.
...
}
private List<CustomGUIElement> _... | Yes, there are certainly more elegant ways to handle event delegation in your scenario without resorting to the kludge you've described. The key is to enable your `CustomForm` to interact with the `CustomGUIElement` instances in a more organized manner. Below are a couple of approaches that you can use to achieve this:... | 8,362 | [
{
"from": "human",
"value": "Is it possible under any set of circumstances to be able to accomplish this?\nMy current circumstances are this:\npublic class CustomForm : Form\n{\n public class CustomGUIElement\n {\n ...\n public event MouseEventHandler Click;\n // etc, and so forth.\n ... |
Is there a way in PHP to overwrite a method declared by one interface in an interface extending that interface?
The Example:
I'm probably doing something wrong, but here is what I have:
interface iVendor{
public function __construct($vendors_no = null);
public function getName();
public function getVendors_... | In PHP, interface inheritance works differently compared to class inheritance, particularly when it comes to constructors. Interfaces cannot define constructors, and even if you declare a constructor in an interface, it will be ignored.
When you implement an interface, you can't have two constructors in the implementi... | 6,743 | [
{
"from": "human",
"value": "Is there a way in PHP to overwrite a method declared by one interface in an interface extending that interface?\nThe Example:\nI'm probably doing something wrong, but here is what I have:\ninterface iVendor{\n public function __construct($vendors_no = null);\n public funct... |
As far as I know, in gcc you can write something like:
#define DBGPRINT(fmt...) printf(fmt);
Is there a way to do that in VC++?
| In Microsoft Visual C++ (VC++), you can achieve similar functionality by using macros, but the syntax is slightly different. In VC++, you can use the following approach:
```cpp
#include <stdio.h>
#define DBGPRINT(fmt, ...) printf(fmt, __VA_ARGS__)
int main() {
int value = 42;
DBGPRINT("The value is: %d\n", v... | 12,060 | [
{
"from": "human",
"value": "As far as I know, in gcc you can write something like:\n#define DBGPRINT(fmt...) printf(fmt);\n\nIs there a way to do that in VC++?\n"
},
{
"from": "gpt",
"value": "In Microsoft Visual C++ (VC++), you can achieve similar functionality by using macros, but the syntax ... |
I am serializing a JPEG Image in c#.net. I am simply converting it into a byte steam and sending it through web service.
I observed that serialized byte stream is 30 times more than that of the size of actual image. Can any one suggest me a better approach to serialize and stay relative to the size of the actual image... | When working with JPEG images in C#, the size of the serialized byte stream can often be larger than the actual image file size due to the way the image is being handled or transmitted. If you're seeing a byte stream that is significantly larger than the original image size, here are a few strategies you can implement ... | 7,624 | [
{
"from": "human",
"value": "I am serializing a JPEG Image in c#.net. I am simply converting it into a byte steam and sending it through web service. \nI observed that serialized byte stream is 30 times more than that of the size of actual image. Can any one suggest me a better approach to serialize and sta... |
I'm looking for an online tool that will let me create a gif or png like this one:
Some kind of LaTex online service, with friendly examples?
| There are several online tools that you can use to create GIFs or PNGs from LaTeX code. Here are a few recommendations:
1. **Overleaf**: Overleaf is a popular online LaTeX editor that allows you to write and render LaTeX documents in real-time. You can create equations, figures, and more, and then export them as PNGs ... | 8,908 | [
{
"from": "human",
"value": "I'm looking for an online tool that will let me create a gif or png like this one:\n\nSome kind of LaTex online service, with friendly examples?\n"
},
{
"from": "gpt",
"value": "There are several online tools that you can use to create GIFs or PNGs from LaTeX code. H... |
I really want to get the google Calendar Api up an running. I found a great article about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading.
I cant get openssl running and recieve the following error when I try to run any of the examp... | To enable OpenSSL in PHP on your development environment, you'll need to follow a series of steps. Here's a straightforward guide that should help you get OpenSSL running:
### Step 1: Verify PHP Installation
First, ensure that you have PHP installed and running correctly. You can check this by creating a `phpinfo.php`... | 8,861 | [
{
"from": "human",
"value": "I really want to get the google Calendar Api up an running. I found a great article about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading.\nI cant get openssl running and recieve the followin... |
I have a button that I would like to disable when the form submits to prevent the user submitting multiple times.
I have tried naively disabling the button with javascript onclick but then if a client side validation that fails the button remains disabled.
How do I disable the button when the form successfully submits ... | To disable a button upon successful form submission in an ASP.NET web application while also ensuring that it remains enabled if client-side validation fails, you can use the following approach that hooks into the ASP.NET AJAX page lifecycle.
### Approach
1. Use a combination of client-side JavaScript/jQuery to handl... | 6,843 | [
{
"from": "human",
"value": "I have a button that I would like to disable when the form submits to prevent the user submitting multiple times.\nI have tried naively disabling the button with javascript onclick but then if a client side validation that fails the button remains disabled.\nHow do I disable the... |
I'm looking for something that will show me the size of each folder within my main folder recursively.
This is a LAMP server with a CGI-Bin so most any PHP script should work or anything that will work in the CGI-Bin.
My hosting company does not provide an interface for me to see which folders are consuming the most am... | You can use a Perl script to calculate the sizes of folders recursively and optionally create a simple graph of the results. Since your host only supports Perl in the CGI-BIN, I'll provide a basic Perl script that calculates folder sizes and outputs the results in a simple HTML format. If you're familiar with GD or Ima... | 8,744 | [
{
"from": "human",
"value": "I'm looking for something that will show me the size of each folder within my main folder recursively.\nThis is a LAMP server with a CGI-Bin so most any PHP script should work or anything that will work in the CGI-Bin.\nMy hosting company does not provide an interface for me to ... |
In all the Git tutorials I've read they say that you can do:
git init
git add .
git commit
When I do that I get a big text file opened up. None of the tutorials seem to address this, so I don't know what to do with the file or what to put in it if anything.
| When you run `git commit`, Git opens a text editor for you to enter a commit message. This is a normal behavior, and it indicates that Git is expecting you to provide a message that describes the changes you’re committing.
### Understanding the Commit Message
The commit message is important because it helps others (a... | 10,998 | [
{
"from": "human",
"value": "In all the Git tutorials I've read they say that you can do:\ngit init\ngit add .\ngit commit\n\nWhen I do that I get a big text file opened up. None of the tutorials seem to address this, so I don't know what to do with the file or what to put in it if anything.\n"
},
{
... |
I am getting some errors thrown in my code when I open a Windows Forms form in Visual Studio's designer. I would like to branch in my code and perform a different initialization if the form is being opened by designer than if it is being run for real.
How can I determine at run-time if the code is being executed as pa... | To determine if your Windows Forms application is being run in the designer or at runtime, you can check the `DesignMode` property of the control or form. This property will return `true` if the control is being used in a designer environment and `false` if it is running normally.
Here’s how you can implement this in ... | 9,452 | [
{
"from": "human",
"value": "I am getting some errors thrown in my code when I open a Windows Forms form in Visual Studio's designer. I would like to branch in my code and perform a different initialization if the form is being opened by designer than if it is being run for real. \nHow can I determine at ru... |
I have this program, we'll call it Host. Host does all kinds of good stuff, but it needs to be able to accept input through the command line while it's running. This means it has to somehow send its other process data and then quit. For example, I need to be able to do this:
./Host --blahblah 3 6 3 5
This should someh... | To achieve the functionality where your program (Host) can accept commands through the command line while it's running, you can consider using either Unix domain sockets (for Linux) or named pipes (FIFO). However, a simpler approach that works on both Linux and Windows is to use signals or inter-process communication m... | 5,194 | [
{
"from": "human",
"value": "I have this program, we'll call it Host. Host does all kinds of good stuff, but it needs to be able to accept input through the command line while it's running. This means it has to somehow send its other process data and then quit. For example, I need to be able to do this:\n./... |
What are the best code snippets for C#? (using visual studio) VB has a lot that are pre-defined, but there are only a handful for C#. Do you have any really useful ones for C#?
Anyone want to post a good custom one you created yourself?
Anyone?... Bueller?
| Certainly! C# does have fewer built-in code snippets compared to VB.NET, but you can create custom ones to enhance your productivity. Here are some useful built-in snippets as well as custom ones you might find helpful.
### Built-In C# Code Snippets
1. **`prop`**:
Expands to a property definition.
```csharp
... | 4,096 | [
{
"from": "human",
"value": "What are the best code snippets for C#? (using visual studio) VB has a lot that are pre-defined, but there are only a handful for C#. Do you have any really useful ones for C#?\nAnyone want to post a good custom one you created yourself?\nAnyone?... Bueller?\n"
},
{
"f... |
I'm working on a PHP application that links into the Protx VSP Direct payment gateway. To handle "3D Secure" requests from the credit card processing company, I need to forward the user to a different website, mimicking a form that has been posted. I'm trying to use the cURL libraries, but seem to have hit a problem. M... | In PHP, the cURL library is primarily used for making server-side HTTP requests to external APIs or services. It is not used for redirecting users' browsers to another site. If you want to send a user to a different website (especially to handle a 3D Secure request), you'll typically need to create an HTML form with th... | 7,786 | [
{
"from": "human",
"value": "I'm working on a PHP application that links into the Protx VSP Direct payment gateway. To handle \"3D Secure\" requests from the credit card processing company, I need to forward the user to a different website, mimicking a form that has been posted. I'm trying to use the cURL l... |
What is the best way to calculate Age using Flex?
| In Adobe Flex, you can calculate a person's age based on their birth date by following these steps:
1. **Get the Current Date**: Use the `Date` class to get the current date.
2. **Calculate the Difference**: Subtract the birth date from the current date and derive the age.
Here is a sample code snippet that demonstra... | 7,586 | [
{
"from": "human",
"value": "What is the best way to calculate Age using Flex?\n"
},
{
"from": "gpt",
"value": "In Adobe Flex, you can calculate a person's age based on their birth date by following these steps:\n\n1. **Get the Current Date**: Use the `Date` class to get the current date.\n2. **... |
After attending a recent Alt.NET group on IoC, I got to thinking about the tools available and how they might work. StructureMap in particular uses both attributes and bootstrapper concepts to map requests for IThing to ConcreteThing. Attributes automatically throw up flags for me that either reflection or IL injecti... | Inversion of Control (IoC) containers like StructureMap utilize various techniques to resolve dependencies, including the use of attributes and bootstrapping methods. Here’s a breakdown of how this works and the potential overhead you might encounter:
### StructureMap Overview
**1. Attributes for Dependency Injection... | 9,642 | [
{
"from": "human",
"value": "After attending a recent Alt.NET group on IoC, I got to thinking about the tools available and how they might work. StructureMap in particular uses both attributes and bootstrapper concepts to map requests for IThing to ConcreteThing. Attributes automatically throw up flags fo... |
I'm a little hesitant to post this, as I'm not completely sure what I'm doing. Any help would be wonderful.
I'm on a computer with a firewall/filter on it. I can download files without any difficulty. When I try to clone files from Github, though, the computer just hangs. Nothing happens. It creates a git file in the f... | It sounds like you're encountering issues with cloning a repository from GitHub due to the firewall/filter settings on your computer. Here are some steps and suggestions that may help you resolve this issue without disabling your firewall:
1. **Check Internet Connection**: Ensure you have a stable internet connection.... | 7,502 | [
{
"from": "human",
"value": "I'm a little hesitant to post this, as I'm not completely sure what I'm doing. Any help would be wonderful.\nI'm on a computer with a firewall/filter on it. I can download files without any difficulty. When I try to clone files from Github, though, the computer just hangs. Nothi... |
Our design has one jvm that is a jboss/webapp (read/write) that is used to maintain the data via hibernate (using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in the relationships.
We then have a separate jvm that is the server using this data. As it is running continuously we just h... | Hi Chris,
Your design of using two separate JVMs—one for handling read/write operations through the web application and the other for serving data—has its merits but also presents some challenges, especially when it comes to cache synchronization and data consistency.
Here are some thoughts on your current approach a... | 7,131 | [
{
"from": "human",
"value": "Our design has one jvm that is a jboss/webapp (read/write) that is used to maintain the data via hibernate (using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in the relationships.\nWe then have a separate jvm that is the server using this data... |
I'm trying to integrate running Fitnesse tests from MSBuild im my nightly build on TFS.
In an attempt to make it self contained I would like to start the seleniumRC server only when it's needed from fitness.
I've seen that there is a "Command Line Fixture" but it's written in java can I use that?
| Yes, you can use the Command Line Fixture from FitNesse to start the Selenium RC server as part of your FitNesse tests. However, since the Command Line Fixture is written in Java, you'll need to ensure that you have the appropriate Java runtime environment set up for this to work. Here's a step-by-step guide on how to ... | 7,825 | [
{
"from": "human",
"value": "I'm trying to integrate running Fitnesse tests from MSBuild im my nightly build on TFS.\nIn an attempt to make it self contained I would like to start the seleniumRC server only when it's needed from fitness.\nI've seen that there is a \"Command Line Fixture\" but it's written i... |
I have an announcements list on one site. I want to add it as a web part to the top of each subsite. How can I do this in MOSS?
| In Microsoft Office SharePoint Server (MOSS), you can add an announcements list from one site and display it as a web part on the subsites using the following steps:
1. **Navigate to the Parent Site:**
Go to the site where the announcements list is located.
2. **Add the Announcements List to the Page:**
- Go to... | 9,409 | [
{
"from": "human",
"value": "I have an announcements list on one site. I want to add it as a web part to the top of each subsite. How can I do this in MOSS?\n"
},
{
"from": "gpt",
"value": "In Microsoft Office SharePoint Server (MOSS), you can add an announcements list from one site and display ... |
Original Question
I want to be able to generate a new (fully valid) MP3 file from an existing MP3 file to be used as a preview -- try-before-you-buy style. The new file should only contain the first n seconds of the track.
Now, I know I could just "chop the stream" at n seconds (calculating from the bitrate and header ... | To create a valid MP3 preview file from an existing MP3 file using `ffmpeg`, you can follow these steps:
1. **Install FFmpeg**: If you haven't installed `ffmpeg`, you can get it from [the FFmpeg official website](https://ffmpeg.org/download.html) or by using a package manager (e.g., `apt-get`, `brew`, etc.).
2. **Use... | 8,919 | [
{
"from": "human",
"value": "Original Question\nI want to be able to generate a new (fully valid) MP3 file from an existing MP3 file to be used as a preview -- try-before-you-buy style. The new file should only contain the first n seconds of the track.\nNow, I know I could just \"chop the stream\" at n seco... |
How can you automatically import the latest build/revision number in subversion?
The goal would be to have that number visible on your webpage footer like SO does.
| To automatically import the latest build/revision number from a Subversion (SVN) repository and display it in your webpage footer, you can use a combination of SVN properties and a scripting language (like PHP or JavaScript) to retrieve and display the revision number. Here's a step-by-step guide on how to achieve this... | 8,289 | [
{
"from": "human",
"value": "How can you automatically import the latest build/revision number in subversion?\nThe goal would be to have that number visible on your webpage footer like SO does.\n"
},
{
"from": "gpt",
"value": "To automatically import the latest build/revision number from a Subve... |
When dealing with mobile clients it is very common to have multisecond delays during the transmission of HTTP requests. If you are serving pages or services out of a prefork Apache the child processes will be tied up for seconds serving a single mobile client, even if your app server logic is done in 5ms. I am looking ... | What you're describing is a scenario where you want a proxy server that can effectively buffer incoming requests and responses in a way that minimizes resource usage on the backend server. While there may not be a single tool that fits all your needs perfectly, here are a few options and configurations that you might f... | 9,209 | [
{
"from": "human",
"value": "When dealing with mobile clients it is very common to have multisecond delays during the transmission of HTTP requests. If you are serving pages or services out of a prefork Apache the child processes will be tied up for seconds serving a single mobile client, even if your app s... |
Is there a way to get at the ItemContaner of a selected item in a listbox? In Silverlight 2.0 Beta 1 I could, but the container is hidden in Beta 2 of Silverlight 2.0.
I'm trying to resize the listbox item when it is unselected to a specific size and when selected to a variable size. I also want to get the relative ... | In Silverlight 2.0 Beta 2, the way to access the visual container of an item in a `ListBox` has changed a bit, but it is still possible to get the `ItemContainer` associated with a selected item. Here’s how you can achieve that:
1. **Use `ItemContainerGenerator`:** Each `ListBox` has an `ItemContainerGenerator` which ... | 8,718 | [
{
"from": "human",
"value": "Is there a way to get at the ItemContaner of a selected item in a listbox? In Silverlight 2.0 Beta 1 I could, but the container is hidden in Beta 2 of Silverlight 2.0. \nI'm trying to resize the listbox item when it is unselected to a specific size and when selected to a variab... |
I have a method in .NET (C#) which returns string[][]. When using RegAsm or TlbExp (from the .NET 2.0 SDK) to create a COM type library for the containing assembly, I get the following warning:
WARNING: There is no marshaling support for nested arrays.
This warning results in the method in question not being exported... | To address the issue of marshaling nested arrays in a .NET method to be consumed by a COM client (in this case, VB6), you can use a `Variant` return type. This allows you to bypass the marshaling limitations of COM regarding multidimensional arrays.
Here's a step-by-step guide on how to implement this in C#:
### Step... | 8,516 | [
{
"from": "human",
"value": "I have a method in .NET (C#) which returns string[][]. When using RegAsm or TlbExp (from the .NET 2.0 SDK) to create a COM type library for the containing assembly, I get the following warning:\n\nWARNING: There is no marshaling support for nested arrays.\n\nThis warning results... |
So our SQL Server 2000 is giving me the error, "The log file for database is full. Back up the transaction log for the database to free up some log space."
How do I go about fixing this without deleting the log like some other sites have mentioned?
Additional Info: Enable AutoGrowth is enabled growing by 10% and is re... | When you receive the error "The log file for database is full. Back up the transaction log for the database to free up some log space," it means that the transaction log for the database has run out of space, and SQL Server cannot continue processing transactions until space is freed up. Since you want to fix this with... | 8,121 | [
{
"from": "human",
"value": "So our SQL Server 2000 is giving me the error, \"The log file for database is full. Back up the transaction log for the database to free up some log space.\"\nHow do I go about fixing this without deleting the log like some other sites have mentioned?\nAdditional Info: Enable A... |
I want to use a WSDL SOAP based web service in Python. I have looked at the Dive Into Python code but the SOAPpy module does not work under Python 2.5.
I have tried using suds which works partly, but breaks with certain types (suds.TypeNotFound: Type not found: 'item').
I have also looked at Client but this does not ap... | To work with a WSDL SOAP-based web service in Python, you can use the `zeep` library, which is a modern SOAP client for Python and works well with WSDL files. It's generally a better choice than the older libraries you've mentioned (like `SOAPpy` or `suds`) because it is actively maintained and supports a wide range of... | 8,783 | [
{
"from": "human",
"value": "I want to use a WSDL SOAP based web service in Python. I have looked at the Dive Into Python code but the SOAPpy module does not work under Python 2.5.\nI have tried using suds which works partly, but breaks with certain types (suds.TypeNotFound: Type not found: 'item').\nI have... |
I know about all and choice, but they don't account for a case where I do want some elements to be able to occur more than once, such as:
<Root>
<ThingA/>
<ThingB/>
<ThingC/>
<ThingC/>
<ThingC/>
</Root>
I could use sequence, but I'd prefer to allow these children to be in any order. I could use any... | You're correct in identifying the limitations of XSD when it comes to defining elements that can appear in any order while also allowing for multiple occurrences of some elements. However, RELAX NG offers a more flexible way to express such constraints.
In XSD, you might struggle to achieve what you're looking for bec... | 8,975 | [
{
"from": "human",
"value": "I know about all and choice, but they don't account for a case where I do want some elements to be able to occur more than once, such as:\n<Root>\n <ThingA/>\n <ThingB/>\n <ThingC/>\n <ThingC/>\n <ThingC/>\n</Root>\n\nI could use sequence, but I'd prefer to allow ... |
Is there a way to have a 64 bit enum in C++? Whilst refactoring some code I came across bunch of #defines which would be better as an enum, but being greater than 32 bit causes the compiler to error.
For some reason I thought the following might work:
enum MY_ENUM : unsigned __int64
{
LARGE_VALUE = 0x100000000... | In C++, enumerations (enums) are typically limited to a size that can fit within an `int`, which is commonly 32 bits on most platforms. However, you can use a scoped enum (also known as `enum class`) with a specified underlying type that can be larger than the default `int` type, including `uint64_t` or `unsigned long ... | 10,238 | [
{
"from": "human",
"value": "Is there a way to have a 64 bit enum in C++? Whilst refactoring some code I came across bunch of #defines which would be better as an enum, but being greater than 32 bit causes the compiler to error.\nFor some reason I thought the following might work:\nenum MY_ENUM : unsigned ... |
We put all of our unit tests in their own projects. We find that we have to make certain classes public instead of internal just for the unit tests. Is there anyway to avoid having to do this. What are the memory implication by making classes public instead of sealed?
| When you structure your unit tests in separate projects, you may encounter situations where you need to expose internal classes or members to your tests. Here are some strategies to avoid making classes public just for testing purposes:
### Strategies to Avoid Making Classes Public
1. **Use InternalsVisibleTo Attribu... | 7,154 | [
{
"from": "human",
"value": "We put all of our unit tests in their own projects. We find that we have to make certain classes public instead of internal just for the unit tests. Is there anyway to avoid having to do this. What are the memory implication by making classes public instead of sealed?\n"
},... |
As someone with some winforms and client applications experience - is it worth going back and learning the way traditional ASP .NET pages work, or is it okay with moving straight into ASP .NET MVC?
I'm kind of looking for pitfalls or traps in my knowledge of general C#, that I won't know from the screencast series and ... | Whether you should learn traditional ASP.NET Web Forms before diving into ASP.NET MVC depends on your specific goals, the projects you plan to work on, and your existing knowledge.
### Reasons to Learn Traditional ASP.NET Web Forms:
1. **Legacy Applications**: If you are likely to work on legacy systems that still us... | 7,472 | [
{
"from": "human",
"value": "As someone with some winforms and client applications experience - is it worth going back and learning the way traditional ASP .NET pages work, or is it okay with moving straight into ASP .NET MVC?\nI'm kind of looking for pitfalls or traps in my knowledge of general C#, that I ... |
Has any one done this before? It would seem to me that there should be a webservice but i can't find one. I am writing an application for personal use that would just show basic info from IMDB.
| Yes, there are several web services and APIs available that can provide information from IMDb, though access can vary based on licensing and availability.
1. **IMDb API (Unofficial)**: There are unofficial APIs available that scrape data from IMDb. One popular choice is the **OMDb API** (Open Movie Database), which pr... | 8,048 | [
{
"from": "human",
"value": "Has any one done this before? It would seem to me that there should be a webservice but i can't find one. I am writing an application for personal use that would just show basic info from IMDB.\n"
},
{
"from": "gpt",
"value": "Yes, there are several web services and... |
For writing scripts for process automation in Linux platform, which scripting language will be better, shell script, Perl, Python, or anything else? I am new to all of them. I am just thinking to which one to go for.
| When considering a scripting language for process automation on a Linux platform, each of the options you mentioned—shell scripting, Perl, and Python—has its strengths and weaknesses. Here's a brief overview of each to help you decide which might be the best fit for your needs:
### Shell Scripting
- **Pros**:
- Inte... | 8,475 | [
{
"from": "human",
"value": "For writing scripts for process automation in Linux platform, which scripting language will be better, shell script, Perl, Python, or anything else? I am new to all of them. I am just thinking to which one to go for.\n"
},
{
"from": "gpt",
"value": "When considering... |
There's a discussion going on over at comp.lang.c++.moderated about whether or not assertions, which in C++ only exist in debug builds by default, should be kept in production code or not.
Obviously, each project is unique, so my question here is not so much whether assertions should be kept, but in which cases this is... | The debate about whether to keep assertions in production code is nuanced, and it's important to understand the context in which you're working. Here are some considerations that may help clarify when assertions could be useful in production and when they might not be:
### When to Keep Assertions in Production Code
1... | 6,985 | [
{
"from": "human",
"value": "There's a discussion going on over at comp.lang.c++.moderated about whether or not assertions, which in C++ only exist in debug builds by default, should be kept in production code or not.\nObviously, each project is unique, so my question here is not so much whether assertions ... |
I have done a bit of research into this and it seems that the only way to sort a data bound combo box is to sort the data source itself (a DataTable in a DataSet in this case).
If that is the case then the question becomes what is the best way to sort a DataTable?
The combo box bindings are set in the designer initia... | Sorting a `DataTable` that is bound to a `ComboBox` can indeed be a bit tricky, especially when you're using data binding. The method you're using (`this.typedDataSet.Table1.DefaultView.Sort = "ColumnB DESC";`) is the correct approach to sort the data, but the timing and the way the binding is set up can affect whether... | 8,550 | [
{
"from": "human",
"value": "I have done a bit of research into this and it seems that the only way to sort a data bound combo box is to sort the data source itself (a DataTable in a DataSet in this case). \nIf that is the case then the question becomes what is the best way to sort a DataTable?\nThe combo ... |
How does gcc implement stack unrolling for C++ exceptions on linux? In particular, how does it know which destructors to call when unrolling a frame (i.e., what kind of information is stored and where is it stored)?
| In GCC (GNU Compiler Collection), stack unwinding for C++ exceptions is managed in accordance with the C++ language's exception handling model, which is implemented through a combination of information generated during compilation, runtime libraries, and the operating system's support for exceptions.
### Key Concepts... | 7,711 | [
{
"from": "human",
"value": "How does gcc implement stack unrolling for C++ exceptions on linux? In particular, how does it know which destructors to call when unrolling a frame (i.e., what kind of information is stored and where is it stored)?\n"
},
{
"from": "gpt",
"value": "In GCC (GNU Compi... |
I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the ".mvc"-naming in the URL.
Will this code work to make sure it works on all IIS-versions? Without having to make special adjustments in code, global.asax or config-files for the different IIS-versions.
bool... | Your approach of using a conditional routing setup in your ASP.NET MVC application is a good strategy to support both IIS6 and IIS7 without requiring extensive code changes or configuration for each IIS version. The check for `HttpRuntime.UsingIntegratedPipeline` is appropriate for distinguishing between the two enviro... | 10,383 | [
{
"from": "human",
"value": "I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the \".mvc\"-naming in the URL.\nWill this code work to make sure it works on all IIS-versions? Without having to make special adjustments in code, global.asax or confi... |
If a callback handler returns false, does it cause only the handlers for that callback to not be called, or does it cause the remaining callbacks in that handler and all subsequent callbacks to not be called as well?
| The behavior of a callback handler returning false typically depends on the specific implementation of the callback system you are working with.
In many event-driven programming environments (like jQuery or certain JavaScript frameworks), if a callback handler returns `false`, it usually prevents the default action a... | 13,236 | [
{
"from": "human",
"value": "If a callback handler returns false, does it cause only the handlers for that callback to not be called, or does it cause the remaining callbacks in that handler and all subsequent callbacks to not be called as well?\n"
},
{
"from": "gpt",
"value": "The behavior of a... |
On larger and/or long running projects, I tend to reference many assemblies and namespaces, and often I end up removing some functionality later on or moving it into a different project.
I just wonder, is there a way to check every project (heck, every .cs file) in my whole Visual Studio solution and get a list of all ... | Removing unused references and namespaces across a large Visual Studio solution can be a tedious task, especially with a significant number of files and assemblies. While ReSharper is a powerful tool for managing code, as you've noted, it can be cumbersome to use it on a file-by-file basis. Here are a few approaches yo... | 9,332 | [
{
"from": "human",
"value": "On larger and/or long running projects, I tend to reference many assemblies and namespaces, and often I end up removing some functionality later on or moving it into a different project.\nI just wonder, is there a way to check every project (heck, every .cs file) in my whole Vis... |
In the application I'm developping (in Java/swing), I have to show a full screen window on the second screen of the user.
I did this using a code similar to the one you'll find below...
Be, as soon as I click in a window opened by windows explorer, or as soon as I open windows explorer (i'm using windows XP), the full ... | The issue you're encountering with your full-screen window minimizing when interacting with other applications (like Windows Explorer) is a known behavior with the `setFullScreenWindow` method on certain platforms, particularly older versions of Windows and Java. This behavior may be due to how the underlying operating... | 5,483 | [
{
"from": "human",
"value": "In the application I'm developping (in Java/swing), I have to show a full screen window on the second screen of the user.\nI did this using a code similar to the one you'll find below...\nBe, as soon as I click in a window opened by windows explorer, or as soon as I open windows... |
I have uriscan installed on my Win2003 server and it is blocking an older ColdFusion script. The log entry has the following--
2008-09-19 00:16:57 66.82.162.13 1416208729 GET /Admin/Uploads/Mountain/Wolf%2520Creek%2520gazeebo.jpg Rejected URL+is+double+escaped URL - -
How do I get uriscan to allow submissions like thi... | If URI Scan is blocking requests due to double-escaped URLs, but you want to allow specific submissions without turning off the double-escaped URL feature entirely, you have a few options to consider:
### 1. **Modify Your ColdFusion Application**
Instead of allowing double-escaped URLs universally, consider modifying... | 9,233 | [
{
"from": "human",
"value": "I have uriscan installed on my Win2003 server and it is blocking an older ColdFusion script. The log entry has the following--\n2008-09-19 00:16:57 66.82.162.13 1416208729 GET /Admin/Uploads/Mountain/Wolf%2520Creek%2520gazeebo.jpg Rejected URL+is+double+escaped URL - -\nHow do ... |
Are there any good resources for planning how exceptions will be used from an architecture perspective? (Or provide your suggestions directly here.) In projects on which I have worked I find that a few common Exceptions are used over and over again and tend to lose their meaning.
From: http://jamesjava.blogspot.com/2... | Planning for the use of exceptions in software architecture is an essential aspect of designing robust and maintainable systems. Here are some strategies and resources that can help you effectively plan and manage exceptions:
### Strategies for Exception Handling
1. **Define Custom Exception Hierarchies**:
- Creat... | 7,921 | [
{
"from": "human",
"value": "Are there any good resources for planning how exceptions will be used from an architecture perspective? (Or provide your suggestions directly here.) In projects on which I have worked I find that a few common Exceptions are used over and over again and tend to lose their meani... |
mime_content_type() is deprecated.
How can I find the MIME type of a local file using PHP5 but without using this deprecated method or the PECL fileinfo extension?
Edit: That's what I was afraid of. It's unfortunate that they deprecated a built-in function in favour of one that requires an extension that isn't always ... | If you want to find the MIME type of a local file in PHP without using the `mime_content_type()` function or the PECL `fileinfo` extension, you can use the following approaches:
### 1. Using the `finfo` Class (if available)
Although you mentioned avoiding `fileinfo`, the `finfo` class is often enabled in many PHP inst... | 7,903 | [
{
"from": "human",
"value": "mime_content_type() is deprecated.\nHow can I find the MIME type of a local file using PHP5 but without using this deprecated method or the PECL fileinfo extension?\nEdit: That's what I was afraid of. It's unfortunate that they deprecated a built-in function in favour of one th... |
Why does the linux kernel generate a segfault on stack overflow? This can make debugging very awkward when alloca in c or fortran creation of temporary arrays overflows. Surely it mjust be possible for the runtime to produce a more helpful error.
| In Linux, a segmentation fault (often called "segfault") is a signal sent to a process when it attempts to access a region of memory that it is not allowed to access. This behavior is primarily due to the operating system's memory management and the protection mechanisms provided by modern hardware architectures.
### ... | 6,045 | [
{
"from": "human",
"value": "Why does the linux kernel generate a segfault on stack overflow? This can make debugging very awkward when alloca in c or fortran creation of temporary arrays overflows. Surely it mjust be possible for the runtime to produce a more helpful error.\n"
},
{
"from": "gpt",
... |
What I currently do is I link the project to another location and give it the same name, then check the box where it says "Branch after share."
And then I would Check out the shared project and work off it. And finally merge with the original project.
This works okay, but it feels very clunky: I have multiple instance... | Using Visual SourceSafe (VSS) for branching can indeed feel clunky, especially when dealing with multiple instances of a project. However, there are some strategies you can employ to streamline your workflow while managing branches effectively in VSS. Here are some suggestions:
### 1. **Use a Single Repository for Bra... | 7,801 | [
{
"from": "human",
"value": "What I currently do is I link the project to another location and give it the same name, then check the box where it says \"Branch after share.\" \nAnd then I would Check out the shared project and work off it. And finally merge with the original project.\nThis works okay, but i... |
I need a Java way to find a running Win process from which I know to name of the executable. I want to look whether it is running right now and I need a way to kill the process if I found it.
| To find and manage running processes in Windows using Java, you can utilize the `ProcessBuilder` class along with command line tools available in Windows. Specifically, you can use the `tasklist` command to check for running processes and `taskkill` to terminate a process.
Here's a sample Java code snippet that demons... | 7,923 | [
{
"from": "human",
"value": "I need a Java way to find a running Win process from which I know to name of the executable. I want to look whether it is running right now and I need a way to kill the process if I found it.\n"
},
{
"from": "gpt",
"value": "To find and manage running processes in Wi... |
I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding. For example:
declare @value decimal(18,2)
set @value = 123.456
This will automatically round @value to be 123.46, which is good in most cases. However, for this project, I don't need that. Is there a simple way t... | In SQL Server, if you want to truncate a decimal number without rounding, you can use the `FLOOR` or `CAST` functions combined with arithmetic operations. Below are a few methods to achieve truncation:
### Method 1: Using `CAST` and Arithmetic
You can truncate the value to two decimal places by multiplying by 100, usi... | 10,526 | [
{
"from": "human",
"value": "I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding. For example:\ndeclare @value decimal(18,2)\n\nset @value = 123.456\n\nThis will automatically round @value to be 123.46, which is good in most cases. However, for this projec... |
I'm using the .NET TWAIN code from http://www.codeproject.com/KB/dotnet/twaindotnet.aspx?msg=1007385#xx1007385xx in my application.
When I try to scan an image when the scanner is not plugged in, the application freezes.
How can I check if the device is plugged in, using the TWAIN driver?
| To check if a scanner is connected and prevent your application from freezing when it's not, you can utilize the TWAIN protocol by attempting to enumerate the available data sources before initiating a scan. Here’s a general approach on how to do this:
1. **Initialize TWAIN**: Before performing any operations, ensure ... | 8,086 | [
{
"from": "human",
"value": "I'm using the .NET TWAIN code from http://www.codeproject.com/KB/dotnet/twaindotnet.aspx?msg=1007385#xx1007385xx in my application. \nWhen I try to scan an image when the scanner is not plugged in, the application freezes.\nHow can I check if the device is plugged in, using the ... |
Does anyone know a mechanism to calculate at compile-time the LCM (Least Common Multiple) and/or GCD (Greatest Common Denominator) of at least two number in C (not C++, I know that template magic is available there)?
I generally use GCC and recall that it can calculate certain values at compile-time when all inputs are... | In C, you can calculate the Least Common Multiple (LCM) and Greatest Common Divisor (GCD) of two or more numbers at compile-time using preprocessor macros or functions with constant expressions. Below, I will provide examples using both methods.
### Using Macros
You can calculate GCD using the Euclidean algorithm wit... | 8,910 | [
{
"from": "human",
"value": "Does anyone know a mechanism to calculate at compile-time the LCM (Least Common Multiple) and/or GCD (Greatest Common Denominator) of at least two number in C (not C++, I know that template magic is available there)?\nI generally use GCC and recall that it can calculate certain ... |
They both seem to fulfill the same purpose. When would I chose one over the other?
| To provide a more tailored response, I'll need a bit more context regarding what "they" refers to. Are you talking about two specific products, tools, services, methods, or something else entirely? Please specify, and I can help outline when you might choose one over the other. | 13,671 | [
{
"from": "human",
"value": "They both seem to fulfill the same purpose. When would I chose one over the other?\n"
},
{
"from": "gpt",
"value": "To provide a more tailored response, I'll need a bit more context regarding what \"they\" refers to. Are you talking about two specific products, tools... |
In a digital signal acquisition system, often data is pushed into an observer in the system by one thread.
example from Wikipedia/Observer_pattern:
foreach (IObserver observer in observers)
observer.Update(message);
When e.g. a user action from e.g. a GUI-thread requires the data to stop flowing, you want to bre... | The situation you describe is a common challenge in multithreaded environments, especially when using patterns like the Observer pattern. The primary issue arises when observers are removed or disposed of while still potentially receiving updates from the subject, leading to issues such as accessing null references or ... | 8,660 | [
{
"from": "human",
"value": "In a digital signal acquisition system, often data is pushed into an observer in the system by one thread. \nexample from Wikipedia/Observer_pattern:\nforeach (IObserver observer in observers)\n observer.Update(message);\n\nWhen e.g. a user action from e.g. a GUI-thread requ... |
I have a rather classic UI situation - two ListBoxes named SelectedItems and AvailableItems - the idea being that the items you have already selected live in SelectedItems, while the items that are available for adding to SelectedItems (i.e. every item that isn't already in there) live in AvailableItems.
Also, I have t... | Yes, it is definitely possible to enable or disable the buttons based on the selection in the ListBoxes directly in XAML using DataBinding and a combination of `MultiDataTrigger` or `MultiBinding` with a `Converter`. However, since WPF does not have a built-in `MultiDataTrigger`, we can achieve the desired behavior usi... | 7,506 | [
{
"from": "human",
"value": "I have a rather classic UI situation - two ListBoxes named SelectedItems and AvailableItems - the idea being that the items you have already selected live in SelectedItems, while the items that are available for adding to SelectedItems (i.e. every item that isn't already in ther... |
We have an enterprise web application where every bit of text in the system is localised to the user's browser's culture setting.
So far we have only supported English, American (similar but mis-spelt ;-) and French (for the Canadian Gov't - app in English or French depending on user preference). During development we ... | Supporting localization for Eastern languages, including Chinese and Japanese, as well as Right-to-Left (RTL) languages like Arabic, presents unique challenges and opportunities for an enterprise web application. Here’s a breakdown of how these considerations work:
### Input Method for Eastern Languages
1. **Phonetic... | 6,473 | [
{
"from": "human",
"value": "We have an enterprise web application where every bit of text in the system is localised to the user's browser's culture setting.\nSo far we have only supported English, American (similar but mis-spelt ;-) and French (for the Canadian Gov't - app in English or French depending o... |
Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions?
| If you're looking for a Python library to automate Firefox on Linux, you have several good options. Here are some popular choices:
1. **Selenium**:
- Selenium is a widely used web automation tool that supports multiple browsers, including Firefox. You can control Firefox by using the GeckoDriver.
- You can insta... | 9,441 | [
{
"from": "human",
"value": "Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions?\n"
},
{
"from": "gpt",
"value": "If you're looking for a Python library to automate Firefox on Linux, you have several good options. Here a... |
I have been playing with the Ruby library "shoes". Basically you can write a GUI application in the following way:
Shoes.app do
t = para "Not clicked!"
button "The Label" do
alert "You clicked the button!" # when clicked, make an alert
t.replace "Clicked!" # ..and replace the label's text
end
end
This ma... | Designing a user-friendly GUI framework in Python is an interesting challenge, especially if you're aiming for a syntax that feels clean and intuitive, similar to the Ruby `shoes` library. While Python doesn't have the block syntax of Ruby, decorators and a clear class structure can help create a visually pleasing API.... | 6,460 | [
{
"from": "human",
"value": "I have been playing with the Ruby library \"shoes\". Basically you can write a GUI application in the following way:\nShoes.app do\n t = para \"Not clicked!\"\n button \"The Label\" do\n alert \"You clicked the button!\" # when clicked, make an alert\n t.replace \"Clicke... |
I've found SVN to be extremely useful for documentation, personal files, among other non-source code uses.
What other practical uses have you found to version control systems in general?
| Version control systems (VCS) like SVN (Subversion) and others (e.g., Git) can be applied to a wide range of scenarios beyond traditional source code management. Here are some practical uses for version control systems:
1. **Document Management**: Track changes to documents, such as reports, proposals, and manuals, al... | 4,525 | [
{
"from": "human",
"value": "I've found SVN to be extremely useful for documentation, personal files, among other non-source code uses. \nWhat other practical uses have you found to version control systems in general?\n"
},
{
"from": "gpt",
"value": "Version control systems (VCS) like SVN (Subve... |
The IIS 6.0 is serving my Classical ASP pages in a serial fashion (one at a time)
The #2 request will be handled by the web server only when the #1 request ends.
If the #1 request takes a little longer, the #2 request will have to wait for the #1 ends to starts being handled by IIS.
Is this a missconfiguration in IIS?... | The behavior you're observing, where IIS 6.0 is processing Classic ASP requests serially, is typically linked to the way the application pool is configured, especially concerning its "maximum worker processes" setting.
### Reasons for Serial Processing of Classic ASP Requests
1. **Single Worker Process**: By default,... | 10,530 | [
{
"from": "human",
"value": "The IIS 6.0 is serving my Classical ASP pages in a serial fashion (one at a time)\nThe #2 request will be handled by the web server only when the #1 request ends. \nIf the #1 request takes a little longer, the #2 request will have to wait for the #1 ends to starts being handled ... |
I have a project to build a voting desktop application for a class in Java. While security isn't the focus of the project, I would like to be as realistic as I can. What are some of the primary tools to integrate security into a Java application.
Edit: I'm not primarily worried about physical security, we are simply bu... | Building a voting desktop application in Java with a focus on ensuring data integrity and confidentiality is a great project. Here are some tools and techniques you can use to enhance the security of your application:
### 1. **Data Encryption**
- **Java Cryptography Architecture (JCA)**: Utilize JCA for cryptograph... | 5,492 | [
{
"from": "human",
"value": "I have a project to build a voting desktop application for a class in Java. While security isn't the focus of the project, I would like to be as realistic as I can. What are some of the primary tools to integrate security into a Java application.\nEdit: I'm not primarily worried... |
I am trying to delete several rows from a MySQL 5.0.45 database:
delete from bundle_inclusions;
The client works for a while and then returns the error:
Lock wait timeout exceeded; try restarting transaction
It's possible there is some uncommitted transaction out there that has a lock on this table, but I need this p... | In MySQL, if you're experiencing a "Lock wait timeout exceeded" error, it usually indicates that another transaction is holding a lock on the resource you want to modify, and the current transaction has exceeded the specified wait time to acquire that lock.
To resolve this issue, you can follow these steps:
1. **Ide... | 9,443 | [
{
"from": "human",
"value": "I am trying to delete several rows from a MySQL 5.0.45 database:\ndelete from bundle_inclusions;\n\nThe client works for a while and then returns the error:\nLock wait timeout exceeded; try restarting transaction\n\nIt's possible there is some uncommitted transaction out there t... |
I've just run into a display glitch in IE6 with the ExtJS framework. - Hopefully someone can point me in the right direction.
In the following example, the bbar for the panel is displayed 2ems narrower than the panel it is attached to (it's left aligned) in IE6, where as in Firefox it is displayed as the same width as ... | The issue you're encountering with the bbar (bottom bar) width in Internet Explorer 6 is a known problem related to how different browsers handle box model calculations, particularly in older versions of IE. This results in rendering inconsistencies, especially with padding and widths.
### Possible Solutions
1. **Use... | 6,168 | [
{
"from": "human",
"value": "I've just run into a display glitch in IE6 with the ExtJS framework. - Hopefully someone can point me in the right direction.\nIn the following example, the bbar for the panel is displayed 2ems narrower than the panel it is attached to (it's left aligned) in IE6, where as in Fir... |
I am trying to convert my C# code to design (Reverese Engineering) using StarUML. I got the error while performing the Reverse engineering
"Error occurred in the process of reverse engineering. message : Catastrophic failure".
After the error, the application crashed.
Could anyone suggest a solution for this please... | When encountering a "Catastrophic failure" error in StarUML while trying to perform reverse engineering on your C# code, there are several potential causes and solutions you can consider. Here are some steps you can take to troubleshoot and resolve the issue:
### 1. Update StarUML
Ensure you are using the latest versi... | 9,491 | [
{
"from": "human",
"value": "I am trying to convert my C# code to design (Reverese Engineering) using StarUML. I got the error while performing the Reverse engineering \n\n\"Error occurred in the process of reverse engineering. message : Catastrophic failure\". \n\nAfter the error, the application crashed.\... |
From what I've read about Windsor/Microkernel it is in theory possible to do everything that you can do using xml files with code. As a matter of fact - and please correct me if I'm wrong - it seems like the major contribution of the Windsor layer is to add xml configuration for things Microkernel can already do.
How... | You're correct that Castle Windsor, as part of the larger Castle Project ecosystem, allows for dependency injection (DI) through both XML configuration and code. In many cases, using code for registration can provide more flexibility and power compared to XML configuration, especially when dealing with more complex sce... | 9,810 | [
{
"from": "human",
"value": "From what I've read about Windsor/Microkernel it is in theory possible to do everything that you can do using xml files with code. As a matter of fact - and please correct me if I'm wrong - it seems like the major contribution of the Windsor layer is to add xml configuration f... |
From the Displays pane in System Preferences, I can manually change the main monitor by dragging the menu bar from one display to the other. I'd like to automate this and make it part of an AppleScript.
| Automating the process of changing the main display in macOS using AppleScript can be a bit tricky, as there are no built-in commands in AppleScript to directly manipulate display settings like changing the main display. However, you can use AppleScript to execute a shell command that leverages a tool called `displaypl... | 8,801 | [
{
"from": "human",
"value": "From the Displays pane in System Preferences, I can manually change the main monitor by dragging the menu bar from one display to the other. I'd like to automate this and make it part of an AppleScript.\n"
},
{
"from": "gpt",
"value": "Automating the process of chang... |
I have a form view, in the edit template I have two drop downs.
Drop down 1 is explicitly set with a list of allowed values. It is also set to autopostback.
Drop down 2 is databound to an objectdatasource, this objectdatasource uses the first dropdown as one of it's parameters. (The idea is that drop down 1 limits wha... | The issue you are facing stems from the timing of when the data binding occurs in relation to the postback events. When DropDownList #1 (RPMTypeList) posts back due to the change in its selected value, DropDownList #2 (ProjectList) does not have the updated data bound to it correctly, causing the `Eval()`, `XPath()`, a... | 5,354 | [
{
"from": "human",
"value": "I have a form view, in the edit template I have two drop downs. \nDrop down 1 is explicitly set with a list of allowed values. It is also set to autopostback.\nDrop down 2 is databound to an objectdatasource, this objectdatasource uses the first dropdown as one of it's parameter... |
Can I use the ClickOnce deployment method to deploy and auto update applications targeted for the windows mobile platform (eg smartphone or pocket pc)?
| No, ClickOnce deployment is not supported for Windows Mobile applications (such as those targeting smartphones or Pocket PC). ClickOnce is primarily designed for deploying Windows desktop applications and relies on the .NET Framework and Windows OS features that are not available on Windows Mobile devices.
For Windows... | 11,967 | [
{
"from": "human",
"value": "Can I use the ClickOnce deployment method to deploy and auto update applications targeted for the windows mobile platform (eg smartphone or pocket pc)?\n"
},
{
"from": "gpt",
"value": "No, ClickOnce deployment is not supported for Windows Mobile applications (such as... |
I just wonder if anyone knows or made a wrapper around Active Directory to be able to easily query it in .net? Kind of like "LINQ-to-ActiveDirectory" or some SQL Dialect, i.e. to be able to do "SELECT DISTINCT(DEPARTMENT) FROM /Users/SomeOU/AnotherOU" or "SELECT user FROM domain" or whatever.
As far as I know, it is po... | Yes, there are several libraries and frameworks in .NET that can help you query Active Directory in a more LINQ-like fashion, making it easier to work with without having to dive deep into the LDAP syntax. Here are some options:
### 1. **LINQ to Active Directory Libraries**
There are libraries that provide LINQ-like s... | 9,351 | [
{
"from": "human",
"value": "I just wonder if anyone knows or made a wrapper around Active Directory to be able to easily query it in .net? Kind of like \"LINQ-to-ActiveDirectory\" or some SQL Dialect, i.e. to be able to do \"SELECT DISTINCT(DEPARTMENT) FROM /Users/SomeOU/AnotherOU\" or \"SELECT user FROM d... |
I want to connect a C# .NET application to a PostgreSQL database, using TLS with client and server authentication: in other words, if the certificate from the client can not be verified against the certificate of the server, the client should get access denied, and if the client can not verify the certificate of the se... | To connect a C# .NET application to a PostgreSQL database using TLS with both client and server authentication, you can use the Npgsql library, but it requires a few specific configurations to get client certificate authentication working.
Here’s a step-by-step guide on how to set this up:
### Step 1: Install Npgsql
... | 6,996 | [
{
"from": "human",
"value": "I want to connect a C# .NET application to a PostgreSQL database, using TLS with client and server authentication: in other words, if the certificate from the client can not be verified against the certificate of the server, the client should get access denied, and if the client... |
I wrote a simple web service in C# using SharpDevelop (which I just got and I love).
The client wanted it in VB, and fortunately there's a Convert To VB.NET feature. It's great. Translated all the code, and it builds. (I've been a "Notepad" guy for a long time, so I may seem a little old-fashioned.)
But I get this e... | The error you're encountering typically indicates that the ASP.NET runtime is unable to find or load the specified web service class type. Here are a few steps you can take to troubleshoot and resolve the issue:
1. **Check Namespace and Class Name**: Ensure that the namespace and class name in your VB.NET code match e... | 8,711 | [
{
"from": "human",
"value": "I wrote a simple web service in C# using SharpDevelop (which I just got and I love).\nThe client wanted it in VB, and fortunately there's a Convert To VB.NET feature. It's great. Translated all the code, and it builds. (I've been a \"Notepad\" guy for a long time, so I may se... |
I have ASP.NET web pages for which I want to build automated tests (using WatiN & MBUnit). How do I start the ASP.Net Development Server from my code? I do not want to use IIS.
| To start the ASP.NET Development Server (also known as Cassini) programmatically from your code, you can leverage the `System.Diagnostics` namespace in C# to start the server. Below is a simple approach on how to do this.
### Steps to Start ASP.NET Development Server
1. **Create an Instance of the Process Class**: Yo... | 6,578 | [
{
"from": "human",
"value": "I have ASP.NET web pages for which I want to build automated tests (using WatiN & MBUnit). How do I start the ASP.Net Development Server from my code? I do not want to use IIS.\n"
},
{
"from": "gpt",
"value": "To start the ASP.NET Development Server (also known as Ca... |
I'm considering moving a number of small client sites to an unmanaged VPS hosting provider. I haven't decided which one yet, but my understanding is that they'll give me a base OS install (I'd prefer Debian or Ubuntu), an IP address, a root account, SSH, and that's about it.
Ideally, I would like to create a complete V... | Moving your small client sites to an unmanaged VPS is a great way to gain more control and potentially save costs. Here are some insights regarding your questions:
### 1. VM Image Deployment
Creating a complete VM image of your configured setup and transferring that to your VPS provider can be a bit complex. Most unma... | 9,126 | [
{
"from": "human",
"value": "I'm considering moving a number of small client sites to an unmanaged VPS hosting provider. I haven't decided which one yet, but my understanding is that they'll give me a base OS install (I'd prefer Debian or Ubuntu), an IP address, a root account, SSH, and that's about it.\nId... |
I'm using BlogEngine.NET (a fine, fine tool) and I was playing with the TinyMCE editor and noticed that there's a place for me to create a list of external links, but it has to be a javascript file:
external_link_list_url : "example_link_list.js"
this is great, of course, but the list of links I want to use needs to be... | To dynamically generate a JavaScript file that contains your external links from the database in BlogEngine.NET, you'll want to create a handler or a simple ASP.NET page that outputs the JavaScript content dynamically. Here's a step-by-step approach to achieve this:
1. **Create a Dynamic JavaScript Handler**:
You c... | 7,414 | [
{
"from": "human",
"value": "I'm using BlogEngine.NET (a fine, fine tool) and I was playing with the TinyMCE editor and noticed that there's a place for me to create a list of external links, but it has to be a javascript file:\nexternal_link_list_url : \"example_link_list.js\"\nthis is great, of course, bu... |
Is there anyway to disable the rather annoying feature that Visual Studio (2008 in my case) has of copying the line (with text on it) the cursor is on when CTRL-C is pressed and no selection is made?
I know of the option to disable copying blank lines. But this is driving me crazy as well.
ETA: I'm not looking to custo... | In Visual Studio 2008, there's no built-in option to disable the feature that copies the entire line when you press `CTRL+C` without making a selection. However, you can work around this behavior using a few different methods. Here are some options you might consider:
1. **Use the "Edit" Menu**: Instead of using `CTRL... | 8,556 | [
{
"from": "human",
"value": "Is there anyway to disable the rather annoying feature that Visual Studio (2008 in my case) has of copying the line (with text on it) the cursor is on when CTRL-C is pressed and no selection is made?\nI know of the option to disable copying blank lines. But this is driving me cr... |
If I have a std::vector or std::map variable, and I want to see the contents, it's a big pain to see the nth element while debugging. Is there a plugin, or some trick to making it easier to watch STL container variables while debugging (VS2003/2005/2008)?
| In Visual Studio (especially in versions like 2003, 2005, and 2008), inspecting STL containers like `std::vector` and `std::map` can indeed be cumbersome during debugging. However, there are several ways to make this process easier:
### 1. Use Visual Studio's Debugger Visualization
Visual Studio has built-in support f... | 8,419 | [
{
"from": "human",
"value": "If I have a std::vector or std::map variable, and I want to see the contents, it's a big pain to see the nth element while debugging. Is there a plugin, or some trick to making it easier to watch STL container variables while debugging (VS2003/2005/2008)?\n"
},
{
"from":... |
I could swear I've seen the function (or method) that takes a list, like this [3, 7, 19] and makes it into iterable list of tuples, like so: [(0,3), (1,7), (2,19)] to use it instead of:
for i in range(len(name_of_list)):
name_of_list[i] = something
but I can't remember the name and googling "iterate list" gets not... | What you're looking for is the `enumerate()` function in Python. The `enumerate()` function adds a counter to an iterable (like a list) and returns it as an enumerate object, which can be converted to a list of tuples if needed.
Here's an example of how to use `enumerate()`:
```python
my_list = [3, 7, 19]
# Using en... | 11,121 | [
{
"from": "human",
"value": "I could swear I've seen the function (or method) that takes a list, like this [3, 7, 19] and makes it into iterable list of tuples, like so: [(0,3), (1,7), (2,19)] to use it instead of:\nfor i in range(len(name_of_list)):\n name_of_list[i] = something\n\nbut I can't remember ... |
I've been doing some mocking with RhinoMocks and it requires that mocked methods be made virtual. This is fine except we have a custom framework which contains the methods that I want to mock which are currently not marked as virtual.
I can't forsee any problem with making these methods virtual but I was wondering what... | Making methods virtual in a class can introduce several potential issues and considerations that you should be aware of:
1. **Performance Overhead**: Virtual method calls introduce a performance overhead due to the use of a vtable (virtual table) for method resolution at runtime. While this is usually negligible, in p... | 10,126 | [
{
"from": "human",
"value": "I've been doing some mocking with RhinoMocks and it requires that mocked methods be made virtual. This is fine except we have a custom framework which contains the methods that I want to mock which are currently not marked as virtual.\nI can't forsee any problem with making thes... |
I want to be able to make an HTTP call updating some select boxes after a date is selected. I would like to be in control of updating the textbox so I know when there has been a "true" change (in the event the same date was selected). Ideally, I would call a function to pop-up the calendar and be able to evaluate the d... | To achieve this functionality, you will need to implement a combination of JavaScript (or TypeScript), HTML, and potentially some backend code (like Node.js, Python, etc.) to handle the HTTP request when the user selects a date. Below, I’ll walk you through a basic setup for handling the date selection and updating the... | 4,317 | [
{
"from": "human",
"value": "I want to be able to make an HTTP call updating some select boxes after a date is selected. I would like to be in control of updating the textbox so I know when there has been a \"true\" change (in the event the same date was selected). Ideally, I would call a function to pop-up... |
I start up my application which uses a Jetty server, using port 9000.
I then shut down my application with Ctrl-C
I check with "netstat -a" and see that the port 9000 is no longer being used.
I restart my application and get:
[ERROR,9/19 15:31:08] java.net.BindException: Only one usage of each socket address (protoc... | The error you're encountering, `java.net.BindException: Only one usage of each socket address (protocol/network address/port) is normally permitted`, is not a Java bug; it's an issue related to how the operating system handles TCP/IP sockets. When you stop your Jetty server (or any server) using `Ctrl-C`, the operating... | 8,295 | [
{
"from": "human",
"value": "\nI start up my application which uses a Jetty server, using port 9000.\nI then shut down my application with Ctrl-C\nI check with \"netstat -a\" and see that the port 9000 is no longer being used.\nI restart my application and get:\n\n\n[ERROR,9/19 15:31:08] java.net.BindExcept... |
Is it possible to use the OpenFileDialog class select a file OR folder? It appears only to allow the selection of a file, if you select a folder and then choose open it will navigate to that folder.
If the OpenFileDialog can not be used for this is there another object I should be using?
EDIT: The scenario is that I h... | The `OpenFileDialog` class in Windows Forms is indeed designed primarily for selecting files, and it does not support selecting folders. If you attempt to select a folder, it will simply navigate to that folder instead of allowing you to choose it.
To achieve the functionality you described—selecting files or folders,... | 7,963 | [
{
"from": "human",
"value": "Is it possible to use the OpenFileDialog class select a file OR folder? It appears only to allow the selection of a file, if you select a folder and then choose open it will navigate to that folder.\nIf the OpenFileDialog can not be used for this is there another object I shoul... |
I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools?
Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However ... | You've touched on some important points regarding the developer experience with web frameworks like Django and Ruby on Rails, as well as their deployment and tooling ecosystems. It's true that both Django and Rails have their strengths, particularly in rapid development for content-heavy applications, but they do face ... | 7,358 | [
{
"from": "human",
"value": "I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? \nDjango is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of ... |
Normal practice is to use case studies, construct work- and data-flows, etc. But this does not necessarily create a shared vocabulary between the user/sponsor and the analyst-designer: one or the other, both normally, will have to acquire terms and views of the "internals" of the others area of expertise, and this usua... | Overcoming the learning curve in user-analyst communication is crucial for the successful development of software solutions. Here are several strategies that can be effective in bridging the gap between users and analysts/designers:
1. **Use Plain Language:** Avoid technical jargon when interacting with users. Explain... | 9,867 | [
{
"from": "human",
"value": "Normal practice is to use case studies, construct work- and data-flows, etc. But this does not necessarily create a shared vocabulary between the user/sponsor and the analyst-designer: one or the other, both normally, will have to acquire terms and views of the \"internals\" of ... |
What is the window which is displayed when you first install Eclipse called, and how can I find it?
| The window displayed when you first install Eclipse is called the **"Welcome"** screen. It provides an overview of the features and capabilities of Eclipse, as well as links to various resources such as tutorials, documentation, and other helpful information for getting started.
To find the Welcome screen after instal... | 12,513 | [
{
"from": "human",
"value": "What is the window which is displayed when you first install Eclipse called, and how can I find it?\n"
},
{
"from": "gpt",
"value": "The window displayed when you first install Eclipse is called the **\"Welcome\"** screen. It provides an overview of the features and ... |
I'm on the lookout for tools to migrate from ClearCase to SVN.
Ideally would like to get all history information, or as much as can be acquired.
Incremental merges would be very beneficial but isn't required.
| Migrating from IBM ClearCase to Subversion (SVN) can be a complex task, especially if you want to retain as much historical information as possible. Here are several tools and approaches that can assist you in this migration:
### 1. **ClearCase to SVN Migration Tools**
- **svn2clearcase**: While primarily designed fo... | 7,614 | [
{
"from": "human",
"value": "I'm on the lookout for tools to migrate from ClearCase to SVN. \nIdeally would like to get all history information, or as much as can be acquired.\nIncremental merges would be very beneficial but isn't required.\n"
},
{
"from": "gpt",
"value": "Migrating from IBM Cl... |
In toad, I can see unicode characters that are coming from oracle db. But when I click one of the fields in the data grid into the edit mode, the unicode characters are converted to meaningless symbols, but this is not the big issue.
While editing this field, the unicode characters are displayed correctly as I type. Bu... | The issue you are experiencing with TOAD not handling Unicode characters properly in the data grid could be related to a few factors, including the version of TOAD you are using, character set settings, or the configuration of your Oracle database. Here are several potential solutions to address the problem:
1. **Upgr... | 8,404 | [
{
"from": "human",
"value": "In toad, I can see unicode characters that are coming from oracle db. But when I click one of the fields in the data grid into the edit mode, the unicode characters are converted to meaningless symbols, but this is not the big issue.\nWhile editing this field, the unicode charac... |
I'd like to implement a way of recording the version of a project within code, so that it can be used when testing and to help track bugs.
It seems the best version number to use would just be the current revision number from Subversion. Is there an easy way to hook this number into a (C++ in my case) header file or s... | To embed the current Subversion revision number into your C++ project, a common and effective approach is to use the `svnversion` command or an `svn` property to generate a header file with the revision number. This file can then be included in your code, allowing you to reference the revision number throughout your ap... | 7,355 | [
{
"from": "human",
"value": "I'd like to implement a way of recording the version of a project within code, so that it can be used when testing and to help track bugs. \nIt seems the best version number to use would just be the current revision number from Subversion. Is there an easy way to hook this numbe... |
I am unable to load any existing projects after starting VS2008. When I try to open an existing project VS2008 will crash. It looks like it is crashing when trying to load a floating window in VS but I cant tell which one.
When I launch the debugger on the crashed instance I get the following message which is not very ... | It sounds like you're experiencing a frustrating issue with Visual Studio 2008. There are a few steps you can try to diagnose and potentially resolve the problem without having to resort to a full reinstall. Here’s a list of troubleshooting steps:
1. **Reset Visual Studio Settings:**
- You can try resetting Visual ... | 7,764 | [
{
"from": "human",
"value": "I am unable to load any existing projects after starting VS2008. When I try to open an existing project VS2008 will crash. It looks like it is crashing when trying to load a floating window in VS but I cant tell which one.\nWhen I launch the debugger on the crashed instance I ge... |
I'm trying to create a build script for my current project, which includes an Excel Add-in. The Add-in contains a VBProject with a file modGlobal with a variable version_Number. This number needs to be changed for every build. The exact steps:
Open XLA document with Excel.
Switch to VBEditor mode. (Alt+F11)
Open V... | Automating the update of a variable in a VBProject of an Excel Add-in (XLA) can indeed be tricky due to the password protection and the need for interacting with Excel's UI. Here are a few approaches that you might consider:
### 1. **Excel VBA Macro**
You can create a VBA macro that automates this process. The main st... | 4,777 | [
{
"from": "human",
"value": "I'm trying to create a build script for my current project, which includes an Excel Add-in. The Add-in contains a VBProject with a file modGlobal with a variable version_Number. This number needs to be changed for every build. The exact steps:\n\nOpen XLA document with Excel... |
How would you write (in C/C++) a macro which tests if an integer type (given as a parameter) is signed or unsigned?
#define is_this_type_signed (my_type) ...
| To determine if an integer type is signed or unsigned in C/C++, you can use the `sizeof` operator and compare the values of a variable of the type in question. Here's how you can create a macro to achieve this:
```c
#include <limits.h> // for CHAR_MIN and CHAR_MAX
#define is_this_type_signed(my_type) \
((my_type... | 11,228 | [
{
"from": "human",
"value": "How would you write (in C/C++) a macro which tests if an integer type (given as a parameter) is signed or unsigned?\n\n\n #define is_this_type_signed (my_type) ...\n\n\n"
},
{
"from": "gpt",
"value": "To determine if an integer type is signed or unsigned in C/C+... |
Is there an NSIS var to get the path of the currently running installer?
| Yes, in NSIS (Nullsoft Scriptable Install System), you can use the `$EXEDIR` variable to get the path of the currently running installer. The `$EXEDIR` variable holds the directory where the installer executable is located.
Here's a quick example of how you can use it in your script:
```nsis
OutFile "MyInstaller.exe... | 13,438 | [
{
"from": "human",
"value": "Is there an NSIS var to get the path of the currently running installer?\n"
},
{
"from": "gpt",
"value": "Yes, in NSIS (Nullsoft Scriptable Install System), you can use the `$EXEDIR` variable to get the path of the currently running installer. The `$EXEDIR` variable ... |
It's a part of larger code base, which forces -Werror on gcc. This warning is generated in a third party code that shouldn't be changed (and I actually know how to fix it), but I can disable specific warnings. This time man gcc failed me, so please, let some gcc master enlighten me. TIA.
| To disable specific warnings in GCC while using `-Werror`, you can use the `-Wno-<warning>` option. This allows you to convert specific warnings into non-errors without needing to modify the third-party code directly.
Here is how you can do it:
1. Identify the specific warning that is causing the issue. The warning m... | 11,518 | [
{
"from": "human",
"value": "It's a part of larger code base, which forces -Werror on gcc. This warning is generated in a third party code that shouldn't be changed (and I actually know how to fix it), but I can disable specific warnings. This time man gcc failed me, so please, let some gcc master enlighten... |
I'm working on a big .NET 1.1 project, and there exists a wish to upgrade this, majorily to be able to use better tools like Visual Studio 2008, but also because of the new features and smaller amount of bugs in the .NET 2.0 framework.
The project consist for the bigger part of VB.NET, but there are also parts in C#. I... | Upgrading a .NET 1.1 application to .NET 2.0 can indeed provide many benefits, including enhanced performance, new features, and support for modern tools like Visual Studio 2008. However, there are several potential issues you might encounter during the upgrade process. Here are some key points to consider:
### 1. **B... | 7,498 | [
{
"from": "human",
"value": "I'm working on a big .NET 1.1 project, and there exists a wish to upgrade this, majorily to be able to use better tools like Visual Studio 2008, but also because of the new features and smaller amount of bugs in the .NET 2.0 framework.\nThe project consist for the bigger part of... |
Is it "taboo" to programatically create system restore points? I would be doing this before I perform a software update. If there is a better method to create a restore point with just my software's files and data, please let me know.
I would like a means by which I can get the user back to a known working state if e... | Creating system restore points programmatically, like you're proposing, is technically feasible and not inherently "taboo" in the sense of being forbidden or unethical. However, there are several considerations and best practices you should take into account.
### Considerations
1. **User Awareness**: Automatically cr... | 5,374 | [
{
"from": "human",
"value": "Is it \"taboo\" to programatically create system restore points? I would be doing this before I perform a software update. If there is a better method to create a restore point with just my software's files and data, please let me know.\nI would like a means by which I can get... |
Say I have a Student table, it's got an int ID. I have a fixed set of 10 multiple choice questions with 5 possible answers. I have a normalized answer table that has the question id, the Student.answer (1-5) and the Student.ID
I'm trying to write a single query that will return all scores over a certain pecentage. T... | When dealing with a scenario like this, it’s important to consider both the performance and maintainability of your application. Let's break down the options you have:
### Option 1: UDF for Scoring in SQL
Using a User Defined Function (UDF) in SQL to calculate scores can be a viable solution. However, there are a few... | 5,331 | [
{
"from": "human",
"value": "Say I have a Student table, it's got an int ID. I have a fixed set of 10 multiple choice questions with 5 possible answers. I have a normalized answer table that has the question id, the Student.answer (1-5) and the Student.ID\nI'm trying to write a single query that will retu... |
I've been having this irritating issue lately. The site I'm currently working on has large aspx pages with tons of client side js code. While I'm typing the Error List window will keep opening and closing at the bottom of VS (where I have the window docked). I mean constantly. This is beyond aggravating as you can imag... | Hi Geoff,
It sounds like you're experiencing a frustrating issue with Visual Studio 2008, especially when working with large ASPX pages that contain significant amounts of JavaScript code. Here are several potential solutions you can try to resolve the issue of the Error List window constantly opening and closing:
1.... | 9,098 | [
{
"from": "human",
"value": "I've been having this irritating issue lately. The site I'm currently working on has large aspx pages with tons of client side js code. While I'm typing the Error List window will keep opening and closing at the bottom of VS (where I have the window docked). I mean constantly. T... |
I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer.
how can i capture a photo from USB connected digital still camera device in my windows application ?
| Capturing a photo from a USB-connected digital camera in a Windows Forms application using VB.NET or C# can be accomplished using several approaches. One common method is to use the Windows Imaging Acquisition (WIA) library, which provides a way to communicate with digital cameras and acquire images.
### Step-by-Step ... | 7,266 | [
{
"from": "human",
"value": "I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer. \nhow can i capture a photo from USB connected digital still camera device in my windows application ?\n"
},... |
I'm an experienced programmer in a legacy (yet object oriented) development tool and making the switch to C#/.Net. I'm writing a small single user app using SQL server CE 3.5. I've read the conceptual DataSet and related doc and my code works.
Now I want to make sure that I'm doing it "right", get some feedback from ex... | Your approach of using a DataSet with DataTables in a single-user application has its advantages and potential drawbacks. Let’s break down some considerations for your scenario:
### Benefits of Filling Data Once
1. **Reduced Database Calls**: By filling the DataTables once at the start of your application, you avoid ... | 8,018 | [
{
"from": "human",
"value": "I'm an experienced programmer in a legacy (yet object oriented) development tool and making the switch to C#/.Net. I'm writing a small single user app using SQL server CE 3.5. I've read the conceptual DataSet and related doc and my code works.\nNow I want to make sure that I'm d... |
Starting a new project and would like to use one of the MVC framworks. ASP.NET MVC is still in preview but Spring.net is in production and has a history with Java. I'd like to know the general lowdown between the two.
Current questions..
What are the major feature differences?
What about deployment/hosting issues?
Fu... | When considering ASP.NET MVC and Spring.NET for your new project, it's important to understand the differences, strengths, and weaknesses of each framework, as well as their future prospects. Here’s a comparative overview:
### Major Feature Differences:
1. **Architecture:**
- **ASP.NET MVC:** Designed specifically... | 7,821 | [
{
"from": "human",
"value": "Starting a new project and would like to use one of the MVC framworks. ASP.NET MVC is still in preview but Spring.net is in production and has a history with Java. I'd like to know the general lowdown between the two.\nCurrent questions..\nWhat are the major feature difference... |
How can brackets be escaped in using string.Format?
For example:
String val = "1,2,3"
String.Format(" foo {{0}}", val);
This example doesn't throw an exception, but it outputs the string foo {0}.
Is there a way to escape the brackets?
| In C#, when you use `String.Format`, to include literal curly braces (`{` or `}`) in the format string, you need to escape them by doubling them.
In your example, you're trying to use `String.Format` to insert a value into a string while also including literal curly braces. Here’s how you can correctly escape the bra... | 11,112 | [
{
"from": "human",
"value": "How can brackets be escaped in using string.Format?\nFor example:\nString val = \"1,2,3\"\nString.Format(\" foo {{0}}\", val);\n\nThis example doesn't throw an exception, but it outputs the string foo {0}.\nIs there a way to escape the brackets?\n"
},
{
"from": "gpt",
... |
I'm currently working on a JavaScript tool that, during the course of its execution, will ultimately traverse each node in the DOM. Because this has potential to be a very expensive task, I'd like to benchmark the performance of this script.
What's the best, free tool for benchmarking a script such as this across the m... | For benchmarking JavaScript performance across major browsers, you have a few excellent free options. Here are some tools that can help you measure and report the execution times of your script as well as stress test DOM performance:
### 1. **Lighthouse**
- **What it is**: Lighthouse is an open-source, automated tool ... | 5,392 | [
{
"from": "human",
"value": "I'm currently working on a JavaScript tool that, during the course of its execution, will ultimately traverse each node in the DOM. Because this has potential to be a very expensive task, I'd like to benchmark the performance of this script.\nWhat's the best, free tool for bench... |
I would like to be able to obtain all the parameter values from the stack frame in .NET. A bit like how you're able to see the values in the call stack when in the Visual Studio debugger. My approach has concentrated on using the StackFrame class and then to reflect over a ParameterInfo array. I've had success with ref... | To achieve the desired output where you also display the actual values of the parameters when traversing the stack frames, you will need to make use of the `StackFrame` class along with the `MethodBase` class and some additional logic to retrieve the parameter values from the call stack.
In .NET, the parameter values ... | 5,833 | [
{
"from": "human",
"value": "I would like to be able to obtain all the parameter values from the stack frame in .NET. A bit like how you're able to see the values in the call stack when in the Visual Studio debugger. My approach has concentrated on using the StackFrame class and then to reflect over a Param... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.