instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I've got a Visual Studio 2008 solution with a WCF service, and a client.
When I run my client, and call a method from my service I get a message saying "Unable to automatically debug 'Home.Service'. The remote procedure could not be debugged. This usually indicates that debugging has not been enabled on the server."
I'... | The issue you're experiencing with debugging your WCF service in Visual Studio 2008 seems to be related to the server configuration or the debugging setup. Here are several steps and suggestions to help you resolve the problem:
### 1. Enable Debugging for the WCF Service
Ensure that the WCF service is configured corre... | 37,552 | [
{
"from": "human",
"value": "I've got a Visual Studio 2008 solution with a WCF service, and a client.\nWhen I run my client, and call a method from my service I get a message saying \"Unable to automatically debug 'Home.Service'. The remote procedure could not be debugged. This usually indicates that debugg... |
This is a question about performance testing specific to SharePoint web parts and controls (although standard ASP.NET methods would be applicable as well). I'm wondering what are some good techniques, considering factors such as:
caching (what and when should you cache?)
load balanced servers (storing state)
interacti... | Performance testing for SharePoint web parts and controls can be quite involved, given the complexity of SharePoint as a platform and the various factors that can influence performance. Here are some good techniques and considerations for performance testing specific to SharePoint, applicable to standard ASP.NET method... | 39,606 | [
{
"from": "human",
"value": "This is a question about performance testing specific to SharePoint web parts and controls (although standard ASP.NET methods would be applicable as well). I'm wondering what are some good techniques, considering factors such as:\n\ncaching (what and when should you cache?)\nloa... |
I am wondering if there is a way to change the database at runtime in grails - e.g., in most commercial/opensource CMS, they allow the database server to be hosted elsewhere, and you can specify the address in some config screen at runtime.
since grails configs the database server using DataSource.groovy, how does one... | In Grails, changing the database configuration at runtime (e.g., switching the database URL or type dynamically) is not straightforward because the DataSource is typically configured at application startup via `DataSource.groovy` or the `application.yml` configuration file. However, you can implement a custom solution ... | 38,758 | [
{
"from": "human",
"value": "I am wondering if there is a way to change the database at runtime in grails - e.g., in most commercial/opensource CMS, they allow the database server to be hosted elsewhere, and you can specify the address in some config screen at runtime. \nsince grails configs the database se... |
I have been searching for a way to allow one element of my FileHelpers mapping class to be an array of specific length.
For instance, I have a class like this:
[DelimitedRecord(",")]
public class Example
{
public string code;
public int month;
public int day;
public double h1;
public double h2;
... | In FileHelpers, while you cannot directly define an array in the mapping class, you can achieve similar functionality by using a combination of custom conversion and properties. You'll define a backing field for the array and use a property to map it to the respective fields in your delimited file.
Here's how you can ... | 35,282 | [
{
"from": "human",
"value": "I have been searching for a way to allow one element of my FileHelpers mapping class to be an array of specific length.\nFor instance, I have a class like this:\n[DelimitedRecord(\",\")]\npublic class Example\n{\n public string code;\n public int month;\n public int day... |
Is there any documentation about introducing jBoss seam to an old Hibernate/JSF project?
Have tried google, and what I found was: Start new seam project, copy&paste existing code into new project. Would be nice to know a little bit more before starting.
| Integrating JBoss Seam into an existing Hibernate/JSF project can enhance your application's capabilities by introducing features like improved state management, security, and easier integration with other frameworks. While there isn't a comprehensive step-by-step guide available, I can provide you with an outline of t... | 35,746 | [
{
"from": "human",
"value": "Is there any documentation about introducing jBoss seam to an old Hibernate/JSF project?\nHave tried google, and what I found was: Start new seam project, copy&paste existing code into new project. Would be nice to know a little bit more before starting.\n"
},
{
"from": ... |
In a current C# application I do maintenance on, we have upgraded to Visual Studio 2008 from Visual Studio 2003. We have always used the included Crystal Reports that came with Visual Studio.
Since the upgrade we have found an issue with our reports when exporting to excel. If the column in the details section is null... | The issue you are encountering with Crystal Reports when exporting to Excel, particularly regarding the left shift of columns when there are null values, is a known problem with certain versions of Crystal Reports, especially when transitioning from older versions to newer ones. Here are some potential solutions and wo... | 35,744 | [
{
"from": "human",
"value": "In a current C# application I do maintenance on, we have upgraded to Visual Studio 2008 from Visual Studio 2003. We have always used the included Crystal Reports that came with Visual Studio. \nSince the upgrade we have found an issue with our reports when exporting to excel. If... |
When working with WCF services, is it better to create a new instance of the service every time you use it? Or is it better to create one and re-use it? Why is either approach better? Is it the same for asynchronous proxies?
| When working with Windows Communication Foundation (WCF) services, the choice between creating a new instance of the service proxy each time or reusing an existing proxy depends on various factors such as the service’s configuration, the nature of the application, and the expected load. Here are the considerations for ... | 38,710 | [
{
"from": "human",
"value": "When working with WCF services, is it better to create a new instance of the service every time you use it? Or is it better to create one and re-use it? Why is either approach better? Is it the same for asynchronous proxies? \n"
},
{
"from": "gpt",
"value": "When... |
The code below crashes IE6 for some reason. Much as IE is god-awful, i have never seen this before. Does anyone have any ideas?
<div id="edit">
<?php
$a = $_POST['category'];
if ($a == "")
{
$a = $_GET['category'];
}
$result = mysql_query("SELECT * FROM media WHERE related_page_id = $a && type= 'copy'");
?>
<t... | It's not uncommon for older browsers like IE6 to crash or behave unexpectedly when they encounter certain types of code, especially if there are issues with the HTML structure or JavaScript. Here are some potential problems in your code that could be causing IE6 to crash:
1. **HTML Structure Issues**:
- You have an... | 17,660 | [
{
"from": "human",
"value": "The code below crashes IE6 for some reason. Much as IE is god-awful, i have never seen this before. Does anyone have any ideas?\n<div id=\"edit\">\n<?php \n\n$a = $_POST['category'];\nif ($a == \"\")\n{\n $a = $_GET['category'];\n}\n\n$result = mysql_query(\"SELECT * FROM med... |
I have my web browsers set to save what I type into text boxes on forms. I have a lot of search terms stored in the text box of my browser and would like to get at it via a program of some sort before I clear these values out. There are far too many for me to go through one at a time.
The web browser must store thi... | Yes, web browsers like Firefox and Internet Explorer store autocomplete data, including form inputs such as search terms, in their respective profile or configuration directories. You can extract this data using various methods depending on the browser. Here's a brief overview of how you can retrieve stored values from... | 14,636 | [
{
"from": "human",
"value": "I have my web browsers set to save what I type into text boxes on forms. I have a lot of search terms stored in the text box of my browser and would like to get at it via a program of some sort before I clear these values out. There are far too many for me to go through one at... |
i have a php file launching my exe. the exe does cout and the text is printed in html which is all fine. until i write "someline\n"; The \n breaks the output and i only see the last line. How do i print/echo text/strings that has multilines in them?
The current paste has \n commented out and my text prints fine. It loo... | It looks like you're trying to output multi-line text from your C++ executable to a PHP page, and you're encountering issues when using `\n` (newline character) in the output. The issue arises because when you use `exec()`, it captures only the last line of output when there's a newline character. Instead of `exec()`, ... | 38,145 | [
{
"from": "human",
"value": "i have a php file launching my exe. the exe does cout and the text is printed in html which is all fine. until i write \"someline\\n\"; The \\n breaks the output and i only see the last line. How do i print/echo text/strings that has multilines in them?\nThe current paste has \\... |
What do you keep on mind to avoid memory leaks when you write thousands lines of .NET code?
I'm a big fan of prevention over inspection , there is a famous example regarding this point which is using a "StringBuilder" to combine strings instead of "String1+String2", so what is else out there from your coding experienc... | When writing .NET code, especially in large applications, it’s essential to be mindful of memory management to avoid memory leaks and ensure efficient resource usage. Here are several best practices and tips based on prevention to avoid memory leaks in .NET:
### 1. **Use `using` Statement for Disposable Objects**
-... | 36,355 | [
{
"from": "human",
"value": "What do you keep on mind to avoid memory leaks when you write thousands lines of .NET code?\nI'm a big fan of prevention over inspection , there is a famous example regarding this point which is using a \"StringBuilder\" to combine strings instead of \"String1+String2\", so wha... |
Given: Constructing an ADO Connection object from one thread and giving it to another thread is forbidden. The two threads are different apartments, and even though the first thread will never touch it again (not even maintain a reference to it!), it doesn't matter.
That ADO Connection object was created by ThreadA, ... | In .NET, the concept of thread affinity and apartment models, as seen in COM, does not apply in the same way. However, there are still important considerations regarding thread safety and access to shared objects:
1. **Thread Safety**: While .NET does not have the same apartment threading model as COM, you still need ... | 40,049 | [
{
"from": "human",
"value": "Given: Constructing an ADO Connection object from one thread and giving it to another thread is forbidden. The two threads are different apartments, and even though the first thread will never touch it again (not even maintain a reference to it!), it doesn't matter. \nThat ADO ... |
What are some ideas (using .NET and SQL 2005) for implementing a service that sends emails? The emails are to be data-driven. The date and time an email is to be sent is a field in a table.
| Implementing a service that sends data-driven emails using .NET and SQL Server 2005 involves several components. Here are some ideas and steps you can follow:
### 1. Database Design
Create a table to store the email information. The schema might look something like this:
```sql
CREATE TABLE EmailQueue (
EmailID I... | 35,325 | [
{
"from": "human",
"value": "What are some ideas (using .NET and SQL 2005) for implementing a service that sends emails? The emails are to be data-driven. The date and time an email is to be sent is a field in a table.\n"
},
{
"from": "gpt",
"value": "Implementing a service that sends data-dri... |
Problem Statement:
I would like to create an offline database to lookup prices/info on the n most useful books to sell in the United States (where n is probably 3 million or so).
Question:
So, my question is (and I am open to other approaches here as well), I am trying to figure out how to use Amazon AWS to download a... | Creating a comprehensive offline database of the top-selling books in the United States using Amazon AWS is an ambitious project. Since you've already identified the challenges of accessing ISBNs and sales ranks directly through Amazon's services, here are some alternative approaches you could consider:
### 1. **Amazo... | 36,465 | [
{
"from": "human",
"value": "Problem Statement:\nI would like to create an offline database to lookup prices/info on the n most useful books to sell in the United States (where n is probably 3 million or so). \nQuestion:\nSo, my question is (and I am open to other approaches here as well), I am trying to fi... |
I have a form that has default values describing what should go into the field (replacing a label). When the user focuses a field this function is called:
function clear_input(element)
{
element.value = "";
element.onfocus = null;
}
The onfocus is set to null so that if the user puts something in the field and... | To restore the `onfocus` event back to the `clear_input` function after the user has skipped the input field and the default value has been restored, you can do so by explicitly setting the `onfocus` event back to the `clear_input` function in your `restore_default` function.
The problem you have now is that when you ... | 39,673 | [
{
"from": "human",
"value": "I have a form that has default values describing what should go into the field (replacing a label). When the user focuses a field this function is called:\nfunction clear_input(element)\n{\n element.value = \"\";\n element.onfocus = null;\n}\n\nThe onfocus is set to null s... |
We have to train the client professionals on the source code for an application we developed. What shall I include in their training plan for source code? Any help would be really appreciated.
regards
| Creating a training plan for client professionals on the source code of an application involves several key components. Here's a structured outline you can use for your training plan:
### Training Plan Outline for Source Code Familiarization
#### 1. **Introduction to Source Code**
- **Purpose and Importance**
... | 37,242 | [
{
"from": "human",
"value": "We have to train the client professionals on the source code for an application we developed. What shall I include in their training plan for source code? Any help would be really appreciated.\nregards\n"
},
{
"from": "gpt",
"value": "Creating a training plan for cli... |
I have a winforms application that doesn't have a shared set of tools that I can provide on a toolbar. But I want to have a toolbar, so I was planning on using that space to provide quick links to the most popular portions of the product. I will eventually add knowledge to the product to know which screens the curren... | Using a toolbar in a WinForms application to provide quick links to the most popular portions of the product can be a reasonable approach, particularly if it enhances usability and improves the user's workflow. Here are some design and usability considerations to keep in mind:
### Pros:
1. **Quick Access**: A toolbar ... | 39,136 | [
{
"from": "human",
"value": "I have a winforms application that doesn't have a shared set of tools that I can provide on a toolbar. But I want to have a toolbar, so I was planning on using that space to provide quick links to the most popular portions of the product. I will eventually add knowledge to the... |
We're looking to encrypt a field using DB-side encryption via NHibernate (most examples we've come across are app-side, which is not what we would like). The issue has been raised a couple of times, but no answers yet it seems.
On SQL Server 2005, for instance, and forgetting key-related issues for now, this means INS... | To achieve server-side encryption with NHibernate for a SQL Server database, you can indeed utilize a custom user type to handle the encryption and decryption of a property. The goal is to map your entity's property to a varbinary column in the database, while transparently encrypting and decrypting values.
Here's a s... | 34,908 | [
{
"from": "human",
"value": "We're looking to encrypt a field using DB-side encryption via NHibernate (most examples we've come across are app-side, which is not what we would like). The issue has been raised a couple of times, but no answers yet it seems. \nOn SQL Server 2005, for instance, and forgetting ... |
I am looking for an example of using ASP.net AJAX to show a 'live' filtering of a repeater control based on what is being typed into a textbox. I have seen stuff using the Web Client Software Factory but am more interested in something that doesn't require an additional library.
| Certainly! Below is a simple example of using ASP.NET AJAX to implement live filtering on a Repeater control based on user input in a TextBox. This example doesn't require any additional libraries and utilizes ASP.NET's built-in AJAX capabilities.
### Step 1: Create the ASP.NET Web Forms Page
First, create a new Web ... | 34,290 | [
{
"from": "human",
"value": "I am looking for an example of using ASP.net AJAX to show a 'live' filtering of a repeater control based on what is being typed into a textbox. I have seen stuff using the Web Client Software Factory but am more interested in something that doesn't require an additional library... |
I see iframe/p3p trick is the most popular one around, but I personally don't like it because javascript + hidden fields + frame really make it look like a hack job. I've also come across a master-slave approach using web service to communicate (http://www.15seconds.com/issue/971108.htm) and it seems better because it'... | The iframe/P3P trick and master-slave approaches you mentioned are commonly used methods for cross-domain communication and content sharing. Below are some other approaches, along with their pros and cons:
### 1. Cross-Origin Resource Sharing (CORS)
**Overview:**
CORS is a standard that allows servers to specify who ... | 36,561 | [
{
"from": "human",
"value": "I see iframe/p3p trick is the most popular one around, but I personally don't like it because javascript + hidden fields + frame really make it look like a hack job. I've also come across a master-slave approach using web service to communicate (http://www.15seconds.com/issue/97... |
I'm trying to work my way through Ron Jeffries's Extreme Programming Adventures in C#. I am stuck, however, in Chapter 3 because the code does not, and cannot, do what the author says it does.
Basically, the text says that I should be able to write some text in a word-wrap enabled text box. If I then move the cursor t... | It sounds like you're encountering some confusion regarding how the `TextBox` control in Windows Forms (WinForms) works, particularly in terms of handling text and the `Lines` property. Let's clarify a few things about how the `TextBox` behaves with word wrapping and the `Lines` property.
1. **Understanding `TextBox.L... | 36,569 | [
{
"from": "human",
"value": "I'm trying to work my way through Ron Jeffries's Extreme Programming Adventures in C#. I am stuck, however, in Chapter 3 because the code does not, and cannot, do what the author says it does. \nBasically, the text says that I should be able to write some text in a word-wrap ena... |
I am implementing multiple custom checkin policies for TFS and I am wondering if they all need to be in the same assembly or if I have to put each one in its own assembly.
| In Team Foundation Server (TFS), you can implement multiple custom check-in policies within the same assembly. There is no requirement that each check-in policy must be in its own separate assembly. This can actually simplify management and deployment since you can compile all your policies into a single assembly and d... | 37,731 | [
{
"from": "human",
"value": "I am implementing multiple custom checkin policies for TFS and I am wondering if they all need to be in the same assembly or if I have to put each one in its own assembly.\n"
},
{
"from": "gpt",
"value": "In Team Foundation Server (TFS), you can implement multiple cu... |
How do you get a list of files within a directory so each can be processed?
| To get a list of files within a directory in order to process each one, you can use various programming languages or command line utilities. Below are some examples using different tools and languages:
### Using Python
You can use the `os` module or the `pathlib` module to list files:
#### Using `os`
```python
impo... | 39,931 | [
{
"from": "human",
"value": "How do you get a list of files within a directory so each can be processed?\n"
},
{
"from": "gpt",
"value": "To get a list of files within a directory in order to process each one, you can use various programming languages or command line utilities. Below are some ex... |
In a SQL Server database, I record people's date of birth. Is there an straight-forward method of working out the person's age on a given date using SQL only?
Using DATEDIFF(YEAR, DateOfBirth, GETDATE()) does not work as this only looks at the year part of the date. For example DATEDIFF(YEAR, '31 December 2007', '01 J... | You're correct that using `DATEDIFF(YEAR, DateOfBirth, GETDATE())` can yield incorrect results because it only considers the difference in the year part of the date, ignoring whether the birthday has occurred yet in the current year. To accurately calculate a person's age as of a certain date in SQL Server, you can use... | 35,034 | [
{
"from": "human",
"value": "In a SQL Server database, I record people's date of birth. Is there an straight-forward method of working out the person's age on a given date using SQL only? \nUsing DATEDIFF(YEAR, DateOfBirth, GETDATE()) does not work as this only looks at the year part of the date. For exampl... |
We are connecting to a WCF web service which has Anonomous Access turned off, Windows Authentication turned on. The web.config file has a local user account for allow users and deny users="?".
I can download and generate the service proxy fine (being prompted for creds), however from my windows form project (even wh... | The error you are encountering indicates that the WCF client is trying to authenticate using an anonymous scheme, but the service requires Windows Authentication with valid credentials. Here are some steps and considerations to troubleshoot and resolve this issue:
1. **Check Service Binding Configuration**: Ensure tha... | 23,414 | [
{
"from": "human",
"value": "We are connecting to a WCF web service which has Anonomous Access turned off, Windows Authentication turned on. The web.config file has a local user account for allow users and deny users=\"?\". \nI can download and generate the service proxy fine (being prompted for creds), h... |
I would like to retrieve at runtime the values for the "dialect" and "connection.driver_class" properties specified in the configuration file.
Do you know how to do that?
Many thanks,
Nicola
| To retrieve values for specific properties like "dialect" and "connection.driver_class" from a configuration file at runtime, you'll typically use a configuration management library or framework appropriate for your application. Here, I'll outline a general approach for different contexts:
### Using Java with Hibernat... | 36,477 | [
{
"from": "human",
"value": "I would like to retrieve at runtime the values for the \"dialect\" and \"connection.driver_class\" properties specified in the configuration file.\nDo you know how to do that?\nMany thanks,\nNicola\n"
},
{
"from": "gpt",
"value": "To retrieve values for specific prop... |
When the SharePoint application you are working on has unsatisfactory response times how do you pinpoint the causes and in which sequence? So far I have not yet found any open source or commercial profiling tools specific for the SharePoint segment, so any pointer to tools or best practices will be appreciated.
PS. I a... | When dealing with unsatisfactory response times in a SharePoint application, it’s important to adopt a systematic approach to identify and resolve performance issues. Here’s a sequence of steps, tools, and best practices that can help pinpoint the causes:
### 1. **Monitor Overall Server Performance**
- **Windows Perf... | 37,648 | [
{
"from": "human",
"value": "When the SharePoint application you are working on has unsatisfactory response times how do you pinpoint the causes and in which sequence? So far I have not yet found any open source or commercial profiling tools specific for the SharePoint segment, so any pointer to tools or be... |
Please tell me how can save a string with special characters to DB.Special characters may contatin single quotes/double quotes etc.. I am using ASP.NET with C#
| When saving strings with special characters (such as single quotes, double quotes, backslashes, etc.) to a database in ASP.NET with C#, it’s important to use parameterized queries or stored procedures to prevent SQL injection attacks and properly handle special characters.
Here’s how you can do it using ADO.NET with p... | 39,778 | [
{
"from": "human",
"value": "Please tell me how can save a string with special characters to DB.Special characters may contatin single quotes/double quotes etc.. I am using ASP.NET with C#\n"
},
{
"from": "gpt",
"value": "When saving strings with special characters (such as single quotes, doubl... |
Let's say I have an interface representing a domain object:
public interface IFoo
{
Bar Bar { get; }
}
The Bar type is a family of objects, each of which has a slightly different schema. In the database, this is represented as XML (this is a mobile app, so it is simply nvarchar, not a true XML column).
I have a ge... | To subscribe to the `ColumnChanged` event for the `FooRow` in your partial class, you can use the `FooRow` constructor to attach an event handler. Although the generated `FooRow` class does not have a custom constructor that you can override directly, you can still utilize the constructor of the `DataRow` class to hook... | 39,096 | [
{
"from": "human",
"value": "Let's say I have an interface representing a domain object:\npublic interface IFoo\n{\n Bar Bar { get; }\n}\n\nThe Bar type is a family of objects, each of which has a slightly different schema. In the database, this is represented as XML (this is a mobile app, so it is simpl... |
I have some strings that I am pulling out of a database and I would like to use Template Toolkit on them, but I can't seem to figure out how to use strings as TT input. Any tips?
Thanks!
-fREW
| Using Template Toolkit (TT) to process strings is quite straightforward once you know the right methods to use. Below are the steps to render a string using Template Toolkit in Perl.
### Steps to Use Strings as Template Toolkit Input
1. **Install Template Toolkit**: First, ensure that the Template Toolkit module is i... | 37,282 | [
{
"from": "human",
"value": "I have some strings that I am pulling out of a database and I would like to use Template Toolkit on them, but I can't seem to figure out how to use strings as TT input. Any tips?\nThanks!\n-fREW\n"
},
{
"from": "gpt",
"value": "Using Template Toolkit (TT) to process... |
I'm trying to make a program in Visual C# that has my one created class, and at application launch it creates an array of my class object, and this array of my object can be used all over the program. So any function, or a control's event can access the array of objects and their member variables.
I created my class as... | To ensure that your array of objects can be accessed throughout your entire application in C#, you need to declare the array at the class level rather than within a method like `Main`. This way, the array will be accessible to all the methods and event handlers within the form or class where you declare it.
Here's a ... | 36,047 | [
{
"from": "human",
"value": "I'm trying to make a program in Visual C# that has my one created class, and at application launch it creates an array of my class object, and this array of my object can be used all over the program. So any function, or a control's event can access the array of objects and thei... |
py-macholib does not work properly on osx (using darwin ports). I have not found any other alternative.
Any ideas?
| If `py-macholib` isn't working properly for you on macOS (especially using DarwinPorts), there are a few alternatives and potential workarounds you can consider. Here are some suggestions:
1. **Update or Reinstall `py-macholib`**: Ensure you have the latest version of `py-macholib`. Sometimes, simply updating or reins... | 39,391 | [
{
"from": "human",
"value": "py-macholib does not work properly on osx (using darwin ports). I have not found any other alternative.\nAny ideas?\n"
},
{
"from": "gpt",
"value": "If `py-macholib` isn't working properly for you on macOS (especially using DarwinPorts), there are a few alternatives ... |
Simple question:
Can a swing frame be completely modal ( block all others windows ) ?
I tried the following, but I can still click on other apps windows ( like this browser )
JDialog myDialog = ....
myDialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
Plase paste some code if this is possible.
| To create a modal dialog in Java that blocks all other windows (including those of other applications), you would typically use a `JDialog` with the appropriate modality type. However, it's important to note that the Java Swing modal dialog usually blocks only other windows in the same application.
If you want to blo... | 35,791 | [
{
"from": "human",
"value": "Simple question:\nCan a swing frame be completely modal ( block all others windows ) ?\nI tried the following, but I can still click on other apps windows ( like this browser ) \nJDialog myDialog = .... \nmyDialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);\n\nPlase... |
I am trying to create a Key Listener in java however when I try
KeyListener listener = new KeyListener();
Netbeans is telling me that KeyListener is abstract;cannot be instantiated. I know that I am missing some other piece of this key listener, but since this is my first time using a key listener i am unsure of what... | The reason you're receiving an error stating that `KeyListener` is abstract and cannot be instantiated is that `KeyListener` is an interface in Java, not a concrete class. In Java, you cannot create an instance of an interface directly.
To use a `KeyListener`, you need to implement the `KeyListener` interface in a cla... | 40,251 | [
{
"from": "human",
"value": "I am trying to create a Key Listener in java however when I try \nKeyListener listener = new KeyListener();\n\nNetbeans is telling me that KeyListener is abstract;cannot be instantiated. I know that I am missing some other piece of this key listener, but since this is my first t... |
Hi if I am creating something on the stack using new I declare it like:
object *myObject = new object(contr, params);
Is there a way to declare this such as:
object *myObject;
myObject = new object(constr, params);
Is this correct?
| Yes, your second declaration is correct. You can declare a pointer to an object and then allocate memory for that object later using the `new` operator. Here's a breakdown of both methods:
1. **Inline Initialization:**
```cpp
object *myObject = new object(constr, params);
```
In this case, you declare and ... | 37,874 | [
{
"from": "human",
"value": "Hi if I am creating something on the stack using new I declare it like:\nobject *myObject = new object(contr, params);\n\nIs there a way to declare this such as:\nobject *myObject;\nmyObject = new object(constr, params);\n\nIs this correct?\n"
},
{
"from": "gpt",
"va... |
I have a class that has some properties. And I want something that calculates a Score out of these properties. Since this is a trivial task (some additions and divisions, but nothing spectacular).
So naturally, the question is: "When to use a Property with some code in the getter, and when to use a function?", and that... | Changing a property into a method in C# is generally straightforward and can be done without causing any issues in many situations. However, there are some considerations and potential pitfalls, especially when it comes to consumer assemblies, reflection, and code dependencies. Here’s a breakdown:
### Changing Propert... | 36,490 | [
{
"from": "human",
"value": "I have a class that has some properties. And I want something that calculates a Score out of these properties. Since this is a trivial task (some additions and divisions, but nothing spectacular).\nSo naturally, the question is: \"When to use a Property with some code in the get... |
I’m starting a project where I need to implement a light-weight interpreter.
The interpreter is used to execute simple scientific algorithms.
The programming language that this interpreter will use should be simple, since it is targeting non- software developers (for example, mathematicians.)
The interpreter should sup... | It sounds like you have a clear vision for your lightweight interpreter! Here are some practical resources and steps to consider as you move forward with your project:
### Resources:
1. **Books and Articles:**
- **"Programming Language Pragmatics" by Michael L. Scott**: This book offers insights into the design an... | 36,196 | [
{
"from": "human",
"value": "I’m starting a project where I need to implement a light-weight interpreter.\nThe interpreter is used to execute simple scientific algorithms.\nThe programming language that this interpreter will use should be simple, since it is targeting non- software developers (for example, ... |
I'm trying to build python 2.5.2 on Solaris 8 using gcc 3.4.2. I can't see any immediate errors in the ./configure step but, once built and i enter the python shell doing an import time errors with :
Python 2.5.2 (r252:60911, Nov 21 2008, 18:45:42)
[GCC 3.4.2] on sunos5
Type "help", "copyright", "credits" or "license"... | Building Python on Solaris, especially an older version like 2.5.2, can sometimes lead to compatibility issues. The error you're encountering indicates that Python cannot locate the built-in `time` module, which is generally compiled into the core of Python itself. Here are several steps to diagnose and fix the issue:
... | 37,293 | [
{
"from": "human",
"value": "I'm trying to build python 2.5.2 on Solaris 8 using gcc 3.4.2. I can't see any immediate errors in the ./configure step but, once built and i enter the python shell doing an import time errors with :\nPython 2.5.2 (r252:60911, Nov 21 2008, 18:45:42)\n[GCC 3.4.2] on sunos5\nType... |
I'm compiling a vc8 C++ project in a WinXp VmWare session. It's a hell of a lot slower than gcc3.2 in a RedHat VmWare session, so I'm looking at Task Manager. It's saying a very large percentage of my compile process is spent in the kernel. That doesn't sounds right to me.
Is there an equivalent of strace for Win32?... | In Windows, there isn't a direct equivalent to `strace` that you would find in Linux, but there are several tools you can use to trace system calls and get insights into the performance of your application, including the kernel functions being called. Here are a few options:
1. **Process Monitor (ProcMon)**:
- Part... | 39,141 | [
{
"from": "human",
"value": "I'm compiling a vc8 C++ project in a WinXp VmWare session. It's a hell of a lot slower than gcc3.2 in a RedHat VmWare session, so I'm looking at Task Manager. It's saying a very large percentage of my compile process is spent in the kernel. That doesn't sounds right to me.\nI... |
Forgive me for a potentially silly question here, but in other programming languages (scripting ones like PHP or Perl) it is often easy to dump everything contained within a variable.
For instance, in PHP there are the var_dump() or print_r() functions. Perl has the Data::Dumper CPAN class, etc etc.
Is there something ... | That's not a silly question at all! In Objective-C, you can achieve similar functionality to `var_dump()` in PHP or `Data::Dumper` in Perl by using the `NSLog` function, combined with some of the introspection capabilities of Objective-C.
For basic objects, you can use `NSLog` to print the description of the object:
... | 39,242 | [
{
"from": "human",
"value": "Forgive me for a potentially silly question here, but in other programming languages (scripting ones like PHP or Perl) it is often easy to dump everything contained within a variable.\nFor instance, in PHP there are the var_dump() or print_r() functions. Perl has the Data::Dumpe... |
I'm trying to understand the differences between Assembly.Load and Assembly.ReflectionOnlyLoad.
In the code below I am attempting to find all of the objects in a given assembly that inherit from a given interface:
var myTypes = new List<Type>();
var assembly = Assembly.Load("MyProject.Components");
foreach (var type ... | The issue you're encountering relates to the way `Assembly.ReflectionOnlyLoad()` operates compared to `Assembly.Load()`. While both methods allow you to examine the metadata of an assembly, there are key differences that affect how types are loaded and what you can do with them.
### Differences Between `Assembly.Load`... | 38,341 | [
{
"from": "human",
"value": "I'm trying to understand the differences between Assembly.Load and Assembly.ReflectionOnlyLoad.\nIn the code below I am attempting to find all of the objects in a given assembly that inherit from a given interface:\nvar myTypes = new List<Type>();\n\nvar assembly = Assembly.Load... |
Can anyone tell me what is the difference between XSDObjectGen.exe & XSD.exe?
Is there any way to make XSDObjectGen.exe work in dot net 2.0?
| `XSD.exe` and `XSDObjectGen.exe` are both tools provided by Microsoft for working with XML Schema Definition (XSD) files, but they serve slightly different purposes and are associated with different environments.
### XSD.exe
- **Purpose**: This tool is used to generate XML serialization classes from XSD files. It crea... | 39,288 | [
{
"from": "human",
"value": "Can anyone tell me what is the difference between XSDObjectGen.exe & XSD.exe?\nIs there any way to make XSDObjectGen.exe work in dot net 2.0?\n"
},
{
"from": "gpt",
"value": "`XSD.exe` and `XSDObjectGen.exe` are both tools provided by Microsoft for working with XML S... |
I'm a big fan of simpletest because it's what I know. It has excellent support for mocking and web-testing.
But I'm always scared of stagnating so any compelling arguments to switch would be appreciated.
| It's great that you're a fan of SimpleTest and that it serves your needs well, but exploring other testing frameworks can indeed help you grow and keep your skills up to date. Here are some compelling arguments for considering a switch to other testing frameworks:
1. **Modern Features**: Many newer testing frameworks,... | 35,437 | [
{
"from": "human",
"value": "I'm a big fan of simpletest because it's what I know. It has excellent support for mocking and web-testing. \nBut I'm always scared of stagnating so any compelling arguments to switch would be appreciated.\n"
},
{
"from": "gpt",
"value": "It's great that you're a fan... |
I am using the standard .Net 2.0 DataGridView with sort mode of automatic on the column. It is very very slow (which should probably be another question on how to speed it up) but I can't seem to find an event or combination of events that will maintain a WaitCursor while this sort operation is being performed.
Ideas?... | To maintain a `WaitCursor` while a sorting operation is performed on a `DataGridView` in .NET 2.0, you will typically need to handle the cursor changes manually since the default sorting behavior is handled internally by the `DataGridView`.
Here’s how you can achieve this:
1. **Use the `Sorting` event**: This event i... | 38,212 | [
{
"from": "human",
"value": "I am using the standard .Net 2.0 DataGridView with sort mode of automatic on the column. It is very very slow (which should probably be another question on how to speed it up) but I can't seem to find an event or combination of events that will maintain a WaitCursor while this ... |
How do I get a BlockClosure in Squeak (I want to use BlockClosure>>callCC)?
When I write [#foo] that is a BlockContext, what's the deal?
Update: I have worked out that BlockClosure is a thing mainly of new compiler.
Instead how do I work with seaside Continuations? I'm having problems, and any examples would be appreci... | In Squeak Smalltalk, the `BlockClosure` class represents blocks of code that can be executed later, while `BlockContext` represents the execution context of a block when it is invoked. To work with continuations and achieve the behavior you want, you can use `callCC` (call with current continuation) from the `BlockClos... | 32,864 | [
{
"from": "human",
"value": "How do I get a BlockClosure in Squeak (I want to use BlockClosure>>callCC)?\nWhen I write [#foo] that is a BlockContext, what's the deal?\nUpdate: I have worked out that BlockClosure is a thing mainly of new compiler.\nInstead how do I work with seaside Continuations? I'm having... |
The [x] button in the top bar of a window that normally closes the window in standard Windows, appears to do a minimise instead on Windows Compact.
How do it make it close instead? I need to also be able to raise an event when this happens as I want to preform some logic on window close.
| To change the behavior of the close button in a Windows Compact application, you can handle the `WM_CLOSE` message to ensure that the window is properly closed when the close button is clicked. This may involve overriding the default behavior that minimizes the window.
Here's a general approach to achieve this:
1. **... | 37,602 | [
{
"from": "human",
"value": "The [x] button in the top bar of a window that normally closes the window in standard Windows, appears to do a minimise instead on Windows Compact.\nHow do it make it close instead? I need to also be able to raise an event when this happens as I want to preform some logic on win... |
How to convert HTML page to image format in a web application?
| Converting an HTML page to an image format (like PNG or JPEG) in a web application can be achieved using several methods. Here are a few common approaches:
### 1. Using Client-Side Libraries
#### a. HTML2Canvas
`html2canvas` is a popular library that allows you to take "screenshots" of web pages or specific elements.... | 34,480 | [
{
"from": "human",
"value": "How to convert HTML page to image format in a web application?\n"
},
{
"from": "gpt",
"value": "Converting an HTML page to an image format (like PNG or JPEG) in a web application can be achieved using several methods. Here are a few common approaches:\n\n### 1. Using... |
In Ruby on Rails, how to add foreign key constraint in migration?
| In Ruby on Rails, you can add a foreign key constraint in a migration using the `add_foreign_key` method. This can be done in a couple of different ways depending on whether you are creating a new table or modifying an existing one.
### Adding a Foreign Key in a New Table
When you create a new table, you can add a fo... | 38,354 | [
{
"from": "human",
"value": "In Ruby on Rails, how to add foreign key constraint in migration?\n"
},
{
"from": "gpt",
"value": "In Ruby on Rails, you can add a foreign key constraint in a migration using the `add_foreign_key` method. This can be done in a couple of different ways depending on wh... |
I've got Postscript code/data (?) in memory (in a Java Tomcat webapp) that I'd like to send directly to a networked PS printer. Is there an easy way (i.e. just popping open a port and sending the text) to print this, bypassing all of the O/S-specific drivers and stuff (and hopefully not even requiring extra jars)? A ... | Yes, you can send raw PostScript data directly to a networked PostScript printer using Java. This can be done using standard Java sockets to connect to the printer's IP address and port. Most networked printers accept PostScript data over TCP/IP, typically on port 9100.
Here’s a simple example demonstrating how to do ... | 37,551 | [
{
"from": "human",
"value": "I've got Postscript code/data (?) in memory (in a Java Tomcat webapp) that I'd like to send directly to a networked PS printer. Is there an easy way (i.e. just popping open a port and sending the text) to print this, bypassing all of the O/S-specific drivers and stuff (and hope... |
As a test engineer, I often engage in exploratory testing. When I encounter a bug, it is not always immediately clear which steps led to the problem. So, obviously, I have to find the required steps to reproduce the problem. Depending on the situation, this can take a large amount of time.
What would be really helpful ... | Exploratory testing can indeed make bug reproduction challenging, but there are several tools and approaches you can consider that might help you log mouse and keyboard actions effectively. Here are a few options:
1. **Selenium IDE**: Although primarily designed for automated testing, Selenium IDE can be useful for lo... | 20,129 | [
{
"from": "human",
"value": "As a test engineer, I often engage in exploratory testing. When I encounter a bug, it is not always immediately clear which steps led to the problem. So, obviously, I have to find the required steps to reproduce the problem. Depending on the situation, this can take a large amou... |
I'm new to dependency injection, I'm wondering how you would handle the following scenario. We have something like the following:
public class DatabaseContext
{
public string ConnectionString {get;}
}
public interface IDataAccess
{
string GetString(int id);
}
public class DataAccessImpl : IDataAccess
{
private... | In scenarios where you have dependencies that can change, like the `DatabaseContext` in your example, you can utilize a strategy that involves using a factory or a scoped lifetime management approach in your Dependency Injection (DI) container. Here’s how you can manage your changing dependency while using a DI framewo... | 32,588 | [
{
"from": "human",
"value": "I'm new to dependency injection, I'm wondering how you would handle the following scenario. We have something like the following:\npublic class DatabaseContext\n{\n public string ConnectionString {get;}\n}\n\npublic interface IDataAccess\n{\n string GetString(int id);\n}\n\np... |
I have a report reading records out of a DMS system and I thought it would be nice to have a link to the documents that it is listing so that the users could view the actual documents.
However when it displays a Word doc it allows you to make changes and then save them, which rather undermines the DMS system.
I don't... | To link to documents in a Document Management System (DMS) while preventing users from making changes to Word documents, you can consider the following approaches:
### 1. Open Documents in Read-Only Mode
You can modify the link to open Word documents in read-only mode. This can be done by adding the `?open` parameter ... | 36,956 | [
{
"from": "human",
"value": "I have a report reading records out of a DMS system and I thought it would be nice to have a link to the documents that it is listing so that the users could view the actual documents. \nHowever when it displays a Word doc it allows you to make changes and then save them, which ... |
How can I make it work in a network? It works then it stops working without reason (maybe because the network isn't perfect).
| When an application or system works intermittently over a network, it can be quite frustrating. Here are some steps you can take to troubleshoot and improve the reliability of your setup:
### 1. **Check Network Stability:**
- **Ping Test:** Run a ping test to check for packet loss or high latency to your server or ... | 39,362 | [
{
"from": "human",
"value": "How can I make it work in a network? It works then it stops working without reason (maybe because the network isn't perfect).\n"
},
{
"from": "gpt",
"value": "When an application or system works intermittently over a network, it can be quite frustrating. Here are som... |
Note that this function does not have a "{" and "}" body. Just a try/catch block:
void func( void )
try
{
...
}
catch(...)
{
...
}
Is this intentionally part of C++, or is this a g++ extension?
Is there any purpose to this other than bypass 1 level of {}?
I'd never heard of this until I ran into http://stupef... | The syntax you've encountered is actually a feature of C++ and is not specific to any particular compiler like g++. It's referred to as a "function-level exception handling" mechanism. This syntax allows you to have a `try` block that encompasses the entire function body without the use of the traditional curly braces ... | 40,056 | [
{
"from": "human",
"value": "Note that this function does not have a \"{\" and \"}\" body. Just a try/catch block:\nvoid func( void )\ntry\n{\n ...\n}\ncatch(...)\n{\n ...\n}\n\nIs this intentionally part of C++, or is this a g++ extension?\nIs there any purpose to this other than bypass 1 level of {... |
We're evaluating db4o (an OO-DBMS from http://www.db4o.com). We've put together a performance test for client/server mode, where we spin up a server, then hammer it with several clients at once. It seems like the server can only process one client's query at a time.
Have we missed a configuration switch somewhere tha... | Your issue with db4o performance in client/server mode appears to stem from a combination of how db4o handles concurrency and the specific configurations you're using. Here are several suggestions to help you troubleshoot and potentially improve performance:
1. **Single Threaded Client Mode**: Ensure that you are not ... | 37,539 | [
{
"from": "human",
"value": "We're evaluating db4o (an OO-DBMS from http://www.db4o.com). We've put together a performance test for client/server mode, where we spin up a server, then hammer it with several clients at once. It seems like the server can only process one client's query at a time.\nHave we m... |
In a Web application, is it possible to force a PDF file to be printed on the client? If the browser is configured to open the PDF inside the window, I guess that calling window.print() will work, but some browsers (like mine) are configured to open the PDF externally.
| In a web application, it is generally challenging to control the printing behavior of PDF files due to browser security restrictions and user settings. Here are some considerations regarding printing a PDF from a web application:
1. **Embedded PDF Viewer**: If the PDF is opened in the browser window (i.e., using an em... | 35,994 | [
{
"from": "human",
"value": "In a Web application, is it possible to force a PDF file to be printed on the client? If the browser is configured to open the PDF inside the window, I guess that calling window.print() will work, but some browsers (like mine) are configured to open the PDF externally.\n"
},
... |
Related to this question, I decided to check the UDFs in my data warehouse (which should largely have been deterministic), and I found several which aren't which should be.
For instance:
CREATE FUNCTION [udf_YearFromDataDtID]
(
@DATA_DT_ID int
)
RETURNS int
AS
BEGIN
RETURN @DATA_DT_ID / 10000
END
Shows up in t... | The `IS_DETERMINISTIC` property of a User Defined Function (UDF) in SQL Server indicates whether the function always produces the same output for the same set of input values, regardless of any external factors (like time, session state, etc.). A function is considered deterministic if it always returns the same result... | 36,046 | [
{
"from": "human",
"value": "Related to this question, I decided to check the UDFs in my data warehouse (which should largely have been deterministic), and I found several which aren't which should be.\nFor instance:\nCREATE FUNCTION [udf_YearFromDataDtID]\n(\n @DATA_DT_ID int\n)\nRETURNS int\nAS\nBEGIN\... |
First off, how do I know if my html file is running on localhost in Xampp?
Is there a tutorial on how to manage files/directories and get that all working under htdocs?
Is there a good tutorial on how to setup includes?
I want to use "includes" in Xampp with my html.
Can I use both html includes AND php includes?
Do I ... | Setting up and managing an HTML/PHP project using XAMPP can be a bit complex, especially if you're planning to use includes and organize a large number of files and directories. Let’s address your questions one by one:
### 1. How to know if your HTML file is running on localhost in XAMPP
To check if your HTML file is... | 35,652 | [
{
"from": "human",
"value": "First off, how do I know if my html file is running on localhost in Xampp?\nIs there a tutorial on how to manage files/directories and get that all working under htdocs?\nIs there a good tutorial on how to setup includes?\nI want to use \"includes\" in Xampp with my html.\nCan I... |
How do you do low low level sockets in C, example: actually sending a SYN.
| To implement low-level socket programming in C, specifically for sending TCP SYN packets directly, you need to work with raw sockets. Raw sockets allow you to construct and send your own packets, bypassing the normal TCP/IP stack. This typically requires root or elevated permissions since you’re manipulating network pa... | 22,593 | [
{
"from": "human",
"value": "How do you do low low level sockets in C, example: actually sending a SYN.\n"
},
{
"from": "gpt",
"value": "To implement low-level socket programming in C, specifically for sending TCP SYN packets directly, you need to work with raw sockets. Raw sockets allow you to ... |
In our organization, we have the following problem. We want to have our web tree revision-controlled, but many of us want to be able to alter (and check in) any file of that tree. We would also like there to be only a single check-out for all this because the tree is rather huge. For parts of that tree, we are currentl... | Using Subversion (SVN) for your needs is indeed possible, although it requires a bit of configuration to achieve the desired workflow. Here's a way to set up a single-checkout repository where multiple users can modify files while still maintaining version control.
### Steps to Set Up Subversion for Your Web Tree
1. ... | 37,983 | [
{
"from": "human",
"value": "In our organization, we have the following problem. We want to have our web tree revision-controlled, but many of us want to be able to alter (and check in) any file of that tree. We would also like there to be only a single check-out for all this because the tree is rather huge... |
I have used something like the following to compose policies for my application:
The policy classes look like this:
struct Policy {
static void init();
static void cleanup();
//...
};
template <class CarT, class CdrT>
struct Cons {
static void init() {
CarT::init();
CdrT::init();
}
static void clea... | You're on the right track by looking to utilize `Boost.MPL` for constructing your policy combiners. Since you want to create a type list of policies and manage their initialization and cleanup, you can leverage the power of `Boost.MPL` to achieve this with variadic templates in a way that avoids the need to manually de... | 36,870 | [
{
"from": "human",
"value": "I have used something like the following to compose policies for my application:\nThe policy classes look like this:\nstruct Policy {\n static void init();\n static void cleanup();\n //...\n};\n\ntemplate <class CarT, class CdrT>\nstruct Cons {\n static void init() {\n Ca... |
I want to access a MySQL database directly from JavaScript code in an HTML page in Firefox.
Does such a library exist?
To be very clear, CGI+Ajax will not work
Some background: I want to create something like a GUI front end for a MySQL database (that's not what it is, but it's close enough). I'm thinking about doing t... | Accessing a MySQL database directly from JavaScript in a local HTML page without a server environment (like CGI or Ajax) is fundamentally challenging and generally not recommended. Here are a few key points to consider:
1. **Security Concerns**: Direct database connections from the client-side can expose your database... | 39,045 | [
{
"from": "human",
"value": "I want to access a MySQL database directly from JavaScript code in an HTML page in Firefox.\nDoes such a library exist?\nTo be very clear, CGI+Ajax will not work\nSome background: I want to create something like a GUI front end for a MySQL database (that's not what it is, but it... |
Is there any way to direct C# to ignore NullReferenceException (or any specific exception for that matter) for a set of statements.
This is useful when trying to read properties from a deserialized object that may contain many null objects in it.
Having a helper method to check for null could be one way but I'm lookin... | In C#, there is no direct equivalent to VB.NET's `On Error Resume Next` statement. However, you can achieve similar functionality through various methods. Here's a summary of some of the common approaches you could take to handle `NullReferenceException` without having to perform explicit null checks for each object in... | 38,674 | [
{
"from": "human",
"value": "Is there any way to direct C# to ignore NullReferenceException (or any specific exception for that matter) for a set of statements. \nThis is useful when trying to read properties from a deserialized object that may contain many null objects in it.\nHaving a helper method to che... |
I have a simple app that uses an SQL Express 2005 database. When the user closes the app, I want to give the option to back up the database by making a copy in another directory. However, when I try to do it, I get "The process cannot access the file '...\Pricing.MDF' because it is being used by another process." I ... | To effectively release the database file so that it can be copied, you'll need to ensure that no connections are left open and that the SQL Server instance releases the files properly. Here are steps to help you with that, including better practices for backing up the database:
### Steps to Properly Release the Databa... | 37,778 | [
{
"from": "human",
"value": "I have a simple app that uses an SQL Express 2005 database. When the user closes the app, I want to give the option to back up the database by making a copy in another directory. However, when I try to do it, I get \"The process cannot access the file '...\\Pricing.MDF' becaus... |
I am using python 2.6 on XP. I have just installed py2exe, and I can successfully create a simple hello.exe from a hello.py. However, when I try using py2exe on my real program, py2exe produces a few information messages but fails to generate anything in the dist folder.
My setup.py looks like this:
from distutils.co... | When using `py2exe`, if you do not see any errors during the build process but the `dist` folder remains empty, there may be a few potential reasons for this. Here are some troubleshooting steps and suggestions to help you resolve the issue:
1. **Check Python Environment**: Make sure that you are using the correct Pyt... | 38,110 | [
{
"from": "human",
"value": "I am using python 2.6 on XP. I have just installed py2exe, and I can successfully create a simple hello.exe from a hello.py. However, when I try using py2exe on my real program, py2exe produces a few information messages but fails to generate anything in the dist folder. \nMy s... |
I need a way to detect mouse/keyboard activity on Linux. Something similar to what any IM program would do. If no activity is detected for, say 5 minutes, it will set your IM status to "I'm not here right now".
Any help towards this is appreciated.
Thanks.
| Detecting mouse and keyboard activity on a Linux system can be accomplished by using various libraries and tools available in the Linux environment. Below are a couple of approaches to achieve this, one using Python and the other using C.
### Approach 1: Using Python with `python-xlib`
You can use the `python-xlib` l... | 35,772 | [
{
"from": "human",
"value": "I need a way to detect mouse/keyboard activity on Linux. Something similar to what any IM program would do. If no activity is detected for, say 5 minutes, it will set your IM status to \"I'm not here right now\".\nAny help towards this is appreciated.\nThanks.\n"
},
{
"f... |
Is it possible (and if yes, how) to bypass DNS when doing a HTTP request ?
I want to hit directly a front-end with an HTTP request, without getting through NLB but with the correct host header.
As I have the IP of my server, I just need to bypass the DNS.
I tried to use WebRequest, replacing the URL with the IP and se... | Yes, it is possible to bypass DNS when making an HTTP request by directly using the server's IP address. You can manually set the `Host` header to ensure that the request is routed correctly to the desired backend server, even if you're connecting directly to its IP address. However, the method of doing this depends on... | 37,918 | [
{
"from": "human",
"value": "Is it possible (and if yes, how) to bypass DNS when doing a HTTP request ?\nI want to hit directly a front-end with an HTTP request, without getting through NLB but with the correct host header. \nAs I have the IP of my server, I just need to bypass the DNS.\nI tried to use WebR... |
In our MOSS '07 site we have a page that contains just a Page Viewer web part in it that points to a site on another server. However, I've noticed that on that page (and any others that have a Page Viewer web part on it) our drop down menus and hover effects are super slow and completely max out the CPU on the visitor... | This issue you're experiencing with the Page Viewer web part in SharePoint 2007 appears to be related to how the IFRAME renders external content and its impact on the overall performance of the page, particularly the dropdown menus. This can be a common problem when embedding content from external sources, as iframes c... | 37,059 | [
{
"from": "human",
"value": "In our MOSS '07 site we have a page that contains just a Page Viewer web part in it that points to a site on another server. However, I've noticed that on that page (and any others that have a Page Viewer web part on it) our drop down menus and hover effects are super slow and ... |
Take the following function:
DataTable go() {
return someTableAdapter.getSomeData();
}
When I set a breakpoint in this function, is there a possibility to inspect the returned value? go() is directly coupled to a datagrid in an .aspx page.
The only way to inspect the returned datatable is to use a temporary variab... | When debugging in an environment like Visual Studio, you're correct that if you set a breakpoint inside the `go()` function, you can inspect the return value only after assigning it to a temporary variable. However, there are a few methods you can use to inspect the returned `DataTable` without creating a temporary var... | 32,877 | [
{
"from": "human",
"value": "Take the following function:\nDataTable go() {\n return someTableAdapter.getSomeData();\n}\n\nWhen I set a breakpoint in this function, is there a possibility to inspect the returned value? go() is directly coupled to a datagrid in an .aspx page.\nThe only way to inspect the ... |
In SQL Server, I can do something like this:
UPDATE tbl1
SET col2 = tbl2.col2
FROM table1 tbl1
INNER JOIN table2 tbl2
ON tbl1.col1 = tbl2.col1
I haven't bothered to look whether this is part of any SQL standard or not, and I'm sure there are other ways to do it, but it is astoundingly useful.
Here's my p... | In SQLite, you can achieve similar functionality to the SQL Server `UPDATE ... FROM` syntax by using a correlated subquery. While SQLite does not support the `FROM` clause in the `UPDATE` statement, you can update a table by referencing another table through a subquery.
Here’s how you can perform the same operation in... | 41,291 | [
{
"from": "human",
"value": "In SQL Server, I can do something like this:\nUPDATE tbl1 \n SET col2 = tbl2.col2 \n FROM table1 tbl1 \n INNER JOIN table2 tbl2 \n ON tbl1.col1 = tbl2.col1\n\nI haven't bothered to look whether this is part of any SQL standard or not, and I'm sure there are other ways to d... |
Are all the additions to C# for version 4 (dynamic, code contracts etc) expected to run on the current .NET CLR, or is there a planned .NET upgrade as well?
| C# 4.0 introduced several features, including dynamic typing (with the `dynamic` keyword) and Code Contracts, but all of these features are designed to run on the existing .NET CLR at the time of their release. There was no separate CLR upgrade specifically required for C# 4.0 features.
C# 4.0 was part of the .NET Fra... | 40,473 | [
{
"from": "human",
"value": "Are all the additions to C# for version 4 (dynamic, code contracts etc) expected to run on the current .NET CLR, or is there a planned .NET upgrade as well?\n"
},
{
"from": "gpt",
"value": "C# 4.0 introduced several features, including dynamic typing (with the `dynam... |
I have a windows application project that has to be signed. I received the .spc and .pfx files from my client. I converted these files to .pfx and by right clicking an assembly - Properties - Signing I specified the .pfx file. Everything OK with no errors. The problem is that after compiling the assembly is not signed ... | It seems you have followed the right steps to sign your assembly, but there are a few things that you might want to check to ensure that your assembly is signed correctly. Here are some troubleshooting steps and considerations:
1. **Ensure Signing is Enabled**:
Make sure that you have checked the box for "Sign the... | 39,046 | [
{
"from": "human",
"value": "I have a windows application project that has to be signed. I received the .spc and .pfx files from my client. I converted these files to .pfx and by right clicking an assembly - Properties - Signing I specified the .pfx file. Everything OK with no errors. The problem is that af... |
How do I detect when an iOS app is launched for the first time?
| To detect when an iOS app is launched for the first time, you can use UserDefaults to store a flag indicating whether the app has been launched before. Here's a simple approach to achieve this:
1. **Check UserDefaults for a Key**: When the app launches, check if a specific key exists in UserDefaults that indicates whe... | 35,679 | [
{
"from": "human",
"value": "How do I detect when an iOS app is launched for the first time?\n"
},
{
"from": "gpt",
"value": "To detect when an iOS app is launched for the first time, you can use UserDefaults to store a flag indicating whether the app has been launched before. Here's a simple ap... |
I need to store a double as a string. I know I can use printf if I wanted to display it, but I just want to store it in a string variable so that I can store it in a map later (as the value, not the key).
| To store a `double` as a `string` in C++, you can use the `std::to_string` function. This function converts numerical values to their string representation. Here is an example of how you can store a `double` as a `string` and then use it as a value in a `std::map`.
Here's a simple example:
```cpp
#include <iostream>
... | 39,193 | [
{
"from": "human",
"value": "I need to store a double as a string. I know I can use printf if I wanted to display it, but I just want to store it in a string variable so that I can store it in a map later (as the value, not the key).\n"
},
{
"from": "gpt",
"value": "To store a `double` as a `s... |
The MFC application that i created is dialog based. Just one dialog thats all. How do I get the window handle to this window, while the application is performing the InitDialog. I need to find out its dimension as well. GetForegroundWindow not necessarily gives you the handle to this window that is loading up
| In an MFC (Microsoft Foundation Class) dialog-based application, you can get the window handle of the dialog during the `OnInitDialog` method. The `CDialog` class provides a member function called `GetSafeHwnd()` that returns the window handle (HWND) of the dialog, which you can call once the dialog has been initialize... | 32,946 | [
{
"from": "human",
"value": "The MFC application that i created is dialog based. Just one dialog thats all. How do I get the window handle to this window, while the application is performing the InitDialog. I need to find out its dimension as well. GetForegroundWindow not necessarily gives you the handle to... |
So I wrote buggy code that occasionally crash ... and creates a stackdump file.
Using addr2line I can figure out how the program got to the crash point by decoding the addresses from the stackdump one by one. Is there an alternative tool that can ease the debug using stack dumps?
Is there a way to to load this informat... | Yes, there are tools and methods that can help you analyze stack dumps more efficiently than manually using `addr2line` for each address.
### Tools for Analyzing Stack Dumps
1. **GDB (GNU Debugger)**:
- GDB itself can read stack dumps and provide meaningful information. You can load the core dump (if that's what y... | 38,133 | [
{
"from": "human",
"value": "So I wrote buggy code that occasionally crash ... and creates a stackdump file.\nUsing addr2line I can figure out how the program got to the crash point by decoding the addresses from the stackdump one by one. Is there an alternative tool that can ease the debug using stack dump... |
I need to get the data of an particular <td>, but I don't have any id or name for that particular <td>. How do you get the contents of that <td>?
For example:
<table>
<tr><td>name</td><td>praveen</td></tr>
<tr><td>designation</td><td>software engineer</td></tr>
</table>
Is it possible to get the value "designation... | Yes, you can extract the value "software engineer" based on the content of the first `<td>` in your HTML table using JavaScript. You can achieve this by looping through the rows of the table and checking for the specific value you're looking for. Here’s an example of how you can do this:
```html
<!DOCTYPE html>
<html ... | 30,514 | [
{
"from": "human",
"value": "I need to get the data of an particular <td>, but I don't have any id or name for that particular <td>. How do you get the contents of that <td>?\nFor example:\n<table>\n <tr><td>name</td><td>praveen</td></tr>\n <tr><td>designation</td><td>software engineer</td></tr>\n</table>... |
There's one thing I haven't found in RFC 2616 ("Hypertext Transfer Protocol -- HTTP/1.1") and that's a "canonical" name for a request/response pair. Is there such thing?
4.1 Message Types:
4.1 Message Types
HTTP messages consist of requests from client to server and responses
from server to client.
HTTP... | The term you're looking for is often referred to as a "request-response cycle." This term is widely used in HTTP documentation and discussions to describe the complete interaction where a client sends a request and then receives a corresponding response from the server.
So, your sentence would read:
"A single complet... | 42,509 | [
{
"from": "human",
"value": "There's one thing I haven't found in RFC 2616 (\"Hypertext Transfer Protocol -- HTTP/1.1\") and that's a \"canonical\" name for a request/response pair. Is there such thing?\n4.1 Message Types:\n\n4.1 Message Types\n\n HTTP messages consist of requests from client to server an... |
I have a KMainWindow:
//file.h
class MainWindow: public KMainWindow {
public:
MainWindow(QWidget *parent = 0);
...
...
...
private slots:
void removeClick();
//file.cpp
MainWindow::MainWindow(QWidget *parent) :
KMainWindow(parent) {}
void MainWindow::removeClick()
{
std::cout << "Remove" << std::end... | The error message you are encountering, `Object::connect: No such slot KMainWindow::removeClick()`, suggests that there might be an issue with how you're connecting the signal to the `removeClick()` slot. Here are a few things you can check to resolve this issue:
1. **Check Signal-Slot Connection**: Ensure that you ar... | 38,994 | [
{
"from": "human",
"value": "I have a KMainWindow:\n//file.h\nclass MainWindow: public KMainWindow {\npublic:\n MainWindow(QWidget *parent = 0);\n...\n...\n...\n\nprivate slots:\n void removeClick();\n\n//file.cpp\nMainWindow::MainWindow(QWidget *parent) :\nKMainWindow(parent) {}\n\nvoid MainWindow::r... |
Is there any way of doing parallel assignment in C++? Currently, the below compiles (with warnings)
#include <iostream>
int main() {
int a = 4;
int b = 5;
a, b = b, a;
std::cout << "a: " << a << endl
<< "b: " << b << endl;
return 0;
}
and prints:
a: 4
b: 5
What I'd like it to print ... if it... | In C++, there is no built-in way to perform parallel assignment (also known as tuple unpacking) like you can in languages such as Python or Ruby. The expression you wrote does not do what you expect due to the precedence of the operators and the way assignment works in C++. The expression `a, b = b, a` does not simulta... | 33,691 | [
{
"from": "human",
"value": "Is there any way of doing parallel assignment in C++? Currently, the below compiles (with warnings)\n#include <iostream> \n\nint main() { \n int a = 4;\n int b = 5;\n a, b = b, a;\n std::cout << \"a: \" << a << endl\n << \"b: \" << b << endl;\n\n return 0;\n}\n\n... |
Using the .net framework you have the option to create temporary files with
Path.GetTempFileName();
The MSDN doesn't tell us what happens to temporary files. I remember reading somewhere that they are deleted by the OS when it gets a restart. Is this true?
If the files aren't deleted by the OS, why are they called te... | Temporary files in the context of the .NET Framework and operating systems have specific characteristics, but there isn't a strict rule governing their lifecycle. Here’s a breakdown of how temporary files are typically handled:
1. **Creation of Temporary Files**: In .NET, you can create a temporary file using `Path.Ge... | 38,924 | [
{
"from": "human",
"value": "Using the .net framework you have the option to create temporary files with\nPath.GetTempFileName(); \n\nThe MSDN doesn't tell us what happens to temporary files. I remember reading somewhere that they are deleted by the OS when it gets a restart. Is this true?\nIf the files are... |
I am using RRDtool for storing data for displaying graphs. I update the RRD by RRDs::update and this fails when trying to rewrite the information, means update data for a time in the past (e.g. someone moved the system timer back). The error I get is:
ERROR: Cannot update /opt/dashboard/rrd/Disk/192.168.120.168_disk_... | The error you're encountering with RRDtool occurs because by default, RRDtool does not allow updates with timestamps that are less than the last recorded update timestamp. This is a safety feature to prevent old data from overwriting newer data, which could lead to data inconsistencies.
If you want to allow updates wi... | 40,062 | [
{
"from": "human",
"value": "I am using RRDtool for storing data for displaying graphs. I update the RRD by RRDs::update and this fails when trying to rewrite the information, means update data for a time in the past (e.g. someone moved the system timer back). The error I get is: \nERROR: Cannot update /op... |
Now that I've finnaly moved to doing some development/support work for Windows 2008 I find myself annoyed by the lack of one feature I just can't enable: the desktop shortcut to "My Computer" I've grown used to. I know how to enable this on XP and 2003, but I just can't find the setting on 2008.
How can a user configu... | In Windows Server 2008, you can enable desktop icons such as "My Computer," "My Documents," and "Recycle Bin" through the following steps:
1. **Right-click on the Desktop**: Find an empty area on your desktop, right-click, and select **Personalize** from the context menu.
2. **Change Desktop Icons**: In the Personali... | 40,334 | [
{
"from": "human",
"value": "Now that I've finnaly moved to doing some development/support work for Windows 2008 I find myself annoyed by the lack of one feature I just can't enable: the desktop shortcut to \"My Computer\" I've grown used to. I know how to enable this on XP and 2003, but I just can't find ... |
For example so that it works like this
toString (Var x)= "x"
| It seems like you're describing a function that takes an expression (in this case, a variable) and returns its string representation. This is common in programming languages, particularly in the context of defining custom types or data structures.
If we are using a language like Haskell, we can define a data type and ... | 41,166 | [
{
"from": "human",
"value": "For example so that it works like this\ntoString (Var x)= \"x\"\n"
},
{
"from": "gpt",
"value": "It seems like you're describing a function that takes an expression (in this case, a variable) and returns its string representation. This is common in programming langua... |
I am using the webbrowser control in visual studio. I think it is a wrapper around internet explorer. Anyway all is going well I am using it in edit mode however I can't get he document's keydown event to fire (in order to catch ctrl+v) anyone had similar problems with it?
Anyone have a solution?
| Yes, you're correct that the `WebBrowser` control in Windows Forms is a wrapper around Internet Explorer, and certain events can behave differently compared to modern web browsers. Capturing keyboard events such as `keydown` or specifically checking for `Ctrl + V` in the `WebBrowser` control can be tricky due to the wa... | 38,157 | [
{
"from": "human",
"value": "I am using the webbrowser control in visual studio. I think it is a wrapper around internet explorer. Anyway all is going well I am using it in edit mode however I can't get he document's keydown event to fire (in order to catch ctrl+v) anyone had similar problems with it?\nAnyo... |
C#: Is there a shortcut to detect if mouse is still hovering on top of Label on MouseHover event?
Just curious if there's a bool to check, if not to get mathematical then :(.
| In C#, the `MouseHover` event is triggered when the mouse pointer is over a control (like a `Label`) for a specified period of time. However, once the `MouseHover` event is fired, there isn't a built-in property or boolean that directly indicates whether the mouse is still hovering over the `Label`.
To determine wheth... | 37,841 | [
{
"from": "human",
"value": "C#: Is there a shortcut to detect if mouse is still hovering on top of Label on MouseHover event?\nJust curious if there's a bool to check, if not to get mathematical then :(.\n"
},
{
"from": "gpt",
"value": "In C#, the `MouseHover` event is triggered when the mouse ... |
Do you have any ideas how to call DoEvents from a C# DLL
| In C#, the `DoEvents` function is not directly available as it is in Visual Basic. However, you can achieve similar functionality by using the `Application.DoEvents()` method available in Windows Forms applications. This method processes all Windows messages currently in the message queue, allowing your application to ... | 40,134 | [
{
"from": "human",
"value": "Do you have any ideas how to call DoEvents from a C# DLL\n"
},
{
"from": "gpt",
"value": "In C#, the `DoEvents` function is not directly available as it is in Visual Basic. However, you can achieve similar functionality by using the `Application.DoEvents()` method av... |
I'm trying to use Shoes' download() method to pass a username and password in the HTTP header to authenticate the HTTP request (talking to a Rails app).
I'm a bit of a newb when it comes to this stuff.
I havn't quite understood whether I should be automatically able to use the below syntax (username:pwd@) or whether t... | When using the `download` method in Shoes to make an HTTP request that requires authentication, you typically have two options: embedding the username and password directly in the URL (as you've shown) or manually setting the `Authorization` header in the request.
### Option 1: Using the Embedded Username and Password... | 40,043 | [
{
"from": "human",
"value": "I'm trying to use Shoes' download() method to pass a username and password in the HTTP header to authenticate the HTTP request (talking to a Rails app).\nI'm a bit of a newb when it comes to this stuff.\nI havn't quite understood whether I should be automatically able to use th... |
I have a form with a <textarea> and I want to capture any line breaks in that textarea on the server-side, and replace them with a <br/>.
Is that possible?
I tried setting white-space:pre on the textarea's CSS, but it's still not enough.
| Yes, it's possible to capture line breaks from a `<textarea>` on the server-side and replace them with `<br/>` tags. The CSS property `white-space: pre;` affects how text is displayed in the browser but does not change the text content itself when it's submitted to the server. Instead, you'll need to handle this on the... | 38,850 | [
{
"from": "human",
"value": "I have a form with a <textarea> and I want to capture any line breaks in that textarea on the server-side, and replace them with a <br/>.\nIs that possible?\nI tried setting white-space:pre on the textarea's CSS, but it's still not enough.\n"
},
{
"from": "gpt",
"val... |
what is the best way to convert a UTF-16 files to UTF-8? I need to use this in a cmd script.
| To convert UTF-16 files to UTF-8 using a Windows Command Prompt (cmd) script, you can use PowerShell, which is included in Windows. You can create a script that utilizes PowerShell's capabilities to perform the conversion. Here’s a simple way to do it:
### Method 1: Using PowerShell in a Batch Script
You can create a... | 37,782 | [
{
"from": "human",
"value": "what is the best way to convert a UTF-16 files to UTF-8? I need to use this in a cmd script.\n"
},
{
"from": "gpt",
"value": "To convert UTF-16 files to UTF-8 using a Windows Command Prompt (cmd) script, you can use PowerShell, which is included in Windows. You can c... |
I have a folder "FolderA" which contains three sub-folders: foldera1 foldera2 and foldera3
I need to write a batch file which resides inside "FolderA". It should delete all the folders under "FolderA" as a cleanup activity. I don't know the folder names. rmdir does not support wild cards.
Could someone provide a soluti... | Certainly! You can create a batch file that deletes all the subfolders under "FolderA" by using a simple loop. The `for` command can help you iterate over the folders and delete them without needing to know their names in advance. Here’s how you can do it:
1. Open Notepad (or any text editor).
2. Copy and paste the fo... | 40,101 | [
{
"from": "human",
"value": "I have a folder \"FolderA\" which contains three sub-folders: foldera1 foldera2 and foldera3\nI need to write a batch file which resides inside \"FolderA\". It should delete all the folders under \"FolderA\" as a cleanup activity. I don't know the folder names. rmdir does not su... |
I want to enumerate all available drive letters (which aren't already taken) in Windows using VC++.
How can I do this?
| To enumerate all available drive letters in Windows using Visual C++, you can use the Windows API functions to check which drive letters are currently in use and then build a list of the available ones. Here’s a step-by-step guide along with an example code snippet:
1. **Include Necessary Headers**: Make sure to inclu... | 39,630 | [
{
"from": "human",
"value": "I want to enumerate all available drive letters (which aren't already taken) in Windows using VC++.\nHow can I do this?\n"
},
{
"from": "gpt",
"value": "To enumerate all available drive letters in Windows using Visual C++, you can use the Windows API functions to che... |
I was wondering if there was a way to tell if an instance of Oracle on a system has a database installed or not?
This is for an installation script, and I need to verify that there is an actual database in place before proceeding with the loading of my own tablespace onto that database. Has anyone tackled this problem ... | Yes, there are several ways to determine if an Oracle instance has a database installed. You can use SQL queries or command-line tools to check the status of the database. Here are a few common methods you could consider using in your installation script:
### Method 1: Using SQL*Plus
You can connect to the Oracle inst... | 36,286 | [
{
"from": "human",
"value": "I was wondering if there was a way to tell if an instance of Oracle on a system has a database installed or not?\nThis is for an installation script, and I need to verify that there is an actual database in place before proceeding with the loading of my own tablespace onto that ... |
Is this really the easiest way to do this?
http://simplesamples.info/MFC/Clipboard.php
| I can't access external websites directly, including the one you provided. However, if you're looking for an easy way to work with the clipboard in MFC (Microsoft Foundation Classes), I can provide some general advice.
If the site you've linked discusses using the clipboard in an MFC application, here are some common ... | 39,025 | [
{
"from": "human",
"value": "Is this really the easiest way to do this?\nhttp://simplesamples.info/MFC/Clipboard.php\n"
},
{
"from": "gpt",
"value": "I can't access external websites directly, including the one you provided. However, if you're looking for an easy way to work with the clipboard i... |
I have a command that runs fine if I ssh to a machine and run it, but fails when I try to run it using a remote ssh command like :
ssh user@IP <command>
Comparing the output of "env" using both methods resutls in different environments. When I manually login to the machine and run env, I get much more environment var... | The difference in environment variables when you SSH into a machine directly versus running a command remotely via SSH can be attributed to several factors:
1. **Shell Initialization**: When you SSH into a machine interactively, the shell goes through various initialization files (like `.bashrc`, `.bash_profile`, or `... | 34,360 | [
{
"from": "human",
"value": "I have a command that runs fine if I ssh to a machine and run it, but fails when I try to run it using a remote ssh command like : \nssh user@IP <command>\n\nComparing the output of \"env\" using both methods resutls in different environments. When I manually login to the machin... |
I am using xsl to control the output of my xml file, but the BOM character is being added.
| When dealing with XML and XSLT, you might encounter the Byte Order Mark (BOM), which is a special marker used at the beginning of a text file to indicate its encoding. If you're seeing a BOM being added to your output, it could be due to how the XSLT processor is configured or how the output file is being written.
Her... | 38,224 | [
{
"from": "human",
"value": "I am using xsl to control the output of my xml file, but the BOM character is being added.\n"
},
{
"from": "gpt",
"value": "When dealing with XML and XSLT, you might encounter the Byte Order Mark (BOM), which is a special marker used at the beginning of a text file t... |
Do you think there is a big difference in for...in and for loops? What kind of "for" do you prefer to use and why?
Let's say we have an array of associative arrays:
var myArray = [{'key': 'value'}, {'key': 'value1'}];
So we can iterate:
for (var i = 0; i < myArray.length; i++)
And:
for (var i in myArray)
I don't see... | Yes, there is a significant difference between the traditional `for` loop and the `for...in` loop in JavaScript, particularly in how they iterate over elements and what kind of objects they are intended for.
### Differences:
1. **Iteration Target**:
- **`for (var i = 0; i < myArray.length; i++)`**: This loop is sp... | 36,641 | [
{
"from": "human",
"value": "Do you think there is a big difference in for...in and for loops? What kind of \"for\" do you prefer to use and why?\nLet's say we have an array of associative arrays:\nvar myArray = [{'key': 'value'}, {'key': 'value1'}];\n\nSo we can iterate:\nfor (var i = 0; i < myArray.length... |
What are the things that Medium Trust stops you from doing? For example, I've already learned that Medium Trust stops you from using System.IO.Path.GetTempPath(). What other things like that?
| In a Medium Trust environment, certain operations and features are restricted to improve security and limit potential risks posed by malicious code. Here are some of the notable restrictions you may encounter in a Medium Trust environment:
1. **File System Access**: You cannot access the file system directly using `Sy... | 37,663 | [
{
"from": "human",
"value": "What are the things that Medium Trust stops you from doing? For example, I've already learned that Medium Trust stops you from using System.IO.Path.GetTempPath(). What other things like that?\n"
},
{
"from": "gpt",
"value": "In a Medium Trust environment, certain ... |
The scenario is trying to adjust font size to get a nice graphic arrangement, or trying to decide where to break a caption/subtitle.
a) In XL VBA is there a way to find out whether a text on a textbox, or caption on a label, still fits the control?
b) Is there a way to know where was the text/caption broken on multilin... | In Excel VBA, you can manage the layout of text within controls like TextBoxes and Labels. Here are answers to your questions regarding fitting text and identifying breaks:
### a) Checking if Text Fits in a Control
You can estimate whether the text fits within a TextBox or a Label by measuring the text size and compa... | 38,044 | [
{
"from": "human",
"value": "The scenario is trying to adjust font size to get a nice graphic arrangement, or trying to decide where to break a caption/subtitle.\na) In XL VBA is there a way to find out whether a text on a textbox, or caption on a label, still fits the control?\nb) Is there a way to know wh... |
Currently reading quite a heavy WCF book. I have used it myself in production just the once, using tcp, worked a charm.
Anyway what are your opinions on this technology, is it here to stay, is it worth the time invested learning all the complex features etc etc?
| Windows Communication Foundation (WCF) has been a significant part of the .NET ecosystem for building service-oriented applications, especially for enterprise environments. Here are some key points to consider regarding WCF and its future:
### Advantages of WCF
1. **Rich Feature Set**: WCF supports various protocols (... | 39,411 | [
{
"from": "human",
"value": "Currently reading quite a heavy WCF book. I have used it myself in production just the once, using tcp, worked a charm.\nAnyway what are your opinions on this technology, is it here to stay, is it worth the time invested learning all the complex features etc etc?\n"
},
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.