instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I want to have my PHP application labeled with the revision number which it uses, but I don't want to use CruiseControl or update a file and upload it every time. How should I do it?
| If you want to label your PHP application with a revision number without using a continuous integration tool like CruiseControl or manually updating a file each time, you can consider the following approaches:
### 1. Use Version Control System Tags
If you're using a version control system like Git, you can use tags t... | 11,519 | [
{
"from": "human",
"value": "I want to have my PHP application labeled with the revision number which it uses, but I don't want to use CruiseControl or update a file and upload it every time. How should I do it?\n"
},
{
"from": "gpt",
"value": "If you want to label your PHP application with a re... |
I am looking for basic examples/tutorials on:
How to write/compile libraries in C++ (.so files for Linux, .dll files for Windows).
How to import and use those libraries in other code.
| Sure! Here are basic examples and tutorials on how to write, compile, and use libraries in C++ for both Linux (.so files) and Windows (.dll files).
### 1. Creating a Shared Library in C++ for Linux (.so files)
**Step 1: Create the Library Source Code**
Create a file named `mylib.cpp`:
```cpp
// mylib.cpp
#include <... | 5,490 | [
{
"from": "human",
"value": "I am looking for basic examples/tutorials on:\n\nHow to write/compile libraries in C++ (.so files for Linux, .dll files for Windows).\nHow to import and use those libraries in other code.\n\n"
},
{
"from": "gpt",
"value": "Sure! Here are basic examples and tutorials ... |
When constructing an ArgumentException, a couple of the overloads take a string that is the invalid argument's parameter name. I figure it would be nice to not have to remember to update this ctor param whenever I change the method's param name. Is there a simple way to do this using reflection?
Update: thanks to the 2... | To construct an `ArgumentException` while ensuring that you reference the parameter name in a more maintainable way, you can create a utility function that uses reflection to find the parameter name dynamically based on the value passed. This way, if you change the method's parameter name, you still have a reference to... | 10,972 | [
{
"from": "human",
"value": "When constructing an ArgumentException, a couple of the overloads take a string that is the invalid argument's parameter name. I figure it would be nice to not have to remember to update this ctor param whenever I change the method's param name. Is there a simple way to do this ... |
I want to be able to create a VMWare image, by specifying the components that should go into it, preferably in a script, and then get VMWare, or some third process, to build the machine from the specs.
So I want to be able to say eg.
OS - Windows 2003, Apps - Visual Studio etc, and then it builds the machine automatica... | Creating a VMware image based on a specified configuration can be achieved by automating the process using tools and scripts. While VMware itself does not directly support creating images purely from a high-level specification out of the box, you can build a workflow using various tools and techniques. Here are some ap... | 8,287 | [
{
"from": "human",
"value": "I want to be able to create a VMWare image, by specifying the components that should go into it, preferably in a script, and then get VMWare, or some third process, to build the machine from the specs.\nSo I want to be able to say eg.\nOS - Windows 2003, Apps - Visual Studio etc... |
I have a flash app (SWF) running Flash 8 embedded in an HTML page. How do I get flash to reload the parent HTML page it is embedded in? I've tried using ExternalInterface to call a JavaScript function to reload the page but that doesn't seem to work.
| If you're using a Flash (SWF) application embedded in an HTML page and you're trying to reload the parent page using ActionScript and ExternalInterface, you should ensure that you're setting it up correctly. Below are the steps and a sample code snippet to help you achieve this:
1. **Ensure ExternalInterface is availa... | 9,747 | [
{
"from": "human",
"value": "I have a flash app (SWF) running Flash 8 embedded in an HTML page. How do I get flash to reload the parent HTML page it is embedded in? I've tried using ExternalInterface to call a JavaScript function to reload the page but that doesn't seem to work.\n... |
Since the Google App Engine Datastore is based on Bigtable and we know that's not a relational database, how do you design a database schema/data model for applications that use this type of database system?
| Designing a schema for a non-relational database system like Google App Engine's Datastore, which is based on Bigtable, requires a different approach than traditional relational databases. Here are some key principles and strategies for effective data modeling in such systems:
### 1. Understand the Data Access Pattern... | 9,322 | [
{
"from": "human",
"value": "Since the Google App Engine Datastore is based on Bigtable and we know that's not a relational database, how do you design a database schema/data model for applications that use this type of database system?\n"
},
{
"from": "gpt",
"value": "Designing a schema for a n... |
Does anyone know of a library or bit of code that converts British English to American English and vice versa?
I don't imagine there's too many differences (some examples that come to mind are doughnut/donut, colour/color, grey/gray, localised/localized) but it would be nice to be able to provide localised site content... | There are indeed several libraries and tools that can help you convert text between British English and American English. Here are a few options you might consider:
### Python Libraries
1. **TextBlob**: While primarily a library for natural language processing, you can use it in conjunction with a custom dictionary t... | 12,413 | [
{
"from": "human",
"value": "Does anyone know of a library or bit of code that converts British English to American English and vice versa?\nI don't imagine there's too many differences (some examples that come to mind are doughnut/donut, colour/color, grey/gray, localised/localized) but it would be nice to... |
We distribute an application that uses an MS Access .mdb file. Somebody has noticed that after opening the file in MS Access the file size shrinks a lot. That suggests that the file is a good candidate for compacting, but we don't supply the means for our users to do that.
So, my question is, does it matter? Do we... | Yes, it does matter if the MS Access database (.mdb file) is not regularly compacted. Here are some reasons why compacting is important and what bad things can happen if users never perform this maintenance:
1. **File Size Increase**: As users add, modify, and delete records in the database, the file can become fragme... | 13,638 | [
{
"from": "human",
"value": "We distribute an application that uses an MS Access .mdb file. Somebody has noticed that after opening the file in MS Access the file size shrinks a lot. That suggests that the file is a good candidate for compacting, but we don't supply the means for our users to do that.\n... |
What's needed to succesfully make a crossdomain call from Silverlight?
| Making a cross-domain call from Silverlight requires specific configurations due to security restrictions in the Silverlight environment. Here's what you need to successfully implement a cross-domain call:
### 1. Cross-Domain Policy File
The server you are trying to access must provide a cross-domain policy file (`cl... | 8,806 | [
{
"from": "human",
"value": "What's needed to succesfully make a crossdomain call from Silverlight?\n"
},
{
"from": "gpt",
"value": "Making a cross-domain call from Silverlight requires specific configurations due to security restrictions in the Silverlight environment. Here's what you need to s... |
This is ASP classic, not .Net. We have to get a way to SFTP into a server to upload and download a couple of files, kicked off by a user.
What have other people used to do SFTP in ASP classic? Not necessarily opposed to purchasing a control.
| Using SFTP (Secure File Transfer Protocol) in ASP Classic can be a bit challenging since ASP Classic doesn't natively support SFTP. However, there are a few approaches you can take to achieve this functionality. Below are some methods that others have successfully utilized:
### 1. **Using WinSCP Command Line**
One of ... | 3,065 | [
{
"from": "human",
"value": "This is ASP classic, not .Net. We have to get a way to SFTP into a server to upload and download a couple of files, kicked off by a user.\nWhat have other people used to do SFTP in ASP classic? Not necessarily opposed to purchasing a control.\n"
},
{
"from": "gpt",
... |
I am working on a small application in VB.NET. The program needs administrator privilege for doing some tasks. Is there a way to ask for administrator privileges during the execution if the program?
What is the general way of changing the user account under which the application is running?
| In VB.NET, if you need to elevate your application's privileges to run as an administrator, you generally do this at the startup of the application rather than during execution. This is due to the way Windows handles User Account Control (UAC) and security contexts. Once a process is started with a certain user account... | 8,968 | [
{
"from": "human",
"value": "I am working on a small application in VB.NET. The program needs administrator privilege for doing some tasks. Is there a way to ask for administrator privileges during the execution if the program?\nWhat is the general way of changing the user account under which the applicatio... |
I'm trying to redirect requests for a wildcard domain to a sub-directory.
ie. something.blah.example.com --> blah.example.com/something
I don't know how to get the subdomain name to use in the rewrite rule.
Final Solution:
RewriteCond %{HTTP_HOST} !^blah\.example\.com
RewriteCond %{HTTP_HOST} ^([^.]+)
RewriteRule ^(.*)... | You're on the right track with your RewriteCond and RewriteRule for redirecting requests from a wildcard subdomain to a subdirectory. Below is a concise explanation and the final solution you've proposed, along with some context for clarity.
### Explanation:
1. **RewriteCond %{HTTP_HOST} !^blah\.example\.com**: This ... | 13,351 | [
{
"from": "human",
"value": "I'm trying to redirect requests for a wildcard domain to a sub-directory.\nie. something.blah.example.com --> blah.example.com/something\nI don't know how to get the subdomain name to use in the rewrite rule.\nFinal Solution:\nRewriteCond %{HTTP_HOST} !^blah\\.example\\.com\nRew... |
I am looking for a good primer or technical description of the System Call mechanism that is used by operating systems to transition from user space to the kernel to invoke functions such as "open", "read", "write", etc...
Is there anything other than the Wikipedia entry?
Websites, pdfs, books, source code, all are wel... | Certainly! The system call mechanism is a fundamental aspect of operating systems, enabling user applications to request services from the kernel. Here are some resources you can explore to gain a deeper understanding of system calls:
### Books:
1. **"Operating System Concepts" by Abraham Silberschatz, Peter B. Galvin... | 9,903 | [
{
"from": "human",
"value": "I am looking for a good primer or technical description of the System Call mechanism that is used by operating systems to transition from user space to the kernel to invoke functions such as \"open\", \"read\", \"write\", etc...\nIs there anything other than the Wikipedia entry?... |
We all know that prepared statements are one of the best way of fending of SQL injection attacks. What is the best way of creating a prepared statement with an "IN" clause. Is there an easy way to do this with an unspecified number of values? Take the following query for example.
SELECT ID,Column1,Column2 FROM MyTab... | In SQL Server, and particularly in older versions like SQL Server 2000, there is no native support for passing an array directly into an `IN` clause using a parameterized query. The parameterized queries in SQL Server expect individual values for each parameter, and there's no way to use a single parameter to represent... | 9,816 | [
{
"from": "human",
"value": "We all know that prepared statements are one of the best way of fending of SQL injection attacks. What is the best way of creating a prepared statement with an \"IN\" clause. Is there an easy way to do this with an unspecified number of values? Take the following query for ex... |
I want to get the size of an http:/.../file before I download it. The file can be a webpage, image, or a media file. Can this be done with HTTP headers? How do I download just the file HTTP header?
| Yes, you can get the size of a file available at a specific URL before downloading it by making a request for just the HTTP headers. This is typically done using the HTTP `HEAD` method, which retrieves the headers without the body of the response (the actual content of the file).
### Using cURL
One common way to do t... | 12,183 | [
{
"from": "human",
"value": "I want to get the size of an http:/.../file before I download it. The file can be a webpage, image, or a media file. Can this be done with HTTP headers? How do I download just the file HTTP header?\n"
},
{
"from": "gpt",
"value": "Yes, you can get the size of a file ... |
We have a project that generates a code snippet that can be used on various other projects. The purpose of the code is to read two parameters from the query string and assign them to the "src" attribute of an iframe.
For example, the page at the URL http://oursite/Page.aspx?a=1&b=2 would have JavaScript in it to read t... | Given your requirements, you can ensure a more secure way to handle the query string parameters in JavaScript without relying on third-party libraries. Since you have specific constraints on the values of the parameters (i.e., one must be "P" followed by 9 integers and the other must be a 15-character alphanumeric stri... | 11,187 | [
{
"from": "human",
"value": "We have a project that generates a code snippet that can be used on various other projects. The purpose of the code is to read two parameters from the query string and assign them to the \"src\" attribute of an iframe.\nFor example, the page at the URL http://oursite/Page.aspx?a... |
I would like to know your experience when you need to take over somebody else's software project - more so when the original software developer has already resigned.
| Taking over someone else's software project can be a challenging but rewarding experience. Here are some common steps and considerations that can help make the transition smoother:
1. **Gather Documentation**: Look for any existing documentation related to the project. This can include architectural diagrams, API docu... | 10,574 | [
{
"from": "human",
"value": "I would like to know your experience when you need to take over somebody else's software project - more so when the original software developer has already resigned.\n"
},
{
"from": "gpt",
"value": "Taking over someone else's software project can be a challenging but... |
For the following HTML:
<form name="myForm">
<label>One<input name="area" type="radio" value="S" /></label>
<label>Two<input name="area" type="radio" value="R" /></label>
<label>Three<input name="area" type="radio" value="O" /></label>
<label>Four<input name="area" type="radio" value="U" /></labe... | Certainly! If you want to modify the JavaScript code to use `bind()` and better structure the handling of the radio button clicks while still achieving the same result, you can follow this approach. This method will use the `bind()` function to ensure that the context of the `this` keyword inside the `radioClicks` func... | 10,913 | [
{
"from": "human",
"value": "For the following HTML:\n<form name=\"myForm\">\n <label>One<input name=\"area\" type=\"radio\" value=\"S\" /></label>\n <label>Two<input name=\"area\" type=\"radio\" value=\"R\" /></label>\n <label>Three<input name=\"area\" type=\"radio\" value=\"O\" /></label>\... |
I have a side project I do = in Java. It's a pretty straight-forward webapp. It runs in Tomcat on a Linux Server and uses a MySQL database. The majority of the code was written with the Spring Framework. It has a lot of Unit Tests in place. When I'm coding it's in Eclipse. When I deploy the application I run a few sh... | Your current project setup sounds quite typical for a Java web application, especially when using the Spring Framework. There are several reasons why adopting Maven could be beneficial for you, especially as your project evolves and potentially scales in complexity. Let's explore some advantages of using Maven, particu... | 10,216 | [
{
"from": "human",
"value": "I have a side project I do = in Java. It's a pretty straight-forward webapp. It runs in Tomcat on a Linux Server and uses a MySQL database. The majority of the code was written with the Spring Framework. It has a lot of Unit Tests in place. When I'm coding it's in Eclipse. Whe... |
I opened up my compiled Hello World Obj-C application in a text editor and, to my surprise, I found about 8 kilobytes of 00 00 00 00 00 00 00 00 ....
Why are these here? Is there a way to clear out these zeroes (which I doubt have too much function)?
Obviously it's not so important in this file, seeing as it's only 16... | The zeros you're seeing in your compiled Objective-C application are likely a result of how executables are structured and compiled by the compiler and linker. Here's a breakdown of the reasons for the presence of these zero bytes and the implications:
### Reasons for Zero Bytes:
1. **Alignment and Padding**: Executab... | 11,417 | [
{
"from": "human",
"value": "I opened up my compiled Hello World Obj-C application in a text editor and, to my surprise, I found about 8 kilobytes of 00 00 00 00 00 00 00 00 ....\nWhy are these here? Is there a way to clear out these zeroes (which I doubt have too much function)?\nObviously it's not so imp... |
I have a virtual machine (VMware) with Mercury Quick Test Professional 9.2 installed. I have a script to test an application, written in VB.NET using the Infragistics library.
If I access this virtual machine using my laptop (using Remote Desktop), everything works fine, the script completes without a problem. My lapto... | It sounds like you're encountering an issue that may stem from differences in how the Remote Desktop connections are handling screen resolution, UI elements, or even timing in your script execution. Here are several troubleshooting steps and considerations that could help resolve the issue:
1. **Screen Resolution and ... | 11,113 | [
{
"from": "human",
"value": "I have a virtual machine (VMware) with Mercury Quick Test Professional 9.2 installed. I have a script to test an application, written in VB.NET using the Infragistics library.\nIf I access this virtual machine using my laptop (using Remote Desktop), everything works fine, the sc... |
I'm starting to learn Python and I've come across generator functions, those that have a yield statement in them. I want to know what types of problems that these functions are really good at solving.
| Generator functions in Python are powerful tools that can be very effective for solving specific types of problems. Here are several scenarios where using generators can be particularly beneficial:
1. **Large Data Sets**: If you're dealing with large data sets that may not fit into memory all at once, generators allow... | 10,773 | [
{
"from": "human",
"value": "I'm starting to learn Python and I've come across generator functions, those that have a yield statement in them. I want to know what types of problems that these functions are really good at solving.\n"
},
{
"from": "gpt",
"value": "Generator functions in Python ar... |
I'm getting an error message when I try to build my project in eclipse:
The type weblogic.utils.expressions.ExpressionMap cannot be resolved. It is indirectly referenced
from required .class files
I've looked online for a solution and cannot find one (except for those sites that make you pay for help). Anyone have a... | The error message you are encountering in Eclipse indicates that your project is missing a required class (`weblogic.utils.expressions.ExpressionMap`) that is indirectly referenced from other classes in your project. This typically happens when you have a dependency in your project that relies on a specific library (in... | 9,595 | [
{
"from": "human",
"value": "I'm getting an error message when I try to build my project in eclipse:\nThe type weblogic.utils.expressions.ExpressionMap cannot be resolved. It is indirectly referenced \n from required .class files\nI've looked online for a solution and cannot find one (except for those sites... |
After a bind a method to an event of a Tkinter element is there a way to get the method back?
>>> root = Tkinter.Tk()
>>> frame = Tkinter.Frame(root, width=100, height=100)
>>> frame.bind('<Button-1>', lambda e: pprint('Click')) # function needed
>>> frame.pack()
>>> bound_event_method = frame.???
| In Tkinter, when you bind an event to a widget, you can indeed retrieve the binding later, but it's a bit indirect since Tkinter doesn't provide a direct way to access the lambda function or method that was bound to the event.
However, you can use the `bind` method to get the current bindings for a given event. The `... | 11,355 | [
{
"from": "human",
"value": "After a bind a method to an event of a Tkinter element is there a way to get the method back?\n>>> root = Tkinter.Tk()\n>>> frame = Tkinter.Frame(root, width=100, height=100)\n>>> frame.bind('<Button-1>', lambda e: pprint('Click')) # function needed\n>>> frame.pack()\n>>> bound_... |
Say you want to generate a matched list of identifiers and strings
enum
{
NAME_ONE,
NAME_TWO,
NAME_THREE
};
myFunction(NAME_ONE, "NAME_ONE");
myFunction(NAME_TWO, "NAME_TWO");
myFunction(NAME_THREE, "NAME_THREE");
..without repeating yourself, and without auto-generating the code, using C/C++ macros
Initial guess:
Yo... | You're on the right track with using macros to avoid repetition, but you're correct in noting that C/C++ preprocessor macros do not allow you to directly substitute parameters within string literals in a straightforward way. However, you can achieve your goal by combining macros with string concatenation techniques or ... | 10,918 | [
{
"from": "human",
"value": "Say you want to generate a matched list of identifiers and strings\nenum\n{\nNAME_ONE,\nNAME_TWO,\nNAME_THREE\n};\n\nmyFunction(NAME_ONE, \"NAME_ONE\");\nmyFunction(NAME_TWO, \"NAME_TWO\");\nmyFunction(NAME_THREE, \"NAME_THREE\");\n\n..without repeating yourself, and without aut... |
I have written an assembly I don't want other people to be able to use. My assembly is signed with a strong name key file, but how do I secure the code so that only my other assemblies signed with the same key can call the members in this assembly?
| To secure your assembly so that only other assemblies signed with the same strong name key can access its members, you can use the `InternalsVisibleTo` attribute along with strong naming. This allows you to expose internal members to specific assemblies.
Here’s how you can achieve this:
1. **Make Your Members Interna... | 10,904 | [
{
"from": "human",
"value": "I have written an assembly I don't want other people to be able to use. My assembly is signed with a strong name key file, but how do I secure the code so that only my other assemblies signed with the same key can call the members in this assembly?\n"
},
{
"from": "gpt",... |
What is the difference between Views and Materialized Views in Oracle?
| In Oracle, both views and materialized views are used to simplify data access and improve query performance, but they differ significantly in how they work and their usage.
### Views
1. **Definition**: A view is a virtual table that is based on the result of a SELECT query. It does not store the data itself but provid... | 10,582 | [
{
"from": "human",
"value": "What is the difference between Views and Materialized Views in Oracle?\n"
},
{
"from": "gpt",
"value": "In Oracle, both views and materialized views are used to simplify data access and improve query performance, but they differ significantly in how they work and the... |
I'm looking to learn about embedded programming (in C mainly, but I hope to brush up on my ASM as well) and I was wondering what the best platform would be. I have some experience in using Atmel AVR's and programming them with the stk500 and found that to be relatively easy. I especially like AVR Studio and the debugge... | It's great that you're interested in embedded programming and want to expand your skills, especially considering the relevance of ARM in the industry. Here’s a structured approach to help you get started:
### 1. **Choosing a Platform**
**ARM Microcontrollers:**
ARM is indeed a prevalent architecture in the industry. ... | 7,646 | [
{
"from": "human",
"value": "I'm looking to learn about embedded programming (in C mainly, but I hope to brush up on my ASM as well) and I was wondering what the best platform would be. I have some experience in using Atmel AVR's and programming them with the stk500 and found that to be relatively easy. I e... |
I need to diff two log files but ignore the time stamp part of each line (the first 12 characters to be exact). Is there a good tool, or a clever awk command, that could help me out?
| You can use the `diff` command in combination with `awk` to ignore the timestamp part of each line. Here's a simple command that will help you achieve that:
```bash
diff <(awk '{print substr($0, 13)}' file1.log) <(awk '{print substr($0, 13)}' file2.log)
```
### Explanation:
- `awk '{print substr($0, 13)}' file1.log`... | 10,384 | [
{
"from": "human",
"value": "I need to diff two log files but ignore the time stamp part of each line (the first 12 characters to be exact). Is there a good tool, or a clever awk command, that could help me out?\n"
},
{
"from": "gpt",
"value": "You can use the `diff` command in combination with... |
We're in an early stage of a new web project. The project will grow and become complex over time. From the beginning we will have unit and integration tests using JUnit and system tests using HtmlUnit. We might also add some static code analysis tools to the build process if they prove to be of value to us.
If you're o... | Involving Continuous Integration (CI) in a Java web project, especially one that's expected to grow and become more complex, is a wise choice. Here are some widely used CI tools, their advantages, and considerations for your project:
### Recommended CI Tools
1. **Jenkins**
- **Overview**: Open-source automation se... | 9,045 | [
{
"from": "human",
"value": "We're in an early stage of a new web project. The project will grow and become complex over time. From the beginning we will have unit and integration tests using JUnit and system tests using HtmlUnit. We might also add some static code analysis tools to the build process if the... |
Referenced here and here...Why would I use two's complement over an epsilon method? It seems like the epsilon method would be good enough for most cases.
Update: I'm purely looking for a theoretical reason why you'd use one over the other. I've always used the epsilon method.
Has anyone used the 2's complement comp... | Two's complement and epsilon methods are both used to handle numerical representations and comparisons in computing, particularly in the context of binary representation of signed integers (two's complement) versus floating-point comparisons (epsilon method). Here's a theoretical comparison of the two methods and reaso... | 9,316 | [
{
"from": "human",
"value": "Referenced here and here...Why would I use two's complement over an epsilon method? It seems like the epsilon method would be good enough for most cases.\n\nUpdate: I'm purely looking for a theoretical reason why you'd use one over the other. I've always used the epsilon meth... |
I have a couple databases on a shared SQL Server 2005 cluster instance, that I would like performance metrics on. I have some processes that run for a very long time and suspect that code inefficiencies, rather than insufficient hardware are to blame.
I would like some way to get these performance metrics so that I can... | To diagnose performance issues in SQL Server 2005 and gather metrics that can help determine if inefficiencies in your SQL code are the cause of long-running processes, you can utilize several built-in features and tools. Here are some steps you can take:
### 1. **SQL Server Profiler**
SQL Server Profiler allows you t... | 9,204 | [
{
"from": "human",
"value": "I have a couple databases on a shared SQL Server 2005 cluster instance, that I would like performance metrics on. I have some processes that run for a very long time and suspect that code inefficiencies, rather than insufficient hardware are to blame.\nI would like some way to g... |
I need to accept form data to a WCF-based service. Here's the interface:
[OperationContract]
[WebInvoke(UriTemplate = "lead/inff",
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
int Inff(Stream input);
Here's the implementation (sample - no error handling and other safeguards):
public int Inff(Stream input)
{
... | Yes, there are better approaches to handle form data in a WCF service without manually parsing the incoming stream. You can leverage the data contract features provided by WCF for more structured and type-safe handling of your input data.
Instead of passing a `Stream`, you can define a data contract class that represe... | 13,198 | [
{
"from": "human",
"value": "I need to accept form data to a WCF-based service. Here's the interface:\n[OperationContract]\n[WebInvoke(UriTemplate = \"lead/inff\",\n BodyStyle = WebMessageBodyStyle.WrappedRequest)]\nint Inff(Stream input); \n\nHere's the implementation (sample - no error handling and oth... |
I'm looking for some kind of a resource (website) that would list all possible window/dialog frame styles and their respective combinations with images. I'm only really interested in Vista, as my software won't support older platforms anyway.
I have a more specific case here too: I'm wondering if there are other ways t... | For resources related to Windows GUI design, particularly for Windows Vista, you can explore the following:
1. **Microsoft Documentation**: The official Microsoft documentation, particularly the Windows User Experience Interaction Guidelines, is a good starting point. It provides insights on window styles, including d... | 11,691 | [
{
"from": "human",
"value": "I'm looking for some kind of a resource (website) that would list all possible window/dialog frame styles and their respective combinations with images. I'm only really interested in Vista, as my software won't support older platforms anyway.\nI have a more specific case here to... |
Currently, I have some basic code to play a simple tone whenever a button is pressed in the command item menu.
Using: Manager.playTone(note, duration, volume);
I also have a blackberry that I'm testing this same midlet on and the sound works fine. So, is this something specific to Nokia phones that aren't allowing me ... | It seems that you're experiencing issues with audio playback on Nokia phones while the same code works on a BlackBerry device. Here are a few things you might want to consider:
1. **Device Capabilities**: Different devices have different multimedia capabilities. Make sure that the Nokia device supports audio playback ... | 11,329 | [
{
"from": "human",
"value": "Currently, I have some basic code to play a simple tone whenever a button is pressed in the command item menu.\nUsing: Manager.playTone(note, duration, volume);\nI also have a blackberry that I'm testing this same midlet on and the sound works fine. So, is this something specif... |
Can anyone give me some pointers on how to display the results of an XPath query in a textbox using code (C#)? My datascource seems to (re)bind correctly once the XPath query has been applied, but I cannot find how to get at the resulting data.
Any help would be greatly appreciated.
| Certainly! To display the results of an XPath query in a textbox using C#, you generally follow these steps:
1. Load the XML data into an `XmlDocument` or `XDocument` (if you're using LINQ to XML).
2. Execute the XPath query to get the desired nodes.
3. Extract the text values from the resulting nodes.
4. Display the ... | 11,167 | [
{
"from": "human",
"value": "Can anyone give me some pointers on how to display the results of an XPath query in a textbox using code (C#)? My datascource seems to (re)bind correctly once the XPath query has been applied, but I cannot find how to get at the resulting data.\nAny help would be greatly apprec... |
Is there a way to prevent VS2008 creating browse info file files for C++ projects.
I rarely use the class browser and it isn't worth the time it takes to recreate it after every build, especially since it runs even if the build failed.
EDIT - it's also needed for go to declaration/definition
| In Visual Studio 2008, the generation of browse information files can indeed be a time-consuming process, especially for larger projects. However, if you don't use the class browser often and want to avoid the overhead of creating these files, there are a few steps you can take to disable or manage the creation of brow... | 14,064 | [
{
"from": "human",
"value": "Is there a way to prevent VS2008 creating browse info file files for C++ projects.\nI rarely use the class browser and it isn't worth the time it takes to recreate it after every build, especially since it runs even if the build failed.\nEDIT - it's also needed for go to declara... |
I have a table which is referenced by foreign keys on many other tables. In my program if I want to delete one of these rows I need to first search for dependencies and present them to the user - "This object depends on x from table y, z from table q, etc". I also expect the number of tables which have foreign keys to ... | Using the `information_schema` database to retrieve information about foreign key dependencies is a valid approach, especially in situations where the relationships between tables might change over time. However, querying `information_schema` can sometimes be slower than expected due to the way database systems manage ... | 9,659 | [
{
"from": "human",
"value": "I have a table which is referenced by foreign keys on many other tables. In my program if I want to delete one of these rows I need to first search for dependencies and present them to the user - \"This object depends on x from table y, z from table q, etc\". I also expect the n... |
I am attempting to get the Resharper test runner to recognize my MSTest unit tests via Gallio.
I have the following installed:
VSTS 2005 8.0.50727.762
Resharper 4.1
Gallio 3.0.0.285
I am also running Windows XP x64.
The unit test options only shows NUnit as being available. I am thinking that I must have some versionin... | It seems like you're on the right track, but you're encountering some issues with the integration between ReSharper, Gallio, and MSTest. Here are some steps you can take to troubleshoot and resolve the issue:
1. **MSTest Installation**: Ensure that MSTest is correctly installed with your Visual Studio Team System (VST... | 9,743 | [
{
"from": "human",
"value": "I am attempting to get the Resharper test runner to recognize my MSTest unit tests via Gallio.\nI have the following installed:\nVSTS 2005 8.0.50727.762\nResharper 4.1\nGallio 3.0.0.285\nI am also running Windows XP x64.\nThe unit test options only shows NUnit as being available... |
See title. By lightweight markup I mean something like markdown or wikitext.
| Here are some popular lightweight markup languages that you can use:
1. **Markdown**:
- A simple and widely-used lightweight markup language.
- Commonly used on platforms like GitHub, Reddit, and Stack Overflow.
- Example Syntax:
```markdown
# Heading 1
## Heading 2
### Heading 3
**B... | 9,911 | [
{
"from": "human",
"value": "See title. By lightweight markup I mean something like markdown or wikitext.\n"
},
{
"from": "gpt",
"value": "Here are some popular lightweight markup languages that you can use:\n\n1. **Markdown**:\n - A simple and widely-used lightweight markup language.\n - Co... |
I am in need of a way to mute a specific application in Vista.
Example: Mute just Firefox, but not all of the other application. Much similar to muting a specific program from within the volume mixer in vista.
If there is a program that will do this, i would appreciate that. Otherwise if there is a way to do this, I... | In Windows Vista, the built-in Volume Mixer allows you to mute or adjust the volume for individual applications. However, if you are looking for a way to automate the muting of a specific application like Firefox, you can achieve this through some third-party software or by writing a small application using .NET.
### ... | 7,292 | [
{
"from": "human",
"value": "I am in need of a way to mute a specific application in Vista.\nExample: Mute just Firefox, but not all of the other application. Much similar to muting a specific program from within the volume mixer in vista. \nIf there is a program that will do this, i would appreciate that.... |
Is there a more concise/standard idiom (e.g., a JDK method) for "piping" an input to an output in Java than the following?
public void pipe(Reader in, Writer out) {
CharBuffer buf = CharBuffer.allocate(DEFAULT_BUFFER_SIZE);
while (in.read(buf) >= 0 ) {
out.append(buf.flip());
buf.clear();
}
... | Yes, there is a more concise and standard way to "pipe" an input to an output in Java, particularly when dealing with `InputStream` and `OutputStream`. The `java.nio.file.Files` class provides methods that can simplify this process greatly.
If you're working with `Reader` and `Writer`, however, you may not find a dire... | 10,829 | [
{
"from": "human",
"value": "Is there a more concise/standard idiom (e.g., a JDK method) for \"piping\" an input to an output in Java than the following?\npublic void pipe(Reader in, Writer out) {\n CharBuffer buf = CharBuffer.allocate(DEFAULT_BUFFER_SIZE);\n while (in.read(buf) >= 0 ) {\n out.... |
I have a requirement to validate an incoming file against an XSD. Both will be on the server file system.
I've looked at dbms_xmlschema, but have had issues getting it to work.
Could it be easier to do it with some Java?What's the simplest class I could put in the database?
Here's a simple example:
DECLARE
v_schema_u... | The error you're encountering, `ORA-01031: insufficient privileges`, indicates that the user executing this PL/SQL block lacks the necessary privileges to register or manipulate XML schemas in the Oracle Database. This issue often arises due to insufficient permissions related to the `DBMS_XMLSCHEMA` package or the und... | 8,614 | [
{
"from": "human",
"value": "I have a requirement to validate an incoming file against an XSD. Both will be on the server file system.\nI've looked at dbms_xmlschema, but have had issues getting it to work.\nCould it be easier to do it with some Java?What's the simplest class I could put in the database?\nH... |
I mean, I always was wondered about how the hell somebody can develop algorithms to break/cheat the constraints of legal use in many shareware programs out there.
Just for curiosity.
| The process of developing algorithms to bypass or "crack" shareware and other software constraints typically involves a combination of reverse engineering, understanding software behavior, and programming skills. Here’s a general overview of how such methods are often approached:
1. **Reverse Engineering**: This is th... | 12,740 | [
{
"from": "human",
"value": "I mean, I always was wondered about how the hell somebody can develop algorithms to break/cheat the constraints of legal use in many shareware programs out there.\nJust for curiosity.\n"
},
{
"from": "gpt",
"value": "The process of developing algorithms to bypass or ... |
My background is primarily as a Java Developer, but lately I have been doing some work in .NET. So I have been trying to do some simple projects at home to get better at working with .NET. I have been able to transfer much of my Java experience into working with .NET (specifically C#), but the only thing that has reall... | You're correct in your observations about the similarities and differences between Java packages and .NET namespaces. Your understanding of how namespaces work in .NET is quite accurate: they allow for grouping classes and avoiding naming conflicts, but they don't enforce any directory structure like Java packages do.
... | 11,403 | [
{
"from": "human",
"value": "My background is primarily as a Java Developer, but lately I have been doing some work in .NET. So I have been trying to do some simple projects at home to get better at working with .NET. I have been able to transfer much of my Java experience into working with .NET (specifical... |
How do you install Boost on MacOS?
Right now I can't find bjam for the Mac.
| To install Boost on macOS, you have a few different methods available. The most common method is to use Homebrew, which is a package manager for macOS. If you don’t have Homebrew installed, you can install it by running the following command in your Terminal:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubuserco... | 9,099 | [
{
"from": "human",
"value": "How do you install Boost on MacOS?\nRight now I can't find bjam for the Mac.\n"
},
{
"from": "gpt",
"value": "To install Boost on macOS, you have a few different methods available. The most common method is to use Homebrew, which is a package manager for macOS. If yo... |
This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so...
I have a list of checkboxes, and I can get them with the selector 'input[type=checkbox]'. I want the user to be able to shift-click and select a range of checkboxes. To accomplish this, I need to get t... | To accomplish the functionality of selecting a range of checkboxes with shift-clicking, you'll need to do a bit of extra work. Here's a step-by-step explanation along with sample code that will help you get the index of a checkbox and manage the selection range.
### Step 1: Get the List of Checkboxes
First, you can se... | 7,583 | [
{
"from": "human",
"value": "This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so...\nI have a list of checkboxes, and I can get them with the selector 'input[type=checkbox]'. I want the user to be able to shift-click and select a range of check... |
I have the following problem:
I have an HTML textbox (<input type="text">) whose contents are modified by a script I cannot touch (it is my page, but i'm using external components).
I want to be notified in my script every time the value of that textbox changes, so I can react to it.
I've tried this:
txtStartDate.obser... | To listen for changes to the value of an input field that may be modified by an external script, you can use the `input` event instead of the `change` event. The `input` event is fired whenever the value of the input changes, regardless of how that change happens (whether by user input or programmatically).
Here's how... | 12,705 | [
{
"from": "human",
"value": "I have the following problem:\nI have an HTML textbox (<input type=\"text\">) whose contents are modified by a script I cannot touch (it is my page, but i'm using external components).\nI want to be notified in my script every time the value of that textbox changes, so I can rea... |
My win32 C++ application frequently checks a file that normally resides on a network share [in our corporate network]. But if the computer isn't connected to a network, the application freezes for several minutes and the user usually has to end the process. How can I check if the file is accessible before I open it?
Ch... | To check if a file on a network share is accessible in a Win32 C++ application without causing the application to freeze, you can use the `GetFileAttributes` function. This approach allows you to determine if the file exists and whether you can access it without trying to open the file, which would block your applicati... | 11,598 | [
{
"from": "human",
"value": "My win32 C++ application frequently checks a file that normally resides on a network share [in our corporate network]. But if the computer isn't connected to a network, the application freezes for several minutes and the user usually has to end the process. How can I check if th... |
What is the current state of the art in rails for preventing spam accounts? Captcha? Any good plugins, tutorials or suggestions?
| As of my last update in October 2023, preventing spam accounts in Ruby on Rails applications remains an ongoing challenge, and developers typically use a combination of techniques to mitigate this issue. Here are some of the state-of-the-art methods and resources available for preventing spam account registrations:
##... | 8,973 | [
{
"from": "human",
"value": "What is the current state of the art in rails for preventing spam accounts? Captcha? Any good plugins, tutorials or suggestions?\n"
},
{
"from": "gpt",
"value": "As of my last update in October 2023, preventing spam accounts in Ruby on Rails applications remains an o... |
We have an application which needs to use Direct3D. Specifically, it needs at least DirectX 9.0c version 4.09.0000.0904. While this should be present on all newer XP machines it might not be installed on older XP machines. How can I programmatically (using C++) determine if it is installed? I want to be able to give an... | To determine if a specific version of DirectX (in this case, DirectX 9.0c) is installed on a Windows XP machine, you can use the `IDirect3D9` interface from the DirectX SDK to check the DirectX version installed on the system. Here's a straightforward way to do that using C++:
1. Include the necessary headers.
2. Init... | 9,206 | [
{
"from": "human",
"value": "We have an application which needs to use Direct3D. Specifically, it needs at least DirectX 9.0c version 4.09.0000.0904. While this should be present on all newer XP machines it might not be installed on older XP machines. How can I programmatically (using C++) determine if it i... |
I find it much more difficult to manage your session in a desktop application, because you cannot take advantage of such a clear bondary like HttpContext.
So how do you manage your session lifetime to take advantage of lazy loading but without having one session open for the entire application?
| Managing session lifetime in a desktop application can indeed be challenging compared to a web application where the `HttpContext` provides a clear boundary for request handling. Here are some strategies to effectively manage session lifetime in a desktop application, especially when implementing lazy loading:
### 1. ... | 6,539 | [
{
"from": "human",
"value": "I find it much more difficult to manage your session in a desktop application, because you cannot take advantage of such a clear bondary like HttpContext.\nSo how do you manage your session lifetime to take advantage of lazy loading but without having one session open for the en... |
I'm looking at writing a little drum machine in Python for fun. I've googled some and found the python pages on music and basic audio as well as a StackOverflow question on generating audio files, but what I'm looking for is a decent library for music creation. Has anyone on here tried to do something like this befor... | Creating a drum machine in Python sounds like a fun project! There are several libraries that can help you with audio manipulation and music creation. Here are a few popular options you might consider:
1. **Pydub**:
- Pydub is a simple and easy-to-use library for audio manipulation. It supports various audio format... | 10,100 | [
{
"from": "human",
"value": "I'm looking at writing a little drum machine in Python for fun. I've googled some and found the python pages on music and basic audio as well as a StackOverflow question on generating audio files, but what I'm looking for is a decent library for music creation. Has anyone on h... |
I need to speed up a program for the Nintendo DS which doesn't have an FPU, so I need to change floating-point math (which is emulated and slow) to fixed-point.
How I started was I changed floats to ints and whenever I needed to convert them, I used x>>8 to convert the fixed-point variable x to the actual number and x<... | When working with fixed-point arithmetic, especially in a resource-constrained environment like the Nintendo DS, organizing your code properly will make it much easier to manage and modify later on. Here are some suggestions to help you implement fixed-point math effectively:
### 1. Use a Fixed-Point Class or Struct
... | 8,706 | [
{
"from": "human",
"value": "I need to speed up a program for the Nintendo DS which doesn't have an FPU, so I need to change floating-point math (which is emulated and slow) to fixed-point.\nHow I started was I changed floats to ints and whenever I needed to convert them, I used x>>8 to convert the fixed-po... |
I am using .Net 2 and the normal way to store my settings. I store my custom object serialized to xml. I am trying to retrieve the default value of the property (but without reseting other properties). I use:
ValuationInput valuationInput = (ValuationInput) Settings.Default.Properties["ValuationInput"].DefaultValue;
B... | In .NET, when you define strongly typed settings using the `Settings` class, the default values for properties are typically stored as simple types (like strings, integers, etc.) rather than complex objects. This is why you're encountering the issue where `DefaultValue` returns a string representation of your serialize... | 13,624 | [
{
"from": "human",
"value": "I am using .Net 2 and the normal way to store my settings. I store my custom object serialized to xml. I am trying to retrieve the default value of the property (but without reseting other properties). I use:\nValuationInput valuationInput = (ValuationInput) Settings.Default.Pro... |
I've run into a problem where I make changes to a few JavaScript files that are referenced in an HTML file, but the browser doesn't see the changes. It holds onto the copy cached in the browser, even though the web server has a newer version.
Not until I force the browser to clear the cache do I see the changes.
Is thi... | The issue you're experiencing with the browser caching JavaScript files is quite common in web development. Browsers cache resources to improve load times, but this can lead to scenarios where changes are not immediately visible to users. Here are some best practices and techniques to manage caching effectively:
### 1... | 10,796 | [
{
"from": "human",
"value": "I've run into a problem where I make changes to a few JavaScript files that are referenced in an HTML file, but the browser doesn't see the changes. It holds onto the copy cached in the browser, even though the web server has a newer version.\nNot until I force the browser to cl... |
Is it better convention to use hyphens or underscores in your URLs?
Should it be /about_us or /about-us?
From usability point of view, I personally think /about-us is much better for end-user yet Google and most other websites (and javascript frameworks) use underscore naming pattern. Is it just matter of style? Are th... | When it comes to URL conventions, using hyphens (`-`) is generally considered better practice than using underscores (`_`). Here are some reasons why hyphens are preferred:
1. **Search Engine Optimization (SEO)**: Google recognizes hyphens as word separators, which means that a URL like `/about-us` is treated as two s... | 13,974 | [
{
"from": "human",
"value": "Is it better convention to use hyphens or underscores in your URLs?\nShould it be /about_us or /about-us?\nFrom usability point of view, I personally think /about-us is much better for end-user yet Google and most other websites (and javascript frameworks) use underscore naming ... |
In Oracle 8 doing an online backup with BLOBs in the database is extremely slow. By slow, I mean over an hour to backup a database with 100MB of BLOB data. Oracle acknowledged it was slow, but wouldn't fix the problem (so much for paying for support.) Does anyone know if Oracle has fixed this problem with subsequent re... | As of Oracle 8, online backups could indeed be slow, particularly with BLOB (Binary Large Object) data, due to the way these objects were managed and stored in the database. Over time, Oracle has made various enhancements to the backup and recovery processes, including improvements in handling BLOBs. Specifically, more... | 11,242 | [
{
"from": "human",
"value": "In Oracle 8 doing an online backup with BLOBs in the database is extremely slow. By slow, I mean over an hour to backup a database with 100MB of BLOB data. Oracle acknowledged it was slow, but wouldn't fix the problem (so much for paying for support.) Does anyone know if Oracle ... |
Does anyone know a good online resource for example of R code?
The programs do not have to be written for illustrative purposes, I am really just looking for some places where a bunch of R code has been written to give me a sense of the syntax and capabilities of the language?
Edit: I have read the basic documentation ... | Certainly! There are several online resources where you can find examples of R code, including repositories, tutorials, and documentation. Here are some good places to explore:
1. **RStudio Cheat Sheets**: RStudio provides a variety of cheat sheets that cover different aspects of R, including data manipulation, visual... | 10,111 | [
{
"from": "human",
"value": "Does anyone know a good online resource for example of R code?\nThe programs do not have to be written for illustrative purposes, I am really just looking for some places where a bunch of R code has been written to give me a sense of the syntax and capabilities of the language?\... |
I have a need to convert Pixels to Points in C#. I've seen some complicated explanations about the topic, but can't seem to locate a simple formula. Let's assume a standard 96dpi, how do I calulate this conversion?
| To convert pixels to points in C#, you can use the fact that there are 72 points in an inch and that 1 inch is equivalent to 96 pixels at 96 DPI (dots per inch).
The conversion formula is:
```
points = (pixels * 72) / 96
```
This can be simplified to:
```
points = pixels * 0.75
```
Here's a simple implementation ... | 13,976 | [
{
"from": "human",
"value": "I have a need to convert Pixels to Points in C#. I've seen some complicated explanations about the topic, but can't seem to locate a simple formula. Let's assume a standard 96dpi, how do I calulate this conversion?\n"
},
{
"from": "gpt",
"value": "To convert pixels t... |
Where can I find a guide for integrating JavaScript and JMS (Java Messaging Service)?
I would like a best practice or established technology that allows me to directly or indirectly receive messages from a topic and update a site based on the message. I was thinking of creating two components, a servlet for the Web mod... | Your approach to integrating JavaScript with JMS using a combination of servlets and Message-Driven Beans (MDBs) is indeed a common and effective pattern. Here’s a high-level overview of how you might structure your solution, along with some best practices and considerations.
### Architecture Overview
1. **MDB (Messa... | 7,466 | [
{
"from": "human",
"value": "Where can I find a guide for integrating JavaScript and JMS (Java Messaging Service)?\nI would like a best practice or established technology that allows me to directly or indirectly receive messages from a topic and update a site based on the message. I was thinking of creating... |
We're testing our ClickOnce deployed application internally on IIS (Internet Information Services), but we're wondering if we can deploy it to the wider internet using Apache on Linux so we can make use of our existing external website host.
If so, is there anything else I need to consider other than as specifying the ... | Deploying a ClickOnce application using Apache on a Linux server is possible, but there are several important considerations beyond just specifying the correct MIME types. Here are the key points to keep in mind:
1. **Correct MIME Types**: You already mentioned the MIME types, and yes, ensuring that the server serves ... | 10,364 | [
{
"from": "human",
"value": "We're testing our ClickOnce deployed application internally on IIS (Internet Information Services), but we're wondering if we can deploy it to the wider internet using Apache on Linux so we can make use of our existing external website host.\nIf so, is there anything else I need... |
I'm playing with the wonderful FindBugs plugin for Hudson. Ideally, I'd like to have the build fail if FindBugs finds any problems. Is this possible?
Please, don't try and tell me that "0 warnings" is unrealistic with FindBugs. We've been using FindBugs from Ant for a while and we usually do maintain 0 warnings. We ach... | Yes, it's definitely possible to configure the FindBugs plugin for Hudson (now known as Jenkins) to fail the build if any issues are detected. You can achieve this by adjusting the plugin's settings. Here are the steps you can follow:
1. **Install FindBugs Plugin**: Ensure that the FindBugs plugin is installed in Jenk... | 11,685 | [
{
"from": "human",
"value": "I'm playing with the wonderful FindBugs plugin for Hudson. Ideally, I'd like to have the build fail if FindBugs finds any problems. Is this possible?\nPlease, don't try and tell me that \"0 warnings\" is unrealistic with FindBugs. We've been using FindBugs from Ant for a while a... |
Is there a prebuilt tool that would integrate with BEA/Oracle Weblogic 10.0 and trace on a database table each call to a web service exposed by the server?
UPDATE: the goal is not to debug the web services (they are working well). The objective is to trace each call on a table, using an existing add-on.
| To trace calls to a web service exposed by Oracle WebLogic Server (10.0) and log these calls into a database table, there are a few approaches you can consider. Although there might not be a specific out-of-the-box tool that does this exactly as you described, you can leverage existing tools and frameworks to achieve y... | 11,447 | [
{
"from": "human",
"value": "Is there a prebuilt tool that would integrate with BEA/Oracle Weblogic 10.0 and trace on a database table each call to a web service exposed by the server?\nUPDATE: the goal is not to debug the web services (they are working well). The objective is to trace each call on a table,... |
I'm building my first ASP.NET MVC application and I am having some troubles with Partial Views.
If I, as an example, want to put a "Footer" as a Partial I create an "MVC View User Control" in "/Views/Shared/Footer.ascx". (I leave it empty for now)
What is the correct way for adding it to my Layout?
I have tried:
<%=Ht... | In ASP.NET MVC, the recommended approach for working with Partial Views is to use `.cshtml` files instead of `.ascx`, which are typically used in Web Forms. Since ASP.NET MVC uses Razor as its view engine, your partial views should be created as Razor views with the `.cshtml` extension.
### Here’s how to correctly set... | 11,666 | [
{
"from": "human",
"value": "I'm building my first ASP.NET MVC application and I am having some troubles with Partial Views.\nIf I, as an example, want to put a \"Footer\" as a Partial I create an \"MVC View User Control\" in \"/Views/Shared/Footer.ascx\". (I leave it empty for now)\nWhat is the correct way... |
I've been using NUnit for a few years. I've tried MBUnit for a short while as well as Zenebug and XUnit but I keep coming back to NUnit.
What is your favorite/most used Unit test Framework? Can you explain why you're using it?
| As an AI language model, I don't have personal preferences or experiences. However, I can provide an overview of popular unit testing frameworks and why many developers choose them based on community feedback and industry trends.
### Popular Unit Testing Frameworks
1. **NUnit**:
- **Popularity**: It's one of the m... | 10,750 | [
{
"from": "human",
"value": "I've been using NUnit for a few years. I've tried MBUnit for a short while as well as Zenebug and XUnit but I keep coming back to NUnit.\nWhat is your favorite/most used Unit test Framework? Can you explain why you're using it?\n"
},
{
"from": "gpt",
"value": "As an ... |
Okay, here is the 411 - I have the following event handler in my Global.asax.cs file:
private void Global_PostRequestHandlerExecute(object sender, EventArgs e)
{
if (/* logic that determines that this is an ajax call */)
{
// we want to set a cookie
Response.Cookies.Add(new HttpCookie("MyCookie", "tru... | The issue you're encountering when trying to delete the cookie could be due to a few factors. Let's troubleshoot some common reasons why the `deleteCookie` function isn't effectively removing the cookie:
1. **Domain and Path Matching**:
When setting a cookie, you can specify a domain and path. If the cookie was set... | 12,804 | [
{
"from": "human",
"value": "Okay, here is the 411 - I have the following event handler in my Global.asax.cs file:\nprivate void Global_PostRequestHandlerExecute(object sender, EventArgs e)\n{\n if (/* logic that determines that this is an ajax call */)\n {\n // we want to set a cookie\n Respo... |
I am re-building our poorly designed web application from scratch, and wanted to get into TDD and basically "do things right" as kind of a learning project. What tools, processes, and resources are recommended to do it "right" from the start? I will be working alone as the architect and developer, with the backup of ... | It's great to hear that you're taking a structured approach to rebuilding your web application with Test-Driven Development (TDD). Here’s a comprehensive guide to tools, processes, and resources that will help you do things right from the start.
### Recommended Tools & Technologies
1. **Version Control System**:
-... | 4,235 | [
{
"from": "human",
"value": "I am re-building our poorly designed web application from scratch, and wanted to get into TDD and basically \"do things right\" as kind of a learning project. What tools, processes, and resources are recommended to do it \"right\" from the start? I will be working alone as the... |
I have a SharePoint site with multiple lists, some of which have the same fields - a choice of products or countries.
How can I build the lists in a way that I configure the choice field once and use it in multiple lists, so that in the future, if I add a value to the choice, I add it only once?
| In SharePoint, if you want to have a choice field that can be reused across multiple lists, you can utilize a couple of approaches to achieve this. The most common methods are using **Site Columns** and **Content Types**. Here’s how you can set up each option:
### Option 1: Using Site Columns
1. **Create a Site Colum... | 9,862 | [
{
"from": "human",
"value": "I have a SharePoint site with multiple lists, some of which have the same fields - a choice of products or countries.\nHow can I build the lists in a way that I configure the choice field once and use it in multiple lists, so that in the future, if I add a value to the choice, I... |
I haven't completely understood, how to use sigprocmask(). Particularly, how the set and oldset and its syntax work and how to use them.
int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
Please explain with an example, to block, say SIGUSR1 for a few seconds and then unblock and handle it.
... | The `sigprocmask()` function in the POSIX system is used to block or unblock signals. It modifies the signal mask of the calling process. The function has the following prototype:
```c
int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
```
### Parameters:
1. **how**: This parameter specifies how the sig... | 4,122 | [
{
"from": "human",
"value": "I haven't completely understood, how to use sigprocmask(). Particularly, how the set and oldset and its syntax work and how to use them.\nint sigprocmask(int how, const sigset_t *set, sigset_t *oldset);\n\nPlease explain with an example, to block, say SIGUSR1 for a few seconds a... |
The documentation indicates that the error: option function will make available: XHR instance, a status message string (in this case always error) and an optional exception object returned from the XHR instance (Book: JQuery in Action)
Using the following (in the $.ajax call) I was able to determine I had a "parsererro... | When working with the `error` callback in a jQuery `$.ajax` call, there are several useful pieces of information that you can evaluate to gain insight into what went wrong during the AJAX request. Below are some specific considerations and best practices for utilizing the `request` and `error` parameters:
### Error Ha... | 9,073 | [
{
"from": "human",
"value": "The documentation indicates that the error: option function will make available: XHR instance, a status message string (in this case always error) and an optional exception object returned from the XHR instance (Book: JQuery in Action)\nUsing the following (in the $.ajax call) I... |
Is there any good tool for working on Dabtabase apart from Toad which requires license and DBVisualiser not supportive
| Yes, there are several good tools for working with databases that are open-source or free and do not require a license. Here are some popular alternatives to Toad and DBVisualizer:
1. **DBeaver**:
- A free, open-source universal database tool that supports a wide range of databases including MySQL, PostgreSQL, SQLi... | 12,268 | [
{
"from": "human",
"value": "Is there any good tool for working on Dabtabase apart from Toad which requires license and DBVisualiser not supportive\n"
},
{
"from": "gpt",
"value": "Yes, there are several good tools for working with databases that are open-source or free and do not require a lice... |
I have a desktop application (Windows Forms) which my client hosts on a Citrix server. I would like to launch the user's locally configured mail client to send mail from my application. How do I do this?
In addition to this, I will need to attach a file to the email before it is sent.
| To launch the user's locally configured mail client from your Windows Forms application running on a Citrix server, you can use the `System.Diagnostics.Process` class in C# to open the default mail client with a pre-defined subject, body, and attachment.
Here's how you can do this:
1. **Use the `mailto` Protocol**: Y... | 9,860 | [
{
"from": "human",
"value": "I have a desktop application (Windows Forms) which my client hosts on a Citrix server. I would like to launch the user's locally configured mail client to send mail from my application. How do I do this?\nIn addition to this, I will need to attach a file to the email before it i... |
Deep down in WinDef.h there's this relic from the segmented memory era:
#define far
#define near
This obviously causes problems if you attempt to use near or far as variable names. Any clean workarounds? Other then renaming my variables?
| Indeed, the `#define far` and `#define near` statements in `WinDef.h` (or any other Windows header files) can cause conflicts if you try to use `near` or `far` as variable names. These macros redefine the terms in a way that can lead to ambiguous situations in your code.
Here are a few clean workarounds to avoid this ... | 12,598 | [
{
"from": "human",
"value": "Deep down in WinDef.h there's this relic from the segmented memory era:\n#define far\n#define near\n\nThis obviously causes problems if you attempt to use near or far as variable names. Any clean workarounds? Other then renaming my variables?\n"
},
{
"from": "gpt",
... |
I need to quickly (and forcibly) kill off all external sessions connecting to my oracle database without the supervision of and administrator.
I don't want to just lock the database and let the users quit gracefully.
How would I script this?
| To forcibly kill all external sessions connecting to an Oracle database without the supervision of an administrator, you can use a SQL script that retrieves the sessions and then terminates them. This action should be executed with caution as it will result in loss of unsaved work and could lead to data inconsistency i... | 8,902 | [
{
"from": "human",
"value": "I need to quickly (and forcibly) kill off all external sessions connecting to my oracle database without the supervision of and administrator.\nI don't want to just lock the database and let the users quit gracefully.\nHow would I script this?\n"
},
{
"from": "gpt",
... |
What, at a minimum, should an application health-monitoring system do for you (the developer) and/or your boss (the IT Manager) and/or the operations (on-call) staff?
What else should it do above the minimum requirements?
Is monitoring the 'infrastructure' applications (ms-exchange, apache, etc.) sufficient or do indiv... | An application health-monitoring system is essential for ensuring the reliability, performance, and availability of software applications. Here's a breakdown of what it should do at a minimum, as well as additional considerations:
### Minimum Requirements for Application Health Monitoring:
#### For Developers:
1. **E... | 7,961 | [
{
"from": "human",
"value": "What, at a minimum, should an application health-monitoring system do for you (the developer) and/or your boss (the IT Manager) and/or the operations (on-call) staff?\nWhat else should it do above the minimum requirements?\nIs monitoring the 'infrastructure' applications (ms-exc... |
if I call php's parse_ini_file("foo.ini"), in what paths does it look for foo.ini ?
the include path? the function's documentation doesn't mention it.
| When you call `parse_ini_file("foo.ini")` in PHP, it looks for the `foo.ini` file in the current working directory from which the PHP script is executed, rather than the include path. The `include_path` does not come into play for this specific function.
Here's a breakdown of the process:
1. **Current Working Directo... | 14,257 | [
{
"from": "human",
"value": "if I call php's parse_ini_file(\"foo.ini\"), in what paths does it look for foo.ini ? \nthe include path? the function's documentation doesn't mention it.\n"
},
{
"from": "gpt",
"value": "When you call `parse_ini_file(\"foo.ini\")` in PHP, it looks for the `foo.ini` ... |
Does anybody know (or know of a resource that contains) a list of frame start codes for common video formats (MPEG-1/2/4, .wmv, .mov etc.).
For example, an MPEG-1 video frame will (I think) always start with "00 00 01 00".
In essence I'd like to know these so that I could write a program that can automatically find th... | To help you with identifying the start codes for various common video formats, here’s a summary of some key start codes and identifiers for different formats:
### MPEG Formats
- **MPEG-1 Video**
- Frame Start Code: `00 00 01 B3` for MPEG-1 Sequence Header
- Picture Start Code: `00 00 01 00` (for I-frames)
- Pict... | 10,444 | [
{
"from": "human",
"value": "Does anybody know (or know of a resource that contains) a list of frame start codes for common video formats (MPEG-1/2/4, .wmv, .mov etc.). \nFor example, an MPEG-1 video frame will (I think) always start with \"00 00 01 00\".\nIn essence I'd like to know these so that I could w... |
I don't expect a straightforward silver bullet answer to this, but what are the best practices for ensuring good performance for SharePoint 2007 sites?
We've a few sites for our intranet, and it generally is thought to run slow. There's plenty of memory and processor power in the servers, but the pages just don't 'snap... | Improving the performance of SharePoint 2007 sites can be a multifaceted challenge, especially since SharePoint is a complex application with many moving parts. Given that you already have ample server resources, here are some best practices that you can consider to enhance performance:
### 1. **Optimize SharePoint Co... | 9,736 | [
{
"from": "human",
"value": "I don't expect a straightforward silver bullet answer to this, but what are the best practices for ensuring good performance for SharePoint 2007 sites?\nWe've a few sites for our intranet, and it generally is thought to run slow. There's plenty of memory and processor power in t... |
In Oracle, is there an easy way to fully unwrap a view? eg: If I have a view which is made up of selects on more views, is there some way to unwrap it to just select directly on real tables?
| In Oracle, unwrapping a view means transforming it into its underlying SQL query, which could be composed of other views or tables. Unfortunately, Oracle does not provide a built-in command to automatically unwrap views directly to reveal all underlying tables in a single step. However, there are a few approaches you c... | 10,637 | [
{
"from": "human",
"value": "In Oracle, is there an easy way to fully unwrap a view? eg: If I have a view which is made up of selects on more views, is there some way to unwrap it to just select directly on real tables?\n"
},
{
"from": "gpt",
"value": "In Oracle, unwrapping a view means transfor... |
I'm facing a problem on the Win32 API. I have a program that, when it handles WM_PAINT messages, it calls BeginPaint to clip the region and validate the update region, but the BeginPaint function is always generating a WM_NCPAINT message with the same update region, even if the touched part that needs repainting is onl... | The behavior you're encountering with the `BeginPaint` function generating a `WM_NCPAINT` message while handling `WM_PAINT` messages can be confusing. There are a few things to consider that could be contributing to this issue, especially since you are dealing with child windows.
### Possible Reasons and Solutions:
1... | 8,203 | [
{
"from": "human",
"value": "I'm facing a problem on the Win32 API. I have a program that, when it handles WM_PAINT messages, it calls BeginPaint to clip the region and validate the update region, but the BeginPaint function is always generating a WM_NCPAINT message with the same update region, even if the ... |
Ok, do you do Business.Name or Business.BusinessName
SubCategory.ID or SubCategory.SubCategoryID
What about in your database?
Why?
I'm torn with both. Would love there to be a "right answer"
| When it comes to naming conventions in databases, there are no universally "right" answers; however, there are some widely accepted practices that can help you decide. Here’s a breakdown of both approaches:
### Business.Name vs. Business.BusinessName
- **Business.Name:** This is more succinct and indicates that the fi... | 12,008 | [
{
"from": "human",
"value": "Ok, do you do Business.Name or Business.BusinessName\nSubCategory.ID or SubCategory.SubCategoryID\nWhat about in your database?\nWhy?\nI'm torn with both. Would love there to be a \"right answer\"\n"
},
{
"from": "gpt",
"value": "When it comes to naming conventions i... |
I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email account.)
I've been told you could do some stuff with telneting to port 25, but I'm very fuzzy... | To send error reports via email from your offline application without hard-coding sensitive information like username and password, you can consider several approaches. The key is to keep your credentials secure and not expose them in the code itself. Here are some strategies you could use:
### 1. Use an Email Relay S... | 10,443 | [
{
"from": "human",
"value": "I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email account.)\nI've been told you could do some stuff wit... |
I have a Flex application, which loads a SWF from CS3. The loaded SWF contains a text input called "myText". I can see this in the SWFLoader.content with no problems, but I don't know what type I should be treating it as in my Flex App. I thought the flex docs covered this but I can only find how to interact with anoth... | In Flex, particularly when using the Flex SDK, the `fl.controls.TextInput` class belongs to the Flash component library (the `fl` package) which is not included in the Flex framework by default. Flex applications primarily use the Spark and MX component sets, and do not automatically recognize components from the Flash... | 9,645 | [
{
"from": "human",
"value": "I have a Flex application, which loads a SWF from CS3. The loaded SWF contains a text input called \"myText\". I can see this in the SWFLoader.content with no problems, but I don't know what type I should be treating it as in my Flex App. I thought the flex docs covered this but... |
I'm trying to write a web-app that records WAV files (eg: from the user's microphone). I know Javascript alone can not do this, but I'm interested in the least proprietary method to augment my Javascript with. My targeted browsers are Firefox for PC and Mac (so no ActiveX).
I gather it can be done with Flash (but not a... | To record audio in the browser, including WAV format files, you have a few options. The landscape for web audio recording has evolved quite a bit, especially with modern APIs and libraries. Here are some of the most suitable methods, especially considering your target browsers (Firefox) and your requirements:
1. **Web... | 5,609 | [
{
"from": "human",
"value": "I'm trying to write a web-app that records WAV files (eg: from the user's microphone). I know Javascript alone can not do this, but I'm interested in the least proprietary method to augment my Javascript with. My targeted browsers are Firefox for PC and Mac (so no ActiveX).\nI g... |
I was going to ask what the best way to do this is, but then decided I should ask whether or not it is even necessary. I have never seen it done in JSP development, but it appears to be common practice in PHP. What is the reasoning behind this, and if I do not protect against this, what else should I be taking into con... | It sounds like you're referring to a common security practice, possibly related to protecting against vulnerabilities like SQL injection, cross-site scripting (XSS), or cross-site request forgery (CSRF). Here’s a breakdown of why these practices are important and considerations for your JSP development:
### 1. **Under... | 8,844 | [
{
"from": "human",
"value": "I was going to ask what the best way to do this is, but then decided I should ask whether or not it is even necessary. I have never seen it done in JSP development, but it appears to be common practice in PHP. What is the reasoning behind this, and if I do not protect against th... |
I have a Java String that contains XML, with no line feeds or indentations. I would like to turn it into a String with nicely formatted XML. How do I do this?
String unformattedXml = "<tag><nested>hello</nested></tag>";
String formattedXml = new [UnknownClass]().format(unformattedXml);
Note: My input is a String. My o... | To format a Java String that contains XML, you can use the `Transformer` class provided in the Java XML API. Here’s how to achieve this:
1. Convert the input String into a `Document`.
2. Use a `Transformer` to convert that `Document` back into a pretty-printed String.
Here’s how you can do it:
```java
import javax.x... | 11,070 | [
{
"from": "human",
"value": "I have a Java String that contains XML, with no line feeds or indentations. I would like to turn it into a String with nicely formatted XML. How do I do this?\nString unformattedXml = \"<tag><nested>hello</nested></tag>\";\nString formattedXml = new [UnknownClass]().format(unfor... |
I'm using freemarker, SiteMesh and Spring framework.
For the pages I use ${requestContext.getMessage()} to get the message from message.properties. But for the decorators this doesn't work. How should I do to get the internationalization working for sitemesh?
| When using FreeMarker with SiteMesh and Spring, you can encounter issues with message internationalization (i18n) when trying to access messages defined in `messages.properties` from your SiteMesh decorators. This happens because SiteMesh may not have the same context as your main pages, which is why `${requestContext.... | 9,117 | [
{
"from": "human",
"value": "I'm using freemarker, SiteMesh and Spring framework.\nFor the pages I use ${requestContext.getMessage()} to get the message from message.properties. But for the decorators this doesn't work. How should I do to get the internationalization working for sitemesh?\n"
},
{
"f... |
This seems to be an overlooked area that could really use some insight. What are your best practices for:
making an upgrade procedure
backing out in case of errors
syncing code and database changes
testing prior to deployment
mechanics of modifying the table
etc...
| When managing software upgrades, especially in a web application context that involves both code and database changes, there are several best practices to ensure smooth transitions and minimal downtime. Below is a breakdown of best practices across the areas you mentioned:
### 1. Making an Upgrade Procedure
- **Versi... | 8,743 | [
{
"from": "human",
"value": "This seems to be an overlooked area that could really use some insight. What are your best practices for:\n\nmaking an upgrade procedure\nbacking out in case of errors\nsyncing code and database changes\ntesting prior to deployment\nmechanics of modifying the table\n\netc...\n"... |
I want to create a code/knowledge base where I can save my vb.net/c#.net/sqlserver code snippets for use later.
I've tried setting the ValidateRequest property to false in my page directive, and encoding the value with HttpUtility.HtmlEncode (c#.net), but I still get errors.
thoughts?
| Creating a code or knowledge base for saving your VB.NET/C#.NET/SQL Server code snippets is a great idea. However, when working with ASP.NET web applications, especially if you're allowing users to input and store HTML or code snippets, there are several security concerns, particularly around XSS (Cross-Site Scripting)... | 6,154 | [
{
"from": "human",
"value": "I want to create a code/knowledge base where I can save my vb.net/c#.net/sqlserver code snippets for use later.\nI've tried setting the ValidateRequest property to false in my page directive, and encoding the value with HttpUtility.HtmlEncode (c#.net), but I still get errors.\nt... |
When commiting to SVN I can add a top level commit message to detail what is being committed, but I would ideally like a means to comment on the individual files and what has changed within them. I have seen something similar in previous employment, but this was using CVS (and I can't recall whether this was achieved ... | Subversion (SVN) does not natively support file-level commit messages in the same way that some other version control systems might. When you make a commit in SVN, you provide a single commit message that describes all the changes being committed. However, you can still achieve the effect you're looking for with some w... | 10,502 | [
{
"from": "human",
"value": "When commiting to SVN I can add a top level commit message to detail what is being committed, but I would ideally like a means to comment on the individual files and what has changed within them. I have seen something similar in previous employment, but this was using CVS (and ... |
I've recently started working with Aptana and Eclipse Monkey. What I want to do now is to create a script that saves a file then uploads it to a FTP.
Problem is that Eclipse Monkey is VERY poorly documented and Google returned only unrelated results.
I've made it upload the file, but I need the script to save the file ... | Eclipse Monkey is indeed not extensively documented, which can make it challenging to find the right methods and functionalities. However, I can provide you with some guidance on how to save a file before uploading it via FTP in an Eclipse Monkey script.
The method you already have, `sync.uploadCurrentEditor();`, uplo... | 13,173 | [
{
"from": "human",
"value": "I've recently started working with Aptana and Eclipse Monkey. What I want to do now is to create a script that saves a file then uploads it to a FTP.\nProblem is that Eclipse Monkey is VERY poorly documented and Google returned only unrelated results.\nI've made it upload the fi... |
I am doing a Web Deployment of my website and I have the merge assemblies property set to true.
For some reason I get the following error.
aspnet_merge : error occurred:
An error occurred when merging assemblies: The relative virtual path 'Global.asax' is not allowed here.
It seems to have something to do with the ... | The error you are encountering during the web deployment process with the `aspnet_merge` tool is related to the handling of the `Global.asax` file. Here are a few steps and considerations to help you troubleshoot and resolve the issue:
1. **Check Global.asax Location**: Ensure that your `Global.asax` file is located i... | 10,769 | [
{
"from": "human",
"value": "I am doing a Web Deployment of my website and I have the merge assemblies property set to true.\nFor some reason I get the following error. \naspnet_merge : error occurred:\n\n\nAn error occurred when merging assemblies: The relative virtual path 'Global.asax' is not allowed her... |
I am trying to evaluate the answer provided here, and am getting the error: "A file with name ASDF-INSTALL does not exist" when using clisp:
dsm@localhost:~$ clisp -q
[1]> (require :asdf-install)
*** - LOAD: A file with name ASDF-INSTALL does not exist
The following restarts are available:
ABORT :R1 ABOR... | The issue you're encountering is related to the way different Common Lisp implementations handle ASDF and ASDF-related libraries like `asdf-install`. Here are a few steps to troubleshoot and resolve the problem:
1. **Ensure ASDF and ASDF-INSTALL are installed**:
- Make sure that `ASDF` and `ASDF-INSTALL` are actual... | 10,176 | [
{
"from": "human",
"value": "I am trying to evaluate the answer provided here, and am getting the error: \"A file with name ASDF-INSTALL does not exist\" when using clisp:\ndsm@localhost:~$ clisp -q\n[1]> (require :asdf-install)\n\n*** - LOAD: A file with name ASDF-INSTALL does not exist\nThe following rest... |
I know it's possible to place a PyCairo surface inside a Gtk Drawing Area. But I think Qt is a lot better to work with, so I've been wondering if there's anyway to place a PyCairo surface inside some Qt component?
| Yes, you can use PyCairo with PyQt (or PySide) to draw onto a Qt widget. While you can't directly embed a Cairo surface into a Qt widget, you can draw on a `QWidget` or `QGraphicsView` using Cairo by creating an off-screen image (such as a `QImage` or `QPixmap`), drawing to it with PyCairo, and then displaying it in yo... | 9,390 | [
{
"from": "human",
"value": "I know it's possible to place a PyCairo surface inside a Gtk Drawing Area. But I think Qt is a lot better to work with, so I've been wondering if there's anyway to place a PyCairo surface inside some Qt component?\n"
},
{
"from": "gpt",
"value": "Yes, you can use PyC... |
Whenever I type a (, [, or {, Notepad++ completes it with the corresponding closing bracket. I find this 'feature' annoying and would like to disable it. It doesn't seem to be listed in the Preferences dialog and a search of the online documentation didn't yield any useful result.
Does anybody here know where the opti... | To disable the automatic closing brackets feature in Notepad++ 5.0.3, you need to modify the settings in the configuration file. Unfortunately, this feature does not have a straightforward option in the Preferences dialog, but you can follow these steps to disable it:
1. Close Notepad++ if it is open.
2. Navigate to ... | 14,035 | [
{
"from": "human",
"value": "Whenever I type a (, [, or {, Notepad++ completes it with the corresponding closing bracket. I find this 'feature' annoying and would like to disable it. It doesn't seem to be listed in the Preferences dialog and a search of the online documentation didn't yield any useful resul... |
When I open cmd on my laptop it is defaulting to the F: drive. This is troubling me does anyone know how it got that way or how to get it back to where it opens to the C: drive by default?
| The Command Prompt in Windows opens to a default directory based on various factors, including how it was last closed or the current settings for shortcuts or configurations. If your Command Prompt is defaulting to the F: drive instead of the C: drive, here are a few ways to change it back:
### Method 1: Change Startu... | 11,899 | [
{
"from": "human",
"value": "When I open cmd on my laptop it is defaulting to the F: drive. This is troubling me does anyone know how it got that way or how to get it back to where it opens to the C: drive by default?\n"
},
{
"from": "gpt",
"value": "The Command Prompt in Windows opens to a def... |
Phantom References serve for post-mortem operations.
The Java specification states that a phantom referenced object will not be deallocated until the phantom-reference itself is cleaned.
My question is: What purpose does this feature (object not deallocated) serve?
(The only idea i came up with, is to allow native code... | Phantom references in Java are a specialized form of reference that are used to facilitate post-mortem operations on objects that have been finalized but not yet reclaimed by the garbage collector. While your idea about native code performing cleanup is valid, there are several other reasons why phantom references are ... | 12,338 | [
{
"from": "human",
"value": "Phantom References serve for post-mortem operations.\nThe Java specification states that a phantom referenced object will not be deallocated until the phantom-reference itself is cleaned.\nMy question is: What purpose does this feature (object not deallocated) serve?\n(The only ... |
I'm creating a plugin, and am looking to use RSpec so I can build it using BDD.
Is there a recommended method of doing this?
| Yes, using RSpec for Behavior-Driven Development (BDD) in your plugin development is a great choice! Here are some recommended steps to help you get started with RSpec for your plugin:
### 1. Set Up Your Environment
First, ensure you have RSpec installed. If you’re working on a Ruby-based project, you can add RSpec t... | 9,412 | [
{
"from": "human",
"value": "I'm creating a plugin, and am looking to use RSpec so I can build it using BDD. \nIs there a recommended method of doing this?\n"
},
{
"from": "gpt",
"value": "Yes, using RSpec for Behavior-Driven Development (BDD) in your plugin development is a great choice! Here a... |
I downloaded some example code from the internet, but when I compiled it I ran into some trouble. My compiler tells me: comdef.h: No such file or directory.
I searched a bit on the internet, but I couldn't find anyone else with the same problem and I have no clue where I can obtain this header file.
I use codeblocks wi... | The error message you're seeing indicates that the `comdef.h` header file, which is commonly associated with Microsoft C++ development for COM (Component Object Model) programming, is not available in your environment. This file is specific to Microsoft's Visual C++ (MSVC) compiler and is not a part of the GNU GCC tool... | 13,180 | [
{
"from": "human",
"value": "I downloaded some example code from the internet, but when I compiled it I ran into some trouble. My compiler tells me: comdef.h: No such file or directory.\nI searched a bit on the internet, but I couldn't find anyone else with the same problem and I have no clue where I can ob... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.