instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
Is it possible to use the LoginView control in combitation with the server session in ASP.NAT?
| Yes, it is indeed possible to use the `LoginView` control in combination with server sessions in ASP.NET. The `LoginView` control is used to display different content based on the user's authentication status, while server sessions are used to store user-specific data on the server.
Here's how you can effectively use ... | 15,014 | [
{
"from": "human",
"value": "Is it possible to use the LoginView control in combitation with the server session in ASP.NAT?\n"
},
{
"from": "gpt",
"value": "Yes, it is indeed possible to use the `LoginView` control in combination with server sessions in ASP.NET. The `LoginView` control is used t... |
If there is a cookie set for a subdomain, metric.foo.com, is there a way for me to delete the metric.foo.com cookie on a request to www.foo.com? The browser (at least Firefox) seems to ignore a Set-Cookie with a domain of metric.foo.com.
| When dealing with cookies in a web environment, the rules governing the scope and accessibility of cookies are defined by the `Domain` and `Path` attributes set when the cookie is created.
1. **Domain Attribute**: If a cookie is set for `metric.foo.com`, it is scoped to that subdomain. Cookies set for a specific subdo... | 16,951 | [
{
"from": "human",
"value": "If there is a cookie set for a subdomain, metric.foo.com, is there a way for me to delete the metric.foo.com cookie on a request to www.foo.com? The browser (at least Firefox) seems to ignore a Set-Cookie with a domain of metric.foo.com.\n"
},
{
"from": "gpt",
"value... |
I am a developer for a .net application that uses ClickOnce for deployment. I have deployed it over 60 times and computers have not had any issues downloading the latest release. However, when I deployed this morning, the following error occurs when computers with Office 2007 installed tries to start the application:
... | The error message you're encountering indicates that your .NET application is trying to reference the `stdole` assembly, specifically version `7.0.3300.0`, which is typically associated with Office 2003 and earlier. When Office 2007 is installed, it can cause compatibility issues with certain versions of the `stdole` a... | 12,170 | [
{
"from": "human",
"value": "I am a developer for a .net application that uses ClickOnce for deployment. I have deployed it over 60 times and computers have not had any issues downloading the latest release. However, when I deployed this morning, the following error occurs when computers with Office 2007 in... |
I want to write a program in which plays an audio file that reads a text.
I want to highlite the current syllable that the audiofile plays in green and the rest of the current word in red.
What kind of datastructure should I use to store the audio file and the information that tells the program when to switch to the n... | To build a program that plays an audio file while highlighting the current syllable in green and the rest of the current word in red, you will need a suitable data structure to synchronize the text with the audio playback. Here’s a breakdown of how to approach this:
### Data Structure
You can use a combination of a l... | 15,436 | [
{
"from": "human",
"value": "I want to write a program in which plays an audio file that reads a text. \nI want to highlite the current syllable that the audiofile plays in green and the rest of the current word in red.\nWhat kind of datastructure should I use to store the audio file and the information tha... |
AFAIK, Currency type in Delphi Win32 depends on the processor floating point precision. Because of this I'm having rounding problems when comparing two Currency values, returning different results depending on the machine.
For now I'm using the SameValue function passing a Epsilon parameter = 0.009, because I only need... | In Delphi, the `Currency` type is designed to represent fixed-point decimal numbers with 4 decimal places of precision, which makes it particularly well-suited for handling currency and avoiding typical floating-point precision issues. However, if you are encountering rounding problems when comparing `Currency` values,... | 15,812 | [
{
"from": "human",
"value": "AFAIK, Currency type in Delphi Win32 depends on the processor floating point precision. Because of this I'm having rounding problems when comparing two Currency values, returning different results depending on the machine.\nFor now I'm using the SameValue function passing a Epsi... |
This is a super basic question but I'm trying to execute a Query that I'm building via some form values against the MS Access database the form resides in. I don't think I need to go through ADO formally, but maybe I do.
Anyway, some help would be appreciated. Sorry for being a n00b. ;)
| No need to apologize; everyone starts somewhere! If you're working with MS Access and need to execute a query based on form values, you can do this using VBA (Visual Basic for Applications). You typically don't need to use ADO unless you're working with external databases.
Here's a simple example of how to build and e... | 14,804 | [
{
"from": "human",
"value": "This is a super basic question but I'm trying to execute a Query that I'm building via some form values against the MS Access database the form resides in. I don't think I need to go through ADO formally, but maybe I do.\nAnyway, some help would be appreciated. Sorry for being... |
I have some REST web services implemented in WCF. I wish to make these services return "Bad Request" when the xml contains invalid elements.
The xml serialization is being handled by XmlSerializer. By default XmlSerializer ignores unknown elements. I know it is possible to hook XmlSerializer.UnknownElement and throw an... | In WCF, when using the `XmlSerializer` to handle XML serialization/deserialization, you have limited options for customizing the serialization behavior directly. However, you can implement a workaround by creating a custom message inspector to validate the incoming XML before it is deserialized by the `XmlSerializer`. ... | 13,078 | [
{
"from": "human",
"value": "I have some REST web services implemented in WCF. I wish to make these services return \"Bad Request\" when the xml contains invalid elements.\nThe xml serialization is being handled by XmlSerializer. By default XmlSerializer ignores unknown elements. I know it is possible to ho... |
Is there a way to suppress warnings in Xcode?
For example I am calling an undocumented method and since the method is not in the header I get a warning on compile. I know I can add it to my header to stop the warning, but I am wondering if there is a way other than adding it to the header (so I can keep the headers cle... | Yes, in Xcode, you can suppress specific compiler warnings using `#pragma` directives. If you're encountering a warning due to calling an undocumented method, you can use the `#pragma clang diagnostic` directive to disable that specific warning around the code that generates the warning.
Here’s how to do it:
```objc
... | 18,478 | [
{
"from": "human",
"value": "Is there a way to suppress warnings in Xcode?\nFor example I am calling an undocumented method and since the method is not in the header I get a warning on compile. I know I can add it to my header to stop the warning, but I am wondering if there is a way other than adding it to... |
We're at the beginning of a new ERP-ish client-server application, developed as a Python rich client. We're currently evaluating Dabo as our main framework and it looks quite nice and easy to use, but I was wondering, has anyone used it for medium-to-big sized projects?
Thanks for your time!
| Dabo is a framework designed for building rich client applications in Python, and while it can be appealing for various applications, there are a few considerations when using it for medium-to-large sized projects.
### Pros of Using Dabo:
1. **Ease of Use**: Dabo is known for its straightforward API and ease of gettin... | 17,203 | [
{
"from": "human",
"value": "We're at the beginning of a new ERP-ish client-server application, developed as a Python rich client. We're currently evaluating Dabo as our main framework and it looks quite nice and easy to use, but I was wondering, has anyone used it for medium-to-big sized projects?\nThanks... |
VB.NET has a very handy "with" statement, but it also lets you use it on an unnamed variable, like this:
With New FancyClass()
.Level = "SuperSpiffy"
.Style = Slimming
.Execute()
End With
Is there a way to get at the "hidden" instance, so I can view its properties in the Immediate window? I doubt I'll get ... | In VB.NET, when you use a `With` statement on an unnamed instance, that instance is not directly accessible in the Immediate window or any debugging window. This limitation is due to how the `With` statement is structured; it creates a temporary scope that doesn't expose the object itself in a way that allows access fr... | 17,602 | [
{
"from": "human",
"value": "VB.NET has a very handy \"with\" statement, but it also lets you use it on an unnamed variable, like this:\nWith New FancyClass()\n .Level = \"SuperSpiffy\"\n .Style = Slimming\n .Execute()\nEnd With\n\nIs there a way to get at the \"hidden\" instance, so I can view its... |
I have two unsorted lists and I need to produce another list which is sorted and where all the elements are unique.
The elements can occur multiple times in both lists and they are originally unsorted.
My function looks like this:
(defun merge-lists (list-a list-b sort-fn)
"Merges two lists of (x, y) coordinates so... | Your function for merging two lists while sorting and removing duplicates is well-structured, but there is indeed a more efficient way to achieve the same result in Common Lisp. You can simplify the code by using a combination of `remove-duplicates`, `append`, and `sort`. Here's a revised version of your function:
```... | 16,614 | [
{
"from": "human",
"value": "I have two unsorted lists and I need to produce another list which is sorted and where all the elements are unique.\nThe elements can occur multiple times in both lists and they are originally unsorted.\nMy function looks like this:\n(defun merge-lists (list-a list-b sort-fn)\n ... |
Is there a known math formula that I can use to estimate the size of a new Lucene index? I know how many fields I want to have indexed, and the size of each field. And, I know how many items will be indexed. So, once these are processed by Lucene, how does it translate into bytes?
| Estimating the size of a new Lucene index can be somewhat complex due to various factors, including the data types of the fields, the amount of text processed, the indexing options used, and the specifics of how Lucene handles storage and compression. However, you can create a rough estimate based on a few components.
... | 14,330 | [
{
"from": "human",
"value": "Is there a known math formula that I can use to estimate the size of a new Lucene index? I know how many fields I want to have indexed, and the size of each field. And, I know how many items will be indexed. So, once these are processed by Lucene, how does it translate into byte... |
If I have a table field named 'description', what would be the SQL (using MS SQL) to get a list of records of all distinct words used in this field.
For example:
If the table contains the following for the 'description' field:
Record1 "The dog jumped over the fence."
Record2 "The giant tripped on the fence."
...
The S... | To retrieve a list of all distinct words from a `description` field in a SQL Server database, you can use a combination of string manipulation functions and a common table expression (CTE) or a derived table. Since SQL Server doesn't have a built-in function to directly split strings into rows, you can use the `STRING_... | 17,929 | [
{
"from": "human",
"value": "If I have a table field named 'description', what would be the SQL (using MS SQL) to get a list of records of all distinct words used in this field.\nFor example:\nIf the table contains the following for the 'description' field:\nRecord1 \"The dog jumped over the fence.\"\nRecor... |
I have a line that I draw in a window and I let the user drag it around. So, my line is defined by two points: (x1,y1) and (x2,y2). But now I would like to draw "caps" at the end of my line, that is, short perpendicular lines at each of my end points. The caps should be N pixels in length.
Thus, to draw my "cap" line a... | To calculate the points that form the cap at the end of your line at point \((x1, y1)\) and ensure that they are perpendicular to the direction of your line defined by \((x1, y1)\) and \((x2, y2)\), you can follow these steps:
1. **Calculate the direction vector** of the line from \((x1, y1)\) to \((x2, y2)\):
\[
... | 14,796 | [
{
"from": "human",
"value": "I have a line that I draw in a window and I let the user drag it around. So, my line is defined by two points: (x1,y1) and (x2,y2). But now I would like to draw \"caps\" at the end of my line, that is, short perpendicular lines at each of my end points. The caps should be N pixe... |
I want a C program to produce a core dump under certain circumstances. This is a program that runs in a production environment and isn't easily stopped and restarted to adjust other kinds of debugging code. Also, since it's in a production environment, I don't want to call abort(). The issues under investigation aren't... | To create a C program that generates a core dump under specific conditions without terminating the program, you can leverage the `SIGABRT` signal in conjunction with the `sigaction` function to customize behavior. By doing this, you can send the `SIGABRT` signal to the process itself, which allows you to produce a core... | 15,794 | [
{
"from": "human",
"value": "I want a C program to produce a core dump under certain circumstances. This is a program that runs in a production environment and isn't easily stopped and restarted to adjust other kinds of debugging code. Also, since it's in a production environment, I don't want to call abort... |
In a C# Web app, VS 2005 (I am avoiding 2008 because I find the IDE to be hard to deal with), I am getting into a layout stew.
I am moving from absolute positioning toward CSS relative positioning.
I'd like to divide the screen into four blocks: top (header band), middle left (a stacked menu), middle right (content - h... | Hi Mike,
It sounds like you're on the right track by moving towards using CSS for layout in your ASP.NET application. Managing layouts using CSS can indeed simplify your design and make it more responsive, while also improving maintainability. Here are some tips and resources that may help you with your layout design ... | 13,551 | [
{
"from": "human",
"value": "In a C# Web app, VS 2005 (I am avoiding 2008 because I find the IDE to be hard to deal with), I am getting into a layout stew.\nI am moving from absolute positioning toward CSS relative positioning.\nI'd like to divide the screen into four blocks: top (header band), middle left ... |
Is there someway to have a part of the page that renders like a little sub-page, like components?
For example, if I have a shopping cart on all my pages?
| Yes, you can definitely implement a part of a web page that acts like a sub-page or a component, such as a shopping cart, which can be reused across different pages of your application. This is a common practice in modern web development. Here are some methods depending on the technology or framework you're using:
###... | 12,007 | [
{
"from": "human",
"value": "Is there someway to have a part of the page that renders like a little sub-page, like components?\nFor example, if I have a shopping cart on all my pages?\n"
},
{
"from": "gpt",
"value": "Yes, you can definitely implement a part of a web page that acts like a sub-pag... |
I've read numerous posts about people having problems with viewWillAppear when you do not create your view hierarchy just right. My problem is I can't figure out what that means.
If I create a RootViewController and call addSubView on that controller, I would expect the added view(s) to be wired up for viewWillAppear e... | The issues you're encountering with `viewWillAppear` and view controller management in iOS relate to the way the view controller lifecycle is designed to work. To ensure that view controllers receive lifecycle events properly, you must use the view controller containment model instead of manipulating views directly. Le... | 15,713 | [
{
"from": "human",
"value": "I've read numerous posts about people having problems with viewWillAppear when you do not create your view hierarchy just right. My problem is I can't figure out what that means.\nIf I create a RootViewController and call addSubView on that controller, I would expect the added v... |
Here's what I'd like to do:
I want to create a library project that contains my Resource files (ie, UI Labels and whatnot). I'd like to then use the resource library both in my UI and in my Tests. (Ie, basically have a common place for my resources that I reference from multiple projects.)
Unfortunately, because the S... | Creating a library project for resource files that are strongly typed and accessible from multiple projects can be a bit tricky due to the internal access modifier that the StronglyTypedResourceBuilder uses. However, there are some strategies you can employ to make your strongly typed resources accessible without losin... | 15,297 | [
{
"from": "human",
"value": "Here's what I'd like to do: \nI want to create a library project that contains my Resource files (ie, UI Labels and whatnot). I'd like to then use the resource library both in my UI and in my Tests. (Ie, basically have a common place for my resources that I reference from multip... |
I want to execute a certain batch file and redirect its console output to a text control in visual c++ or redirect the console output at the same time the logs/echo are showing.
| To execute a batch file and capture its output in a Visual C++ application, you can use pipes to redirect the standard output and error streams of the process. Below, I'll guide you through the steps to achieve this, including a simple example of how to do it.
### Steps to Redirect Console Output in Visual C++
1. **C... | 11,036 | [
{
"from": "human",
"value": "I want to execute a certain batch file and redirect its console output to a text control in visual c++ or redirect the console output at the same time the logs/echo are showing.\n"
},
{
"from": "gpt",
"value": "To execute a batch file and capture its output in a Visu... |
I've got many assemblies/projects in the same c#/.net solution. A setting needs to be saved by people using the web application gui, and then a console app and some test projects need to access the same file. Where should I put the file and how to access it?
I've tried using "AppDomain.CurrentDomain.BaseDirectory" but ... | When it comes to managing shared configuration settings across multiple projects in a .NET solution, there are several options you can consider. The right choice often depends on your specific requirements, such as ease of access, security, and deployment. Here are some common approaches:
### 1. **Using a Centralized ... | 12,200 | [
{
"from": "human",
"value": "I've got many assemblies/projects in the same c#/.net solution. A setting needs to be saved by people using the web application gui, and then a console app and some test projects need to access the same file. Where should I put the file and how to access it?\nI've tried using \"... |
The CPU architecture landscape has changed, multiple cores is a trend that will change how we have to develop software. I've done multi-threaded development in C, C++ and Java, I've done multi-process development using various IPC mechanisms. Traditional approaches of using threads doesn't seem to make it easy, for th... | You’ve touched on some notable languages and paradigms that address the challenges of concurrent programming. Here are additional languages, libraries, and design techniques that can help developers effectively leverage multi-core architectures while minimizing the pitfalls of concurrency such as deadlocks and race con... | 11,515 | [
{
"from": "human",
"value": "The CPU architecture landscape has changed, multiple cores is a trend that will change how we have to develop software. I've done multi-threaded development in C, C++ and Java, I've done multi-process development using various IPC mechanisms. Traditional approaches of using thr... |
Just getting my head around Ruby metaprogramming. The mixin/modules always manage to confuse me.
include: mixes in specified module methods as instance methods in the target class
extend: mixes in specified module methods as class methods in the target class
So is the major difference just this or is a bigger dragon... | You're definitely on the right track with your understanding of `include` and `extend` in Ruby! The main difference you've identified is indeed that `include` adds module methods as instance methods in the target class, while `extend` adds them as class methods.
Let's break it down further:
### `include`
- When you... | 12,739 | [
{
"from": "human",
"value": "Just getting my head around Ruby metaprogramming. The mixin/modules always manage to confuse me. \n\ninclude: mixes in specified module methods as instance methods in the target class\nextend: mixes in specified module methods as class methods in the target class\n\nSo is the ma... |
As users, we love the power of Greasemonkey. As developers, it can complicate things.
Some people advocate defensively disabling user scripts; others are willing to die to defend them.
Is there a middle ground? How can we reduce the threat of an evolutionary arms race between users and unscrupulous advertisers?
| The tension between users wanting the benefits of user scripts (like those provided by Greasemonkey) and the desire of developers to maintain the integrity and security of their applications can indeed create a complicated landscape. Here are some strategies that could serve as a middle ground:
### 1. **User Education... | 14,967 | [
{
"from": "human",
"value": "As users, we love the power of Greasemonkey. As developers, it can complicate things.\nSome people advocate defensively disabling user scripts; others are willing to die to defend them.\nIs there a middle ground? How can we reduce the threat of an evolutionary arms race between ... |
How do I fix that error once and for all? I just want to be able to do unions in MySQL.
(I'm looking for a shortcut, like an option to make MySQL ignore that issue or take it's best guess, not looking to change collations on 100s of tables ... at least not today)
| In MySQL, a common issue when trying to perform a `UNION` operation is a collation conflict between the columns involved in the union. This typically arises when the character sets or collations of the involved columns differ, leading to an error.
Unfortunately, there isn't a global setting in MySQL to automatically i... | 16,494 | [
{
"from": "human",
"value": "How do I fix that error once and for all? I just want to be able to do unions in MySQL. \n(I'm looking for a shortcut, like an option to make MySQL ignore that issue or take it's best guess, not looking to change collations on 100s of tables ... at least not today)\n"
},
{... |
I am writing a Windows service that pulls messages from an MSMQ and posts them to a legacy system (Baan). If the post fails or the machine goes down during the post, I don't want to loose the message. I am therefore using MSMQ transactions. I abort on failure, and I commit on success.
When working against a local queue... | Switching to SQL Service Broker is a solid decision, especially given the requirements for reliable message processing and remote transactions. SQL Service Broker provides robust support for transactional messaging, and its integration with SQL Server allows for easier management and backup.
Here are a few key advanta... | 14,523 | [
{
"from": "human",
"value": "I am writing a Windows service that pulls messages from an MSMQ and posts them to a legacy system (Baan). If the post fails or the machine goes down during the post, I don't want to loose the message. I am therefore using MSMQ transactions. I abort on failure, and I commit on su... |
I'm working on a game (using Ruby) and planning to have it available in several languages. I was wondering what's the best option for rendering text. In particular, whatever I use should be able to render complex fonts (Arabic and Persian in particular).
I've been looking around and have stumbled upon freetype, graphi... | When it comes to rendering complex text, especially for languages like Arabic and Persian that have special requirements (like right-to-left layout and contextual shaping), you have several options. Let's go over a few of the most common libraries and their trade-offs.
### 1. FreeType
- **Pros**:
- Highly flexible a... | 16,349 | [
{
"from": "human",
"value": "I'm working on a game (using Ruby) and planning to have it available in several languages. I was wondering what's the best option for rendering text. In particular, whatever I use should be able to render complex fonts (Arabic and Persian in particular). \nI've been looking arou... |
I have a problem with setting the TTL on my Datagram packets. I am calling the setTTL(...) method on the packet before sending the packet to the multicastSocket but if I capture the packet with ethereal the TTL field is always set to 0
| When you're working with Datagram packets in Java, particularly for multicast applications, setting the Time-To-Live (TTL) correctly is crucial for ensuring that your packets can traverse the appropriate number of network hops. If you're encountering issues where the TTL is always set to 0 when you capture the packets,... | 16,208 | [
{
"from": "human",
"value": "I have a problem with setting the TTL on my Datagram packets. I am calling the setTTL(...) method on the packet before sending the packet to the multicastSocket but if I capture the packet with ethereal the TTL field is always set to 0\n"
},
{
"from": "gpt",
"value"... |
What is the best way to have synchronized a collection of objects between various threads in .Net?
I need to have a List or Dictionary accessed from different threads in a thread safe mode. With Adds, Removes, Foreachs, etc.
| To synchronize access to a collection of objects in a multi-threaded environment in .NET, you have several options. Here are some of the most common approaches for handling `List<T>` or `Dictionary<TKey, TValue>` in a thread-safe manner:
### 1. **Locking with `lock` Statement**
You can use a simple locking mechanism w... | 10,598 | [
{
"from": "human",
"value": "What is the best way to have synchronized a collection of objects between various threads in .Net?\nI need to have a List or Dictionary accessed from different threads in a thread safe mode. With Adds, Removes, Foreachs, etc.\n"
},
{
"from": "gpt",
"value": "To synch... |
The Law of Demeter indicates that you should only speak to objects that you know about directly. That is, do not perform method chaining to talk to other objects. When you do so, you are establishing improper linkages with the intermediary objects, inappropriately coupling your code to other code.
That's bad.
The sol... | You've identified a common tension in software design principles, particularly between the Law of Demeter (LoD) and the principle of cohesion. Let's break down the key points and considerations involved.
### The Law of Demeter (LoD)
The Law of Demeter, also known as the "principle of least knowledge," encourages redu... | 16,075 | [
{
"from": "human",
"value": "The Law of Demeter indicates that you should only speak to objects that you know about directly. That is, do not perform method chaining to talk to other objects. When you do so, you are establishing improper linkages with the intermediary objects, inappropriately coupling you... |
Oftentimes a developer will be faced with a choice between two possible ways to solve a problem -- one that is idiomatic and readable, and another that is less intuitive, but may perform better. For example, in C-based languages, there are two ways to multiply a number by 2:
int SimpleMultiplyBy2(int x)
{
return x... | As a developer, the decision between using the more idiomatic and readable approach versus the more performant (but less intuitive) approach often depends on the context of the project, the specific use case, and the audience for the code. Here are some considerations to guide your decision:
1. **Readability and Maint... | 16,362 | [
{
"from": "human",
"value": "Oftentimes a developer will be faced with a choice between two possible ways to solve a problem -- one that is idiomatic and readable, and another that is less intuitive, but may perform better. For example, in C-based languages, there are two ways to multiply a number by 2:\ni... |
It is unclear to me from the MSDN documentation if I should provide a deep or a shallow clone when implementing ICloneable. What is the preferred option?
| When implementing the `ICloneable` interface in .NET, the preferred option generally depends on the specific use case for your class. Here are some key points to consider:
1. **Shallow Clone**: A shallow clone copies the object's immediate values and references but does not create copies of objects that those referenc... | 18,502 | [
{
"from": "human",
"value": "It is unclear to me from the MSDN documentation if I should provide a deep or a shallow clone when implementing ICloneable. What is the preferred option?\n"
},
{
"from": "gpt",
"value": "When implementing the `ICloneable` interface in .NET, the preferred option gener... |
I've executed a JDBC query to obtain a resultset. Before iterating over it, I'd like to quickly find out how many rows were returned. How can I do this with high performance?
I'm using Java 6, Oracle 11g, and the latest Oracle JDBC drivers.
| When working with JDBC and Oracle, if you want to determine the number of rows returned by a query without iterating over the ResultSet, you have a few options. The performance of these options can vary depending on your specific use case and query characteristics.
### Option 1: COUNT(*) in the SQL Query
One straight... | 14,699 | [
{
"from": "human",
"value": "I've executed a JDBC query to obtain a resultset. Before iterating over it, I'd like to quickly find out how many rows were returned. How can I do this with high performance?\nI'm using Java 6, Oracle 11g, and the latest Oracle JDBC drivers.\n"
},
{
"from": "gpt",
"v... |
I am using RRDTool (http://oss.oetiker.ch/rrdtool/) as a graphing back-end for storing performance metrics. This is done via the RRDTool CLI from a Python script.
My problem is that the script is multithreaded and each thread updates the RRD at a pretty rapid pace. Sometimes an update fails because one thread is acce... | You are correct that RRDTool does have its own locking mechanism, but when you have multiple threads simultaneously trying to access the same RRD file, you may still run into issues, particularly if the operations are happening very rapidly. To handle this, there are several approaches you can consider:
### 1. Use a S... | 14,677 | [
{
"from": "human",
"value": "I am using RRDTool (http://oss.oetiker.ch/rrdtool/) as a graphing back-end for storing performance metrics. This is done via the RRDTool CLI from a Python script.\nMy problem is that the script is multithreaded and each thread updates the RRD at a pretty rapid pace. Sometimes ... |
Does anyone know of any methods to create a file upload progress bar in PHP? I have often heard that it's impossible.
I have one idea, but not sure if it would work: have a normal file upload, but instead submit to an iframe. When this is submitted, store the file information (size and temp location) in the session. At... | Creating a file upload progress bar in PHP can indeed be challenging, but it is not impossible. Your idea of using an iframe for the upload and AJAX to track progress is a creative approach and could potentially work. However, it’s worth considering some additional points and alternatives.
### Method 1: Using `XMLHttp... | 14,159 | [
{
"from": "human",
"value": "Does anyone know of any methods to create a file upload progress bar in PHP? I have often heard that it's impossible.\nI have one idea, but not sure if it would work: have a normal file upload, but instead submit to an iframe. When this is submitted, store the file information (... |
Is there a way to perform a full text search of a subversion repository, including all the history?
For example, I've written a feature that I used somewhere, but then it wasn't needed, so I svn rm'd the files, but now I need to find it again to use it for something else. The svn log probably says something like "remov... | Performing a full text search of the actual diffs in the history of a Subversion (SVN) repository can be challenging since SVN does not natively support searching through the diffs of past commits. However, you can accomplish this through a combination of command-line tools and custom scripts. Below are some methods to... | 11,650 | [
{
"from": "human",
"value": "Is there a way to perform a full text search of a subversion repository, including all the history?\nFor example, I've written a feature that I used somewhere, but then it wasn't needed, so I svn rm'd the files, but now I need to find it again to use it for something else. The s... |
What's the difference between the inner workings of Java's JVM and .NET's CLR?
Perhaps a starting point would be, are they basically the same thing in their respective environments (Java > JVM > Machine code) (C# > CLR > IL).
Update: Several people have alluded to the points I was trying to cover:
Garbage Collection... | The Java Virtual Machine (JVM) and the Common Language Runtime (CLR) are both environments designed to run programs written in high-level languages, providing a layer of abstraction over the underlying hardware. They share some similarities, but they also have significant differences in their architecture and functiona... | 7,231 | [
{
"from": "human",
"value": "What's the difference between the inner workings of Java's JVM and .NET's CLR?\nPerhaps a starting point would be, are they basically the same thing in their respective environments (Java > JVM > Machine code) (C# > CLR > IL).\n\nUpdate: Several people have alluded to the point... |
Does anybody know what hypothetical indexes are used for in sql server 2000? I have a table with 15+ such indexes, but have no idea what they were created for. Can they slow down deletes/inserts?
| In SQL Server 2000, hypothetical indexes are a feature that allows database administrators and developers to simulate the effect of an index without actually creating it on the table. They provide a way to estimate the performance benefits of adding an index without the overhead of physically creating and maintaining t... | 17,211 | [
{
"from": "human",
"value": "Does anybody know what hypothetical indexes are used for in sql server 2000? I have a table with 15+ such indexes, but have no idea what they were created for. Can they slow down deletes/inserts?\n"
},
{
"from": "gpt",
"value": "In SQL Server 2000, hypothetical ind... |
for e.g from command prompt I need to launch the exe with some switch flags under debugger. How do I do it?
This is an exe from c/c++ and built using VS2005 environment that I need debug. I pass some flags to this exe to perform some stuff.
| To launch an executable with specific command-line switches under a debugger from the command prompt, you can use Visual Studio's debugger (or `cdb`, the command-line debugger) depending on your needs. Here's how you can do it using different methods:
### Using Visual Studio
1. **Open the Developer Command Prompt for... | 16,626 | [
{
"from": "human",
"value": "for e.g from command prompt I need to launch the exe with some switch flags under debugger. How do I do it? \nThis is an exe from c/c++ and built using VS2005 environment that I need debug. I pass some flags to this exe to perform some stuff.\n"
},
{
"from": "gpt",
"... |
In java, which regular expression can be used to replace these,
for example:
before:
aaabbb
after:
ab
before:
14442345
after:
142345
thanks!
| To achieve the desired transformation of your strings using regular expressions in Java, you can use a regex pattern to identify consecutive duplicate characters and replace them with a single instance of the character.
Here's how you can do it:
1. **Regular Expression**: The regex pattern you can use is `(.)\1+`, wh... | 16,788 | [
{
"from": "human",
"value": "In java, which regular expression can be used to replace these,\nfor example:\nbefore:\naaabbb\nafter:\nab\nbefore:\n14442345 \nafter:\n142345\nthanks!\n"
},
{
"from": "gpt",
"value": "To achieve the desired transformation of your strings using regular expressions in... |
Is there a destructor for Java? I don't seem to be able to find any documentation on this. If there isn't, how can I achieve the same effect?
To make my question more specific, I am writing an application that deals with data and the specification say that there should be a 'reset' button that brings the application ba... | In Java, there is no explicit destructor like in C or C++. Instead, Java uses a garbage collection mechanism that automatically manages memory for you. When there are no more references to an object, the garbage collector can reclaim the memory used by that object. So, the concept of "destroying" objects explicitly doe... | 15,302 | [
{
"from": "human",
"value": "Is there a destructor for Java? I don't seem to be able to find any documentation on this. If there isn't, how can I achieve the same effect?\nTo make my question more specific, I am writing an application that deals with data and the specification say that there should be a 're... |
Conceptually, I would like to accomplish the following but have had trouble understand how to code it properly in C#:
SomeMethod { // Member of AClass{}
DoSomething;
Start WorkerMethod() from BClass in another thread;
DoSomethingElse;
}
Then, when WorkerMethod() is complete, run this:
void SomeOtherMetho... | Certainly! In C#, you can achieve this functionality using `Task` and `async/await`. The `Task` class allows you to run methods asynchronously on a separate thread, and you can easily wait for it to complete before executing another method.
Here’s an example implementation based on your description:
```csharp
using S... | 14,452 | [
{
"from": "human",
"value": "Conceptually, I would like to accomplish the following but have had trouble understand how to code it properly in C#:\n\nSomeMethod { // Member of AClass{}\n DoSomething;\n Start WorkerMethod() from BClass in another thread;\n DoSomethingElse;\n}\n\nThen, when WorkerMet... |
What the difference between Application("some-object") and Cache("some-object") in ASP.NET?
| In ASP.NET, both `Application` and `Cache` are used to store data that can be shared across all users and sessions of an application. However, they serve different purposes and have different characteristics. Here's a breakdown of their differences:
### Application
1. **Scope**: The `Application` object is applicatio... | 16,541 | [
{
"from": "human",
"value": "What the difference between Application(\"some-object\") and Cache(\"some-object\") in ASP.NET?\n"
},
{
"from": "gpt",
"value": "In ASP.NET, both `Application` and `Cache` are used to store data that can be shared across all users and sessions of an application. Howe... |
What would be the best practice way to handle the caching of images using PHP.
The filename is currently stored in a MySQL database which is renamed to a GUID on upload, along with the original filename and alt tag.
When the image is put into the HTML pages it is done so using a url such as '/images/get/200x200/{guid}.... | Your current approach to handling image caching with PHP has some solid foundations, but there are several best practices and optimizations you can implement to improve efficiency, performance, and maintainability. Here are some suggestions:
### 1. **Use Proper Caching Headers**
- Implement appropriate caching head... | 14,169 | [
{
"from": "human",
"value": "What would be the best practice way to handle the caching of images using PHP.\nThe filename is currently stored in a MySQL database which is renamed to a GUID on upload, along with the original filename and alt tag.\nWhen the image is put into the HTML pages it is done so using... |
I am considering building a application using PRISM (Composite WPF Guidance/Library). The application modules will be vertically partitioned (i.e. Customers, Suppliers, Sales Orders, etc). This is still all relatively easy... I also have a Shell with a main region were all the work will happen but now I need the follow... | To achieve the behavior you want using PRISM in a Composite WPF application, you can follow a structured approach. You want to load modules based on the menu selection, which means you need a way to dynamically request and load views into a region when a menu item is clicked.
Here's a basic outline of how to implement... | 10,360 | [
{
"from": "human",
"value": "I am considering building a application using PRISM (Composite WPF Guidance/Library). The application modules will be vertically partitioned (i.e. Customers, Suppliers, Sales Orders, etc). This is still all relatively easy... I also have a Shell with a main region were all the w... |
I was looking for a generic method in .Net to encode a string for use in an Xml element or attribute, and was surprised when I didn't immediately find one. So, before I go too much further, could I just be missing the built-in function?
Assuming for a moment that it really doesn't exist, I'm putting together my own ... | It's great that you're taking on the task of building your own `EncodeForXml` method for encoding strings suitable for XML. You mentioned that .NET has built-in ways of encoding XML, but if you want to implement your own method for the purpose of learning or fun, I can certainly help you optimize it further.
### .NET ... | 13,451 | [
{
"from": "human",
"value": "I was looking for a generic method in .Net to encode a string for use in an Xml element or attribute, and was surprised when I didn't immediately find one. So, before I go too much further, could I just be missing the built-in function? \nAssuming for a moment that it really d... |
I can print with printf as a hex or octal number. Is there a format tag to print as binary, or arbitrary base?
I am running gcc.
printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n"
printf("%b\n", 10); // prints "%b\n"
| The C standard library's `printf` function does not provide a built-in format specifier for binary output or for arbitrary bases. The format specifier `%b` for binary is not part of the standard. However, you can achieve binary output by creating your own function to convert an integer to a binary string and then print... | 15,285 | [
{
"from": "human",
"value": "I can print with printf as a hex or octal number. Is there a format tag to print as binary, or arbitrary base?\nI am running gcc.\nprintf(\"%d %x %o\\n\", 10, 10, 10); //prints \"10 A 12\\n\"\nprintf(\"%b\\n\", 10); // prints \"%b\\n\"\n\n"
},
{
"from": "gpt",
"valu... |
I'm working on a fairly complex project, a custom encryption routine if you will (just for fun) and I've run into this issue in designing my code layout.
I have a number of functions that I want to be able to call by index. Specifically, I need to be able to call one randomly for the encrypt process, but then address t... | Hi Nicholas!
For your encryption project, you're right that using a function array can be a bit unwieldy, especially when it comes to maintaining and managing the code across multiple files. Fortunately, there are more elegant solutions you can consider that can help improve maintainability while still allowing you to... | 10,703 | [
{
"from": "human",
"value": "I'm working on a fairly complex project, a custom encryption routine if you will (just for fun) and I've run into this issue in designing my code layout.\nI have a number of functions that I want to be able to call by index. Specifically, I need to be able to call one randomly f... |
I am building an application where a page will load user controls (x.ascx) dynamically based on query string.
I have a validation summary on the page and want to update it from the User Controls. This will allow me to have multiple controls using one Validation Summary. How can I pass data between controls and pages. ... | To achieve communication between dynamically loaded user controls (ASCX) and a validation summary on the page without using sessions or query strings, you can use a combination of event handlers and delegate/event mechanisms. Here’s how you can accomplish this:
### Step 1: Define a Delegate and Event in Your User Cont... | 14,285 | [
{
"from": "human",
"value": "I am building an application where a page will load user controls (x.ascx) dynamically based on query string. \nI have a validation summary on the page and want to update it from the User Controls. This will allow me to have multiple controls using one Validation Summary. How ca... |
I have an Oracle server (version 9, I believe) and a MS SQL server (version 2000). The MS SQL server is running MS Windows Server 2003.
I would like to use DTS to extract some data from the Oracle server and pour it into the MS SQL server. I'm having problems finding out what driver I should install on my MS SQL serve... | Yes, you have understood the requirements correctly for using Oracle Instant Client to connect from MS SQL Server 2000 to Oracle 9i using DTS (Data Transformation Services). Below are the steps and additional tips for setting up the Oracle Instant Client:
1. **Oracle Instant Client Packages**: You should indeed downlo... | 15,032 | [
{
"from": "human",
"value": "I have an Oracle server (version 9, I believe) and a MS SQL server (version 2000). The MS SQL server is running MS Windows Server 2003. \nI would like to use DTS to extract some data from the Oracle server and pour it into the MS SQL server. I'm having problems finding out what ... |
There are so many different options coming out of microsoft for data access. Which one is the best for scalable apps?
Linq
Should we be using Linq? It certainly seems easy but if you know your SQL does it really help. Also I hear that you can't run Async queries in ASP.NET using Linq. Therefore I wonder if it is really... | When it comes to choosing the right data access technology from Microsoft for scalable applications, several factors need to be considered, including your specific requirements, familiarity with technologies, and the architecture of your application. Let's break down the options you've mentioned:
### 1. LINQ
- **What ... | 6,393 | [
{
"from": "human",
"value": "There are so many different options coming out of microsoft for data access. Which one is the best for scalable apps?\nLinq\nShould we be using Linq? It certainly seems easy but if you know your SQL does it really help. Also I hear that you can't run Async queries in ASP.NET usi... |
How can I determine if I'm running on a 32bit or a 64bit version of matlab?
I have some pre-compiled mex-files which need different path's depending on 32/64bit matlab.
| To determine whether you are running a 32-bit or 64-bit version of MATLAB, you can use the `computer` function in MATLAB. Here’s how you can do it:
1. Open MATLAB.
2. In the Command Window, type the following command:
```matlab
computer
```
This command will return a string that indicates the architecture o... | 18,900 | [
{
"from": "human",
"value": "How can I determine if I'm running on a 32bit or a 64bit version of matlab?\nI have some pre-compiled mex-files which need different path's depending on 32/64bit matlab.\n"
},
{
"from": "gpt",
"value": "To determine whether you are running a 32-bit or 64-bit version ... |
I need to get the fully expanded hostname of the host that my Ruby script is running on. In Perl I've used Sys::Hostname::Long with good results. Google seems to suggest I should use Socket.hostname in ruby, but that's returning just the nodename, not the full hostname.
| To get the fully qualified domain name (FQDN) of the host that your Ruby script is running on, you can use the `Socket` library, specifically the `Socket.gethostbyname` method in combination with `Socket.gethostname`. Here's a simple way to achieve that:
```ruby
require 'socket'
# Get the local hostname
hostname = So... | 18,789 | [
{
"from": "human",
"value": "I need to get the fully expanded hostname of the host that my Ruby script is running on. In Perl I've used Sys::Hostname::Long with good results. Google seems to suggest I should use Socket.hostname in ruby, but that's returning just the nodename, not the full hostname.\n"
}... |
When I try to compile the newest version of Clisp on Ubuntu 8.04 I always get this error after running configure:
Configure findings:
FFI: no (user requested: default)
readline: yes (user requested: yes)
libsigsegv: no, consider installing GNU libsigsegv
./configure: libsigsegv was not detected, thus some feat... | It seems like you're encountering an issue with the configuration process for CLISP regarding the `libsigsegv` library. Here are some steps to help you troubleshoot and resolve the problem.
1. **Install libsigsegv and development package:**
Ensure that you have the required libraries and their development files. Yo... | 14,320 | [
{
"from": "human",
"value": "When I try to compile the newest version of Clisp on Ubuntu 8.04 I always get this error after running configure:\nConfigure findings:\nFFI: no (user requested: default)\nreadline: yes (user requested: yes)\nlibsigsegv: no, consider installing GNU libsigsegv\n./configur... |
How can you import a foxpro DBF file in SQL Server?
| Importing a FoxPro DBF file into SQL Server can be done through several methods. Below are some common approaches:
### Method 1: Using SQL Server Management Studio (SSMS)
1. **Open SQL Server Management Studio**:
- Connect to your SQL Server instance.
2. **Import Wizard**:
- Right-click on the database where y... | 4,608 | [
{
"from": "human",
"value": "How can you import a foxpro DBF file in SQL Server?\n"
},
{
"from": "gpt",
"value": "Importing a FoxPro DBF file into SQL Server can be done through several methods. Below are some common approaches:\n\n### Method 1: Using SQL Server Management Studio (SSMS)\n\n1. **... |
I'm looking for an efficient way (using PHP with a Mysql Database) to suggest alternative spelling for a query.
I know I can use services such as Yahoo's Spelling Suggestion but I want the suggestions to be based on what is currently available in the database.
For example: The user has to fill a form with a "City" fie... | To implement a spelling suggestion system based on a MySQL database using PHP, you can follow these steps:
### Step 1: Database Setup
1. **Create a Table for Cities**
First, ensure you have a table for the cities in your MySQL database. For example:
```sql
CREATE TABLE cities (
id INT AUTO_INCREMENT P... | 12,614 | [
{
"from": "human",
"value": "I'm looking for an efficient way (using PHP with a Mysql Database) to suggest alternative spelling for a query.\nI know I can use services such as Yahoo's Spelling Suggestion but I want the suggestions to be based on what is currently available in the database. \nFor example: Th... |
In the Java collections framework, the Collection interface declares the following method:
<T> T[] toArray(T[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. If the collection fits in the specified array, it is returned ther... | In Java, if you want to create an array of a specific type that is known only at runtime, you can use reflection. Specifically, you can use the `java.lang.reflect.Array` class, which provides methods to create arrays of a specific type.
Here's how you can implement the `toArray(T[] a)` method using reflection:
1. **C... | 14,812 | [
{
"from": "human",
"value": "In the Java collections framework, the Collection interface declares the following method:\n\n<T> T[] toArray(T[] a)\nReturns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. If the collection fits... |
I am used to TYPO3 where I just can upload an image within the content element an then just determine the size an so on.
Is there a way to handle images in drupal somehow like this?
| Yes, in Drupal, you can handle images in a way that is somewhat similar to TYPO3, allowing you to upload images directly within content elements and manage their display settings. Here are some common approaches to achieve this in Drupal:
### 1. **Using the Media Module**
Drupal's Media module allows you to create a m... | 15,942 | [
{
"from": "human",
"value": "I am used to TYPO3 where I just can upload an image within the content element an then just determine the size an so on.\nIs there a way to handle images in drupal somehow like this?\n"
},
{
"from": "gpt",
"value": "Yes, in Drupal, you can handle images in a way that... |
Entity framework provides great flexibility to update data in the same datacontext
Dim personA = (from p in datacontext.Person where p.PersonID = 1 select p)
personA.name = txtName.value
datacontext.savechanges()
If I have to move this Update function to Service layer which only takes "Person" in the request, what wo... | To update an entity in the Entity Framework without doing a deep copy, you can use the `Attach` method to attach the incoming `Person` object to the context. Once attached, you can mark the properties that you want to update as modified. This approach avoids the overhead of deep copying and works well in the service la... | 17,139 | [
{
"from": "human",
"value": "Entity framework provides great flexibility to update data in the same datacontext \nDim personA = (from p in datacontext.Person where p.PersonID = 1 select p)\npersonA.name = txtName.value\ndatacontext.savechanges()\n\nIf I have to move this Update function to Service layer whi... |
Ok where I work we have a fairly substantial number of systems written over the last couple of decades that we maintain.
The systems are diverse in that multiple operating systems (Linux, Solaris, Windows), Multiple Databases (Several Versions of oracle, sybase and mysql), and even multiple languages (C, C++, JSP, PHP... | You're facing a common challenge in organizations with legacy systems and a heterogeneous technology stack. Each approach you’ve outlined has its pros and cons, but your instincts about the drawbacks of database-level communication are valid. Let’s break down the considerations and potential paths forward.
### Conside... | 14,803 | [
{
"from": "human",
"value": "Ok where I work we have a fairly substantial number of systems written over the last couple of decades that we maintain. \nThe systems are diverse in that multiple operating systems (Linux, Solaris, Windows), Multiple Databases (Several Versions of oracle, sybase and mysql), and... |
What is an algorithm to compare multiple sets of numbers against a target set to determine which ones are the most "similar"?
One use of this algorithm would be to compare today's hourly weather forecast against historical weather recordings to find a day that had similar weather.
The similarity of two sets is a bit su... | To compare multiple sets of numbers against a target set and determine their similarity in a way that allows for easy comparison across different types of data (like temperature, wind speed, and precipitation), you can follow an approach that involves normalization, a similarity measure, and ranking. Here’s a step-by-s... | 15,477 | [
{
"from": "human",
"value": "What is an algorithm to compare multiple sets of numbers against a target set to determine which ones are the most \"similar\"?\nOne use of this algorithm would be to compare today's hourly weather forecast against historical weather recordings to find a day that had similar wea... |
Provide Used: Microsoft OLE DB Provider for SQL Server. Can anyone help me with this..
I was trying to connect with LLBLgen
| Certainly! To connect to SQL Server using the Microsoft OLE DB Provider with LLBLGen, you can follow these general steps:
### Step 1: Verify Prerequisites
1. **SQL Server**: Ensure that your SQL Server is running and accessible.
2. **LLBLGen**: Make sure you have LLBLGen installed and licensed.
### Step 2: Create a ... | 16,554 | [
{
"from": "human",
"value": "Provide Used: Microsoft OLE DB Provider for SQL Server. Can anyone help me with this..\nI was trying to connect with LLBLgen\n"
},
{
"from": "gpt",
"value": "Certainly! To connect to SQL Server using the Microsoft OLE DB Provider with LLBLGen, you can follow these ge... |
Edit: This question had been tagged "Tolstoy" in appreciation of the quality and length of my writing:) Just reading the first and the last paragraph should be enough:) If you tend to select and move code with the mouse, the stuff in middle could be interesting to you.
This question is about how you use text editors i... | It sounds like you're looking for efficient ways to manipulate lines of code in Visual Studio (and text editors in general) without creating blank lines. While your current method works well, there are some features and shortcuts in Visual Studio that could enhance your workflow. Here’s a summary of suggestions for del... | 14,022 | [
{
"from": "human",
"value": "Edit: This question had been tagged \"Tolstoy\" in appreciation of the quality and length of my writing:) Just reading the first and the last paragraph should be enough:) If you tend to select and move code with the mouse, the stuff in middle could be interesting to you.\nThis ... |
I would like to use the task-list in Visual Studio but it really lacks almost any useful feature a task-list should provide. So I use Todo-List externally, to keep track of the things I need to get done. Would be nice to have it all in one place.
So does anyone know of a cool replacement Add-On for the tasklist in Visu... | If you're looking for a more feature-rich task management solution integrated within Visual Studio, there are several extensions you can consider that can enhance your task-list experience:
1. **Todo +**:
- This extension provides a more advanced task-list management experience by allowing you to create, view, and ... | 14,243 | [
{
"from": "human",
"value": "I would like to use the task-list in Visual Studio but it really lacks almost any useful feature a task-list should provide. So I use Todo-List externally, to keep track of the things I need to get done. Would be nice to have it all in one place.\nSo does anyone know of a cool r... |
I need to edit the web.config file on a live Sharepoint environment, but I'm unsure what will happen if I do (I want to output custom errors).
Will this cause the IIS6 worker process to recycle?
Will active users lose their session state because of this?
Or can I safely edit the file?
| Editing the `web.config` file in a live SharePoint environment should be approached with caution. Here are some considerations regarding your questions:
1. **Will this cause the IIS6 worker process to recycle?**
Yes, modifying the `web.config` file will cause the IIS worker process to recycle. When you make changes... | 17,584 | [
{
"from": "human",
"value": "I need to edit the web.config file on a live Sharepoint environment, but I'm unsure what will happen if I do (I want to output custom errors).\nWill this cause the IIS6 worker process to recycle?\nWill active users lose their session state because of this?\nOr can I safely edit ... |
I have several types of entities, each with their own fields, which are stored in separate tables.
Each record in such a table may be connected to zero or more records in a different table, i.e., linked to records from different entity types.
If I go with lookup tables, I get (m(m-1))/2=O(m^2) separate lookup tables th... | Storing relationships between multiple entity types in a relational database can indeed become complex as the number of entity types increases. The challenge you describe, especially with potentially 50+ entity types and nearly complete links, can lead to a combinatorial explosion of lookup tables if you opt for a sepa... | 11,446 | [
{
"from": "human",
"value": "I have several types of entities, each with their own fields, which are stored in separate tables.\nEach record in such a table may be connected to zero or more records in a different table, i.e., linked to records from different entity types.\nIf I go with lookup tables, I get ... |
Okay. I know this looks like the typical "Why didn't he just Google it or go to www.unicode.org and look it up?" question, but for such a simple question the answer still eludes me after checking both sources.
I am pretty sure that all three of these encoding systems support all of the Unicode characters, but I need to... | You're correct that all three encoding systems you mentioned—UTF-8, UTF-16, and UTF-32—are capable of encoding all Unicode characters. They are all part of the Unicode standard and are designed to represent every character in the Unicode character set.
### Overview of the Encoding Systems:
1. **UTF-8**: This encoding... | 13,862 | [
{
"from": "human",
"value": "Okay. I know this looks like the typical \"Why didn't he just Google it or go to www.unicode.org and look it up?\" question, but for such a simple question the answer still eludes me after checking both sources.\nI am pretty sure that all three of these encoding systems support ... |
In order to debug an asp.net web app I have to have IE Script debugging enabled. Unfortunately, in the past week or so google's analytics javascript has developed a problem. So that when I browse to a site that has google analytics I receive the little pop up "A runtime error has occurred. Do you wish to debug?"
Yes... | Yes, you can keep script debugging enabled in Internet Explorer while suppressing the runtime error pop-up dialogs that you're encountering with Google Analytics. Here are a few strategies you can try to achieve this:
### 1. Modify Internet Explorer Settings
You can change the settings in Internet Explorer to disable ... | 15,003 | [
{
"from": "human",
"value": "In order to debug an asp.net web app I have to have IE Script debugging enabled. Unfortunately, in the past week or so google's analytics javascript has developed a problem. So that when I browse to a site that has google analytics I receive the little pop up \"A runtime error... |
I have got a C function in a static library, let's call it A, with the following interface :
int A(unsigned int a, unsigned long long b, unsigned int *y, unsigned char *z);
This function will change the value of y an z (this is for sure). I use it from within a dynamic C++ library, using extern "C".
Now, here is what ... | It seems that you've already identified the problem, but for others who might encounter a similar situation, let's recap the potential issues that could arise when interfacing between C and C++ with regard to pointer usage, especially when dealing with different data types and memory layouts.
### Common Issues to Cons... | 15,546 | [
{
"from": "human",
"value": "I have got a C function in a static library, let's call it A, with the following interface :\nint A(unsigned int a, unsigned long long b, unsigned int *y, unsigned char *z);\n\nThis function will change the value of y an z (this is for sure). I use it from within a dynamic C++ l... |
I'm using a custom winforms 2.0 designer (i.e. my apps hosting the designer) which is being used for a small internal project.
So far all the controls have their properties edited via the property grid - but I'd like to make it a little more user-friendly by allowing in-line editing - does anyone know of an example of ... | Implementing inline editing in a custom Windows Forms designer involves creating a mechanism to display a text box overlay on top of a control whenever a user wishes to edit a property, like a label's text. Here’s a step-by-step approach to achieve this:
### Steps to Implement Inline Editing
1. **Create an Overlay Te... | 15,131 | [
{
"from": "human",
"value": "I'm using a custom winforms 2.0 designer (i.e. my apps hosting the designer) which is being used for a small internal project.\nSo far all the controls have their properties edited via the property grid - but I'd like to make it a little more user-friendly by allowing in-line ed... |
I'd like to be able to (effectively) sort a database view - I know that conceptually order in a db view is invalid, but I have the following scenario to deal with:
a third-party legacy application, that reads data from database tables using a select(*) from tablename statement
the legacy application is very sensitive ... | Given your constraints with the legacy application and the inability to directly modify its SQL statements, there are a few approaches you could consider to maintain the "effective" order of records without tightly coupling your solution to a specific RDBMS:
1. **Sequence Number Column**:
- Introduce a new column ... | 15,358 | [
{
"from": "human",
"value": "I'd like to be able to (effectively) sort a database view - I know that conceptually order in a db view is invalid, but I have the following scenario to deal with:\n\na third-party legacy application, that reads data from database tables using a select(*) from tablename statemen... |
I need to write a module to detect similar documents. I have read many papers of fingerprints of documents techniques and others, but I do not know how to write code or implement such a solution. The algorithm should work for Chinese, Japanese, English and German language or be language independent. How can I accomplis... | Detecting similar documents across multiple languages, including Chinese, Japanese, English, and German, can be achieved through various techniques in natural language processing (NLP) and information retrieval. Here’s a step-by-step guide to help you build a module for detecting similar documents:
### Step 1: Text Pr... | 6,910 | [
{
"from": "human",
"value": "I need to write a module to detect similar documents. I have read many papers of fingerprints of documents techniques and others, but I do not know how to write code or implement such a solution. The algorithm should work for Chinese, Japanese, English and German language or be ... |
I am currently using Linq to NHibernate (although that is not an issue with regards to this question) to execute queries against my database and I want to be able to test whether the current IQueryable result instance has been executed or not.
The debugger knows that my IQueryable has not been 'invoked' because it tell... | In LINQ to NHibernate (as with LINQ in general), an `IQueryable` does not execute the query against the database until it is enumerated. This means that operations such as `ToList()`, `First()`, `Count()`, etc., will trigger execution.
Unfortunately, there is no built-in way in the `IQueryable` interface to check dire... | 12,731 | [
{
"from": "human",
"value": "I am currently using Linq to NHibernate (although that is not an issue with regards to this question) to execute queries against my database and I want to be able to test whether the current IQueryable result instance has been executed or not.\nThe debugger knows that my IQuerya... |
I've got two arrays of the same size. I'd like to merge the two so the values of one are the key indexes of the new array, and the values of the new array are the values of the other.
Right now I'm just looping through the arrays and creating the new array manually, but I have a feeling there is a much more elegant wa... | Yes, you can achieve this in a more elegant way without manually looping through the arrays. In PHP, you can use the `array_combine()` function to create an associative array where one array provides the keys and the other provides the values. Here's how you can do it:
```php
$array_with_keys = ['key1', 'key2', 'key3'... | 13,882 | [
{
"from": "human",
"value": "I've got two arrays of the same size. I'd like to merge the two so the values of one are the key indexes of the new array, and the values of the new array are the values of the other.\nRight now I'm just looping through the arrays and creating the new array manually, but I have... |
The code in this question made me think
assert(value>0); //Precondition
if (value>0)
{
//Doit
}
I never write the if-statement. Asserting is enough/all you can do.
"Crash early, crash often"
CodeComplete states:
The assert-statement makes the application Correct
The if-test makes the application Robust
I don't th... | Your perspective on using assertions versus input validation in programming is a common point of debate among developers. Both assertions and input validation have their place, and understanding their roles can help clarify your position. Let's break down the concepts:
### Assertions
- **Purpose**: Assertions are use... | 15,313 | [
{
"from": "human",
"value": "The code in this question made me think\nassert(value>0); //Precondition\nif (value>0)\n{\n //Doit\n}\n\nI never write the if-statement. Asserting is enough/all you can do.\n\"Crash early, crash often\"\nCodeComplete states:\n\nThe assert-statement makes the application Correct... |
I would like to check which type of RAM my computer uses before I order an upgrade. I'm fairly sure its DDR2 but I would like to double check this.
Is there any way to check this in Windows XP without opening the case up and looking?
EDIT
The content police seem to have gotten the wrong end of the stick, I was lookin... | Yes, you can check the type of RAM installed in your Windows XP computer without opening the case by using third-party software. Here are a couple of options:
### Option 1: CPU-Z
1. **Download CPU-Z**:
- Visit the [CPU-Z website](https://www.cpuid.com/softwares/cpu-z.html) and download the latest version compatib... | 16,072 | [
{
"from": "human",
"value": "I would like to check which type of RAM my computer uses before I order an upgrade. I'm fairly sure its DDR2 but I would like to double check this.\nIs there any way to check this in Windows XP without opening the case up and looking? \nEDIT \nThe content police seem to have got... |
I use eclipse for quite a lot of work, including:
multiple "utility" projects that include code that most of my java work makes use of
various plugin-related projects that I sync and use periodically (eg: the Git plugin)
plugin projects I'm actually developing
the occasional pydev / non-java project
etc...
It is beco... | Managing a complex development environment in Eclipse, especially with multiple projects and various tasks, can indeed be challenging. Here are some strategies that could help you streamline your workflow without the need for multiple workspaces:
### 1. **Use Working Sets**
Eclipse's Working Sets feature allows you to... | 16,206 | [
{
"from": "human",
"value": "I use eclipse for quite a lot of work, including:\n\nmultiple \"utility\" projects that include code that most of my java work makes use of\nvarious plugin-related projects that I sync and use periodically (eg: the Git plugin)\nplugin projects I'm actually developing\nthe occasi... |
I admit it: I don't bother with too much exception handling. I know I should do more but I can never wrap my head around where to start and where to stop. I'm not being lazy. Far from it. It's that I'm overwrought with exception handling ambivalence. It just seems that there is a seemingly infinite number of places... | It's great that you're looking to improve your exception handling strategy! Effective exception handling is crucial in building robust applications. Here are some best practices, as well as guidance on where to focus your attention when it comes to exception handling.
### Best Practices for Exception Handling
1. **Us... | 13,513 | [
{
"from": "human",
"value": "I admit it: I don't bother with too much exception handling. I know I should do more but I can never wrap my head around where to start and where to stop. I'm not being lazy. Far from it. It's that I'm overwrought with exception handling ambivalence. It just seems that there... |
How can you relatively position elements in WPF?
The standard model is to use layout managers for everything, but what if you want to position elements (on a Canvas, for example) simply based on the position of other elements?
For example, you may want one element (say a button) to be attached the side of another (perh... | In WPF, the traditional approach to layout involves using various layout containers (like `StackPanel`, `Grid`, `Canvas`, etc.) which manage the arrangement of child elements. However, you can achieve a form of relative positioning by using a `Canvas`, which allows for absolute positioning, or by using a `Grid` with sh... | 13,711 | [
{
"from": "human",
"value": "How can you relatively position elements in WPF?\nThe standard model is to use layout managers for everything, but what if you want to position elements (on a Canvas, for example) simply based on the position of other elements?\nFor example, you may want one element (say a butto... |
I use both ruby on rails and Java. I really enjoy using migrations when I am working on a rails project. so I am wondering is there a migrations like tool for Java? If there is no such tool is it a good idea to use migrations as a tool to control a database used by a Java project?
| Yes, there are tools available for managing database migrations in Java projects, similar to the way migrations are used in Ruby on Rails. Two of the most popular migration tools in the Java ecosystem are:
1. **Flyway**: Flyway is a simple and powerful database migration tool that allows you to manage versioned migrat... | 15,679 | [
{
"from": "human",
"value": "I use both ruby on rails and Java. I really enjoy using migrations when I am working on a rails project. so I am wondering is there a migrations like tool for Java? If there is no such tool is it a good idea to use migrations as a tool to control a database used by a Java proj... |
I basically need to show a wait window to the user. For this i have put two seperate window forms in the application. the first form is the main form with a button. The second one is a empty one with just a label text. On click of the button in Form1 i do the below
Form2 f = new Form2();
f.Show();
Thread.Sleep(2000);
... | The issue you're encountering is due to the fact that `Thread.Sleep(2000)` blocks the UI thread, preventing Form2 from being displayed until after the sleep period is over. This causes the label in Form2 to remain blank, as the UI has not had a chance to render it.
To display Form2 correctly while allowing it to updat... | 20,008 | [
{
"from": "human",
"value": "I basically need to show a wait window to the user. For this i have put two seperate window forms in the application. the first form is the main form with a button. The second one is a empty one with just a label text. On click of the button in Form1 i do the below \nForm2 f = n... |
I need to add a new many-to-many relationship to an existing Hibernate entity.
I do not want to touch the original Hibernate entity bean or its configuration.
What I am adding is a "tagging" feature that can be viewed as an external contribution and not part of the entity's data itself.
I want to have a simple join tab... | You can certainly implement a many-to-many relationship in Hibernate without modifying the existing entity or creating a dedicated entity for the relationship. However, whether you should go down that route depends on your future needs and the complexity of the application. Let's discuss both approaches.
### 1. Using ... | 16,264 | [
{
"from": "human",
"value": "I need to add a new many-to-many relationship to an existing Hibernate entity.\nI do not want to touch the original Hibernate entity bean or its configuration.\nWhat I am adding is a \"tagging\" feature that can be viewed as an external contribution and not part of the entity's ... |
I am writing a VC++ MFC dialog based app which requires Microsoft MapPoint embedding in it. To do this I'm using MS VC++ .NET 2003 and MapPoint Europe 2006 to do this but am having problems as when I select "Insert ActiveX Control" no MapPoint control appears in the list of options. I have tried manually registering ma... | When you're trying to embed Microsoft MapPoint in your VC++ MFC dialog-based application and the ActiveX control doesn't appear in the list when you try to insert it, there could be a few different issues at play. Here are some steps you can try to resolve the problem:
1. **Confirm Registration**: Ensure that `mappoin... | 14,808 | [
{
"from": "human",
"value": "I am writing a VC++ MFC dialog based app which requires Microsoft MapPoint embedding in it. To do this I'm using MS VC++ .NET 2003 and MapPoint Europe 2006 to do this but am having problems as when I select \"Insert ActiveX Control\" no MapPoint control appears in the list of op... |
For those of you that like puzzles: I had this problem recently and am sure there must be a nicer solution.
Consider :
an ObservableCollection of Foo objects called foos.
Foo contains a string ID field
I have no control over foos
foos will be changing
Then:
I have another collection called sortLikeThis
sortListThis ... | Yes, you can achieve the desired sorting and binding in WPF using a combination of LINQ and ObservableCollection. Here is a simple and effective solution to bind your `foos` collection in the order specified by `sortLikeThis`, while also handling any discrepancies between the two collections (i.e., IDs present in `sort... | 13,576 | [
{
"from": "human",
"value": "For those of you that like puzzles: I had this problem recently and am sure there must be a nicer solution.\nConsider :\n\nan ObservableCollection of Foo objects called foos.\nFoo contains a string ID field\nI have no control over foos\nfoos will be changing\n\nThen:\n\nI have a... |
I have an SP that takes 10 seconds to run about 10 times (about a second every time it is ran). The platform is asp .net, and the server is SQL Server 2005. I have indexed the table (not on the PK also), and that is not the issue. Some caveats:
usp_SaveKeyword is not the issue. I commented out that entire SP and it m... | Based on your description and the provided code for the stored procedure `usp_NewSearch`, it appears that the performance issue may be related to the way the stored procedure handles certain operations. Here are some possible reasons for the delay and suggestions for optimization:
1. **Parameter Sensitivity**:
- I... | 17,200 | [
{
"from": "human",
"value": "I have an SP that takes 10 seconds to run about 10 times (about a second every time it is ran). The platform is asp .net, and the server is SQL Server 2005. I have indexed the table (not on the PK also), and that is not the issue. Some caveats:\n\nusp_SaveKeyword is not the issu... |
I want to copy and paste text from a Office 2007 document (docx) into a textarea. On Window, using Firefox 3, there is additional jiberish that gets put into the field:
...Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Normal
0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer... | The issue you're experiencing is due to the way Microsoft Office formats its documents, particularly in how it includes style and formatting information when copying text. This can lead to unwanted markup being pasted into text areas or other simple text inputs.
Here are several approaches to deal with the problem, bo... | 15,970 | [
{
"from": "human",
"value": "I want to copy and paste text from a Office 2007 document (docx) into a textarea. On Window, using Firefox 3, there is additional jiberish that gets put into the field:\n...Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Normal \n0 false false false EN... |
I am looking for a toolkit that will allow me to design widgets containing 2D graphics for an elevator simulation in Java. Once created, those widgets will be integrated with SWT, Swing, or QtJambi framework.
Background information:
I am developing an Elevator Simulator for fun. My main goal is to increase my knowledg... | For creating a graphical simulation of an elevator in Java, you can use Java's built-in capabilities along with the GUI frameworks you mentioned (SWT, Swing, or QtJambi). Each of these frameworks has its strengths, so your choice might depend on your specific needs or familiarity. Below are some suggestions for each fr... | 15,916 | [
{
"from": "human",
"value": "I am looking for a toolkit that will allow me to design widgets containing 2D graphics for an elevator simulation in Java. Once created, those widgets will be integrated with SWT, Swing, or QtJambi framework.\nBackground information: \nI am developing an Elevator Simulator for f... |
Is there a way to automatically apply a theme/template/style to all controls of the targettype, so I don't have to specify Template=..., Style=... on all controls?
| Yes, in WPF (Windows Presentation Foundation), you can apply a global style to all controls of a certain type without having to specify the `Template` or `Style` property for each individual control. This can be achieved by defining a style in your application's resources, specifically within the `Application.Resources... | 15,865 | [
{
"from": "human",
"value": "Is there a way to automatically apply a theme/template/style to all controls of the targettype, so I don't have to specify Template=..., Style=... on all controls?\n"
},
{
"from": "gpt",
"value": "Yes, in WPF (Windows Presentation Foundation), you can apply a global ... |
I've looked around for a good example of this, but I haven't run into one yet. I want to pass a custom string array from java to oracle and back, using the IBATIS framework. Does anyone have a good link to an example? I'm calling stored procs from IBATIS.
Thanks
| Passing a custom string array to and from Oracle using iBATIS (or MyBatis, as it's often called now) involves a few steps. You will need to ensure that your Oracle stored procedure is set up to accept and return an array, and then map it appropriately in your iBATIS configuration.
Here’s a general outline of the steps... | 14,026 | [
{
"from": "human",
"value": "I've looked around for a good example of this, but I haven't run into one yet. I want to pass a custom string array from java to oracle and back, using the IBATIS framework. Does anyone have a good link to an example? I'm calling stored procs from IBATIS.\nThanks\n"
},
{
... |
I often use the "top" command to see what is taking up resources. Mostly it comes up with a long list of Apache httpd processes, which is not very useful. Is there any way to see a similar list, but such that I could see which PHP scripts etc. those httpd processes are actually running?
| Yes, you can see which PHP scripts are being executed by Apache's `httpd` processes by using a few different methods. Here are some options you might consider:
### 1. **Using `mod_status`**
If you have access to the Apache server configuration, you can enable the `mod_status` module, which provides a web interface th... | 12,692 | [
{
"from": "human",
"value": "I often use the \"top\" command to see what is taking up resources. Mostly it comes up with a long list of Apache httpd processes, which is not very useful. Is there any way to see a similar list, but such that I could see which PHP scripts etc. those httpd processes are actuall... |
We have the usual web.xml for our web application which includes some jsp and jsp tag files. I want to switch to using pre-compiled jsp's. I have the pre-compilation happening in the build ok, and it generates the web.xml fragment and now I want to merge the fragment into the main web.xml.
Is there an include type di... | In Java EE applications, the `web.xml` file does not support a directive similar to an "include" like you might find in JSP or other templating languages. The `web.xml` is an XML document, and XML doesn't have any built-in mechanism for including fragments or other XML documents.
To manage different configurations for... | 13,940 | [
{
"from": "human",
"value": "We have the usual web.xml for our web application which includes some jsp and jsp tag files. I want to switch to using pre-compiled jsp's. I have the pre-compilation happening in the build ok, and it generates the web.xml fragment and now I want to merge the fragment into the ... |
Given the following C function in a DLL:
char * GetDir(char* path );
How would you P/Invoke this function into C# and marshal the char * properly.
.NET seems to know how to do LPCTSTR but when I can't figure out any marshaling that doesn't cause a NotSupportedException to fire when calling this function.
| To call the C function `GetDir` which returns a `char*` in a DLL using P/Invoke in C#, you'll need to carefully marshal the string returned by the function, as well as define the function signature in C#. Here's how you can do it:
1. **Define the function signature**: You need to declare the `GetDir` function in your ... | 15,573 | [
{
"from": "human",
"value": "Given the following C function in a DLL:\nchar * GetDir(char* path );\n\nHow would you P/Invoke this function into C# and marshal the char * properly.\n.NET seems to know how to do LPCTSTR but when I can't figure out any marshaling that doesn't cause a NotSupportedException to f... |
Using Ant I could unzip an archive before proceeding with the build per-se ... Is this possible using nmake? Could I call an external application? Or even a batch script?
| Yes, in `nmake`, you can definitely call external applications or batch scripts. `nmake` allows you to execute command-line commands, which includes running executables like a unzip utility or a batch script to handle tasks like unzipping an archive before proceeding with the build.
Here’s how you can do it:
1. **Cal... | 16,557 | [
{
"from": "human",
"value": "Using Ant I could unzip an archive before proceeding with the build per-se ... Is this possible using nmake? Could I call an external application? Or even a batch script?\n"
},
{
"from": "gpt",
"value": "Yes, in `nmake`, you can definitely call external applications ... |
I'm used to working with PHP but lately I've been working with Java and I'm having a headache trying to figure this out. I want to save this representation in Java:
Array (
["col_name_1"] => Array (
1 => ["col_value_1"],
2 => ["col_value_2"],
... | Certainly! In Java, you can use a `Map` to represent the outer associative array (where you use strings as keys) and a `List` for the inner arrays (to handle dynamic sizing). For your specific use case, you can use `HashMap` for the mapping of column names to a list of values and `ArrayList` for the values associated w... | 12,385 | [
{
"from": "human",
"value": "I'm used to working with PHP but lately I've been working with Java and I'm having a headache trying to figure this out. I want to save this representation in Java:\n\nArray ( \n [\"col_name_1\"] => Array ( \n 1 => [\"col_value_1\"], \n ... |
I'm working with a webservice that offers almost duplicated code across two namesspaces. Lets say for example PigFeet and HorseFeet, both namespaces contain a Feet class and other code that works with the Feet class requires it to be part of that same namespace.
Right now In my code I'm forced to do something like thi... | In C#, you cannot dynamically choose a namespace at runtime in the way you're trying to do. However, you can refactor your code to reduce duplication by using interfaces or a common base class. This way, you can treat both `PigFeet.Feet` and `HorseFeet.Feet` polymorphically.
### Approach 1: Using Interfaces
1. Define... | 15,622 | [
{
"from": "human",
"value": "I'm working with a webservice that offers almost duplicated code across two namesspaces. Lets say for example PigFeet and HorseFeet, both namespaces contain a Feet class and other code that works with the Feet class requires it to be part of that same namespace.\nRight now In m... |
I have recently changed an application from storing the database username and password in a configuration file (gasp password stored in plain text in a config file).
The application now asks the user to type in her username and password before it can continue.
The new version of the application now has to interrogate t... | When working with Sybase JConnect JDBC drivers, you are correct that the error codes returned by `SQLException.getErrorCode()` can be vendor-specific. Unfortunately, the official Sybase documentation may not always list all the possible error codes in detail, especially for specific versions.
For Sybase databases, som... | 12,602 | [
{
"from": "human",
"value": "I have recently changed an application from storing the database username and password in a configuration file (gasp password stored in plain text in a config file).\nThe application now asks the user to type in her username and password before it can continue.\nThe new version ... |
I'm using the standard ConsoleHandler from java.util.logging and by default the console output is directed to the error stream (i.e. System.err).
How do I change the console output to the output stream (i.e. System.out)?
| To change the console output of the `ConsoleHandler` in Java's `java.util.logging` package from the error stream (i.e., `System.err`) to the output stream (i.e., `System.out`), you can follow these steps:
1. Obtain the default `ConsoleHandler` instance.
2. Change its output stream to `System.out`.
Here is an example ... | 18,077 | [
{
"from": "human",
"value": "I'm using the standard ConsoleHandler from java.util.logging and by default the console output is directed to the error stream (i.e. System.err).\nHow do I change the console output to the output stream (i.e. System.out)?\n"
},
{
"from": "gpt",
"value": "To change th... |
I have a type (System.Type) of an enum and a string containing enumeration value to set.
E.g. given:
enum MyEnum { A, B, C };
I have typeof(MyEnum) and "B".
How do I create MyEnum object set to MyEnum.B?
| You can convert a string representation of an enum value to an enum object using the `Enum.Parse` method in C#. Here's how you can do it:
```csharp
using System;
public enum MyEnum { A, B, C }
public class Program
{
public static void Main(string[] args)
{
Type enumType = typeof(MyEnum);
stri... | 15,876 | [
{
"from": "human",
"value": "I have a type (System.Type) of an enum and a string containing enumeration value to set.\nE.g. given: \nenum MyEnum { A, B, C };\n\nI have typeof(MyEnum) and \"B\".\nHow do I create MyEnum object set to MyEnum.B?\n"
},
{
"from": "gpt",
"value": "You can convert a str... |
Using add(new Include()) syntax, I was able to include jsps which are at the top level.
However those which are present inside 'WEB-INF' cannot be referenced, is there any way to achieve this?
| In a Java Servlet-based web application using JSPs, resources located within the `WEB-INF` directory are protected and cannot be accessed directly via a URL. However, you can still include JSPs located in `WEB-INF` using server-side code, typically within a servlet or another JSP.
Here's how you can include a JSP file... | 16,787 | [
{
"from": "human",
"value": "Using add(new Include()) syntax, I was able to include jsps which are at the top level. \nHowever those which are present inside 'WEB-INF' cannot be referenced, is there any way to achieve this?\n"
},
{
"from": "gpt",
"value": "In a Java Servlet-based web application... |
I want to make a .NET Form as a TopMost Form for another external App (not .NET related, pure Win32) so it stays above that Win32App, but not the rest of the apps running.
I Have the handle of the Win32App (provided by the Win32App itself), and I've tried Win32 SetParent() function, via P/Invoke in C#, but then my .NET... | To make a .NET Form stay above a specific external Win32 application while not being the topmost for all applications, you can use the Windows API to set the Z-order of your form relative to the external application window. You cannot use `SetParent` for your scenario, since that confines your window within the other a... | 12,603 | [
{
"from": "human",
"value": "I want to make a .NET Form as a TopMost Form for another external App (not .NET related, pure Win32) so it stays above that Win32App, but not the rest of the apps running.\nI Have the handle of the Win32App (provided by the Win32App itself), and I've tried Win32 SetParent() func... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.