instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I am creating an HTTP handler that listens for calls to a specific file type, and handles it accordingly. My HTTP Handler listens for .bcn files, then writes a cookie to the user's computer and sends back an image... this will be used in advertising banners so that the user is tagged as seeing the banner, and we can t... | In an ASP.NET environment, an `IHttpHandler` does not have direct access to a `Page` object, but it does have access to the `HttpContext` object, which provides access to the `HttpRequest` and `HttpResponse` objects. You can set cookies and write output directly to the response from your HTTP handler.
Here’s how you c... | 15,839 | [
{
"from": "human",
"value": "I am creating an HTTP handler that listens for calls to a specific file type, and handles it accordingly. My HTTP Handler listens for .bcn files, then writes a cookie to the user's computer and sends back an image... this will be used in advertising banners so that the user is ... |
We use an IBM database known as Universe that holds all of our user id's, passwords, and profile information in a table called USERINFO.
Can I use the Membership Provider to connect to this database and authenticate the user?
The database access is actually through a web service since we don't have a direct connect ... | Yes, you can use a Membership Provider to authenticate users against an IBM database through a web service, but it will require custom implementation since the built-in Membership Provider in ASP.NET is designed to work with SQL Server or other relational databases directly.
Here’s a general approach to achieve this:
... | 19,098 | [
{
"from": "human",
"value": "We use an IBM database known as Universe that holds all of our user id's, passwords, and profile information in a table called USERINFO. \nCan I use the Membership Provider to connect to this database and authenticate the user? \nThe database access is actually through a web se... |
We are looking at hiring a software development project manager. His job is going to be concerned with running multiple dedicated project teams focused on delivery of software for external customers. He will also need to provide support to our business development unit and oversee post-implementations support of the af... | For a software development project manager position where the successful candidate will not be expected to code but will manage multiple project teams, it is essential to consider the technical understanding they need to effectively lead and communicate with their teams.
Given your focus on proven project management e... | 25,588 | [
{
"from": "human",
"value": "We are looking at hiring a software development project manager. His job is going to be concerned with running multiple dedicated project teams focused on delivery of software for external customers. He will also need to provide support to our business development unit and overs... |
What do you think.. are clean URLs a backend or frontend 'discipline'
| Clean URLs primarily involve both backend and frontend disciplines, though they are more closely related to backend development. Here’s a breakdown of how each side plays a role:
### Backend Discipline
1. **URL Structure**: The backend is responsible for defining how URLs are structured. This includes setting up routi... | 19,701 | [
{
"from": "human",
"value": "What do you think.. are clean URLs a backend or frontend 'discipline'\n"
},
{
"from": "gpt",
"value": "Clean URLs primarily involve both backend and frontend disciplines, though they are more closely related to backend development. Here’s a breakdown of how each side... |
Just playing around with the now released Silverlight 2.0. I'm trying to put a simple Calendar in a control. However the project doesn't seem to know what I'm talking about:-
<UserControl x:Class="MyFirstSL2.Test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.c... | In Silverlight 2.0, the `Calendar` control that you are trying to use is not available out-of-the-box. Unlike WPF, where the `Calendar` control is part of the default set of controls, Silverlight has a more limited set of controls.
If you want to use a calendar functionality in your Silverlight application, you have a... | 21,065 | [
{
"from": "human",
"value": "Just playing around with the now released Silverlight 2.0. I'm trying to put a simple Calendar in a control. However the project doesn't seem to know what I'm talking about:-\n<UserControl x:Class=\"MyFirstSL2.Test\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/prese... |
I'm running a Django site using the fastcgi interface to nginx. However, some pages are being served truncated (i.e. the page source just stops, sometimes in the middle of a tag). How do I fix this (let me know what extra information is needed, and I'll post it)
Details:
I'm using flup, and spawning the fastcgi server ... | The issue you're experiencing with truncated pages when serving your Django application via FastCGI with Nginx can be attributed to several possible causes. Here are some steps to diagnose and fix the problem:
### 1. **Check the Application Logs**
- Check the Django logs for any errors that might be occurring when a r... | 18,445 | [
{
"from": "human",
"value": "I'm running a Django site using the fastcgi interface to nginx. However, some pages are being served truncated (i.e. the page source just stops, sometimes in the middle of a tag). How do I fix this (let me know what extra information is needed, and I'll post it)\nDetails:\nI'm u... |
What is the scope of Runtime Callable Wrapper (RCW), when referencing unmanaged COM objects? According to the docs:
The runtime creates exactly one RCW
for each COM object, regardless of the
number of references that exist on
that object.
If I had to "guess" - this explanation should mean "one per process", but... | The concept of the Runtime Callable Wrapper (RCW) in the context of unmanaged COM objects can be a bit nuanced, especially regarding its scope and lifecycle.
### Understanding RCW Scope
1. **Single RCW per COM Object**: The key point to remember is that the .NET runtime creates one RCW for each COM object, regardless... | 17,505 | [
{
"from": "human",
"value": "What is the scope of Runtime Callable Wrapper (RCW), when referencing unmanaged COM objects? According to the docs:\n\nThe runtime creates exactly one RCW\n for each COM object, regardless of the\n number of references that exist on\n that object.\n\nIf I had to \"guess\" - t... |
What is the purpose of the Using block in C#? How is it different from a local variable?
| In C#, the `using` block is primarily used for resource management, particularly for ensuring that unmanaged resources are properly disposed of when they are no longer needed. This is most commonly seen with objects that implement the `IDisposable` interface. The `using` statement provides a convenient syntax that auto... | 20,174 | [
{
"from": "human",
"value": "What is the purpose of the Using block in C#? How is it different from a local variable?\n"
},
{
"from": "gpt",
"value": "In C#, the `using` block is primarily used for resource management, particularly for ensuring that unmanaged resources are properly disposed of w... |
I'm creating a table that looks something like this.
CREATE TABLE packages
(
productCode char(2)
, name nvarchar(100)
, ...
)
How do I make sure the productCode is always one of two values XJ or XD?
| To ensure that the `productCode` in your `packages` table can only take on specific values (in your case, 'XJ' or 'XD'), you can use a `CHECK` constraint when creating the table. Here's how you can modify your `CREATE TABLE` statement to include that constraint:
```sql
CREATE TABLE packages
(
productCode char(2)
... | 24,628 | [
{
"from": "human",
"value": "I'm creating a table that looks something like this.\nCREATE TABLE packages\n(\n productCode char(2)\n , name nvarchar(100) \n , ...\n)\n\nHow do I make sure the productCode is always one of two values XJ or XD?\n"
},
{
"from": "gpt",
"value": "To ensure that the ... |
Does any one know how do I get the current open windows or process of a local machine using Java?
What I'm trying to do is: list the current open task, windows or process open, like in Windows Taskmanager, but using a multi-platform approach - using only Java if it's possible.
| Retrieving a list of currently running processes or open windows in a cross-platform manner using Java is quite challenging because Java does not provide built-in APIs for process management or window enumeration in the same way that native operating systems do. However, you can achieve this by using external libraries... | 11,913 | [
{
"from": "human",
"value": "Does any one know how do I get the current open windows or process of a local machine using Java? \nWhat I'm trying to do is: list the current open task, windows or process open, like in Windows Taskmanager, but using a multi-platform approach - using only Java if it's possibl... |
I have a WinForms app written in C# with .NET 3.5. It runs a lengthy batch process. I want the app to update status of what the batch process is doing. What is the best way to update the UI?
| In a WinForms application, UI updates must be performed on the main UI thread. If your batch process is lengthy and runs on the same thread as the UI, it can freeze the UI, making it unresponsive. To update the UI while performing a long-running process, you can use the `BackgroundWorker` component or the `Task` class ... | 16,625 | [
{
"from": "human",
"value": "I have a WinForms app written in C# with .NET 3.5. It runs a lengthy batch process. I want the app to update status of what the batch process is doing. What is the best way to update the UI?\n"
},
{
"from": "gpt",
"value": "In a WinForms application, UI updates must... |
Do any apps/packages exist that will support writing to OS X's log database from external sources. I'm not too familiar with the specifics of the database, beyond the fact that you can view its contents from the Console app. I'm not even sure if it's just a version of some simple DB like SQLite or if it is some sort of... | macOS (formerly OS X) uses a logging system called Unified Logging, which is built on a framework that provides a way for applications and services to log messages in a structured way. The logs can be viewed using the Console app, and they are stored in a binary format rather than a traditional SQL database like SQLite... | 18,924 | [
{
"from": "human",
"value": "Do any apps/packages exist that will support writing to OS X's log database from external sources. I'm not too familiar with the specifics of the database, beyond the fact that you can view its contents from the Console app. I'm not even sure if it's just a version of some simpl... |
Can anybody suggest programming examples that illustrate recursive functions? There are the usual old horses such as Fibonacci series and Towers of Hanoi, but anything besides them would be fun.
| Absolutely! Here are some interesting and fun programming examples that utilize recursive functions, beyond the classic Fibonacci series and Towers of Hanoi:
1. **Factorial Calculation**:
While somewhat standard, calculating the factorial of a number is a great introduction to recursion.
```python
def factori... | 11,254 | [
{
"from": "human",
"value": "Can anybody suggest programming examples that illustrate recursive functions? There are the usual old horses such as Fibonacci series and Towers of Hanoi, but anything besides them would be fun.\n"
},
{
"from": "gpt",
"value": "Absolutely! Here are some interesting a... |
How does TCP/IP report errors when packet delivery fails permanently? All Socket.write() APIs I've seen simply pass bytes to the underlying TCP/IP output buffer and transfer the data asynchronously. How then is TCP/IP supposed to notify the developer if packet delivery fails permanently (i.e. the destination host is no... | The Transmission Control Protocol (TCP) is designed to provide reliable, ordered, and error-checked delivery of a stream of bytes between applications running on hosts communicating over an IP network. The TCP/IP stack indeed has a mechanism for handling errors related to packet delivery.
### How TCP Reports Errors:
... | 18,950 | [
{
"from": "human",
"value": "How does TCP/IP report errors when packet delivery fails permanently? All Socket.write() APIs I've seen simply pass bytes to the underlying TCP/IP output buffer and transfer the data asynchronously. How then is TCP/IP supposed to notify the developer if packet delivery fails per... |
I find that quite often Visual Studio memory usage will average ~150-300 MB of RAM.
As a developer who very often needs to run with multiple instances of Visual Studio open, are there any performance tricks to optimize the amount of memory that VS uses?
I am running VS 2005 with one add-in (TFS)
| Running multiple instances of Visual Studio (VS) 2005 can indeed consume a significant amount of memory, especially when you're dealing with large solutions or have several projects open. Here are some performance tricks to help optimize memory usage and improve performance:
### 1. **Reduce the Number of Open Projects... | 20,289 | [
{
"from": "human",
"value": "I find that quite often Visual Studio memory usage will average ~150-300 MB of RAM.\nAs a developer who very often needs to run with multiple instances of Visual Studio open, are there any performance tricks to optimize the amount of memory that VS uses?\nI am running VS 2005 wi... |
Oracle FAQ defines temp table space as follows:
Temporary tablespaces are used to
manage space for database sort
operations and for storing global
temporary tables. For example, if you
join two large tables, and Oracle
cannot do the sort in memory, space
will be allocated in a temporary
tablespace for do... | To diagnose excessive usage of temporary tablespace and pinpoint what is causing it in your Oracle database application, you can follow several approaches. Here are some strategies to narrow down the source of the sorting operations and temp space usage:
### 1. Querying V$TEMPSEG_USAGE
You can query the `V$TEMPSEG_USA... | 19,027 | [
{
"from": "human",
"value": "Oracle FAQ defines temp table space as follows:\n\nTemporary tablespaces are used to\n manage space for database sort\n operations and for storing global\n temporary tables. For example, if you\n join two large tables, and Oracle\n cannot do the sort in memory, space\n wil... |
I can't quite figure out this syntax problem with a case expression in a do block.
What is the correct syntax?
If you could correct my example and explain it that would be the best.
module Main where
main = do
putStrLn "This is a test"
s <- foo
putStrLn s
foo = do
args <- getArgs
return... | In Haskell, when using a `case` expression, you must ensure it is properly placed in the context of a do block or a function. The `case` expression itself does not need to be wrapped in `return`, but instead should directly return the result.
In your code, the use of `return` around the `case` expression is incorrect... | 22,665 | [
{
"from": "human",
"value": "I can't quite figure out this syntax problem with a case expression in a do block.\nWhat is the correct syntax? \nIf you could correct my example and explain it that would be the best.\nmodule Main where \n\nmain = do \n putStrLn \"This is a test\"\n s <- foo\n put... |
Has anyone ever written a function that can convert all of the controls on an aspx page into a read only version? For example, if UserDetails.aspx is used to edit and save a users information, if someone with inappropriate permissions enter the page, I would like to render it as read-only. So, most controls would be ... | Creating a function to convert editable controls into read-only versions on an ASPX page can indeed be a useful approach to maintain the UI without needing a separate view. While there may not be an off-the-shelf solution, you can build a reusable method to handle this transformation for various types of controls. Here... | 18,425 | [
{
"from": "human",
"value": "Has anyone ever written a function that can convert all of the controls on an aspx page into a read only version? For example, if UserDetails.aspx is used to edit and save a users information, if someone with inappropriate permissions enter the page, I would like to render it a... |
I'm successfully using VBScript within WScript to remotely read and write IIS configurations from the server. When I attempt to run these same scripts from my desk box they fail, though. Example:
Dim vdir
Set vdir = GetObject("IIS://servername/w3svc/226/root")
Error = "Invalid syntax"
The code works perfectly when run... | When you're working with IIS configuration through ADSI (Active Directory Service Interfaces), you must ensure that the correct components are installed and that you have the necessary permissions to access the remote IIS server. Since you're trying to run VBScript from your XP workstation to interact with IIS on anoth... | 18,017 | [
{
"from": "human",
"value": "I'm successfully using VBScript within WScript to remotely read and write IIS configurations from the server. When I attempt to run these same scripts from my desk box they fail, though. Example:\nDim vdir\nSet vdir = GetObject(\"IIS://servername/w3svc/226/root\")\n\nError = \"I... |
My VB.Net Winforms app is a tool to allow hierarchical data to be edited in a tree, then stored in a database. I am using a treeview control.
Content is drag-dropped from other documents onto the treenodes, or the nodes can be edited directly.
if I edit the database field directly, and enter a bit of content (a thousan... | The truncation issue you are experiencing in your VB.Net WinForms application, where data is limited to 259 characters, could stem from several different factors. Here are some possibilities and how you might address them:
1. **TreeView Node Text Limitations**: The maximum length for a `TreeNode`'s `Text` property is ... | 15,000 | [
{
"from": "human",
"value": "My VB.Net Winforms app is a tool to allow hierarchical data to be edited in a tree, then stored in a database. I am using a treeview control.\nContent is drag-dropped from other documents onto the treenodes, or the nodes can be edited directly.\nif I edit the database field dire... |
I have a collection of classes that I want to serialize out to an XML file. It looks something like this:
public class Foo
{
public List<Bar> BarList { get; set; }
}
Where a bar is just a wrapper for a collection of properties, like this:
public class Bar
{
public string Property1 { get; set; }
public string Pro... | It looks like you're on the right track with the use of XML attributes to serialize your classes. However, there are a couple of small corrections needed in your attribute usage, particularly with regard to naming conventions and ensuring the serializer can properly serialize your properties.
Here's an updated version... | 18,281 | [
{
"from": "human",
"value": "I have a collection of classes that I want to serialize out to an XML file. It looks something like this:\npublic class Foo\n{\n public List<Bar> BarList { get; set; }\n}\n\nWhere a bar is just a wrapper for a collection of properties, like this:\npublic class Bar\n{\n public ... |
Is there anyone using Subsonic with asp.net mvc framework? If so, can you tell us something about your experience. Are there tips and tricks that can be shared?
| Subsonic is a powerful and lightweight ORM (Object-Relational Mapping) tool for .NET that can be used with the ASP.NET MVC framework. While my knowledge doesn't include personal experiences, I can share some common insights and tips based on community feedback and general practices.
### Experiences with Subsonic in AS... | 21,576 | [
{
"from": "human",
"value": "Is there anyone using Subsonic with asp.net mvc framework? If so, can you tell us something about your experience. Are there tips and tricks that can be shared?\n"
},
{
"from": "gpt",
"value": "Subsonic is a powerful and lightweight ORM (Object-Relational Mapping) to... |
I am curious on how others manage code promotion from DEV to TEST to PROD within an enterprise.
What tools or processes do you use to manage the "red tape", entry/exit criteria side of things?
My current organisation is half stuck between some custom online forms type functionality and paper based dependencies to submi... | Managing code promotion through different environments (DEV, TEST, PROD) in an enterprise setting often requires a well-defined process and robust tools to ensure quality, compliance, and traceability. Below are some popular tools and methodologies that can help streamline this process while addressing the "red tape" a... | 17,730 | [
{
"from": "human",
"value": "I am curious on how others manage code promotion from DEV to TEST to PROD within an enterprise.\nWhat tools or processes do you use to manage the \"red tape\", entry/exit criteria side of things?\nMy current organisation is half stuck between some custom online forms type functi... |
Not too practical maybe, but still interesting.
Having some abstract question on matrix multiplication I have quickly implemented a matrix for ints, then tested my assumptions.
And here I noticed that just int matrix is not good, if I occasionally want to use it with decimal or double. Of course, I could try just to ca... | You've raised an interesting question about designing a flexible and generic matrix class in a way that allows for operations like addition and multiplication with different numeric types, while respecting the operators that are inherently part of those types. Here’s a way to approach this problem using C++ as an examp... | 19,268 | [
{
"from": "human",
"value": "Not too practical maybe, but still interesting.\nHaving some abstract question on matrix multiplication I have quickly implemented a matrix for ints, then tested my assumptions.\nAnd here I noticed that just int matrix is not good, if I occasionally want to use it with decimal o... |
Syntax aside, what is the difference between
try {
}
catch() {
}
finally {
x = 3;
}
and
try {
}
catch() {
}
x = 3;
edit: in .NET 2.0?
so
try {
throw something maybe
x = 3
}
catch (...) {
x = 3
}
is behaviourally equivalent?
| In .NET (and generally in programming languages with `try`, `catch`, and `finally` blocks), the differences between the two code snippets you provided are related to the control flow and the guarantees about code execution, especially in the context of exceptions.
### First Snippet
```csharp
try {
// code that ma... | 21,051 | [
{
"from": "human",
"value": "Syntax aside, what is the difference between\ntry {\n}\ncatch() {\n}\nfinally {\n x = 3;\n}\n\nand \ntry {\n}\ncatch() {\n}\n\nx = 3;\n\nedit: in .NET 2.0?\n\nso\ntry {\n throw something maybe\n x = 3\n}\ncatch (...) {\n x = 3\n}\n\nis behaviourally equivalent?\n"
... |
Is there guide out there that will help me, A .Net developer whose been using Visual studio for some time, get to grips with Eclipse?
Even just a quick guide to eclipse.
Has anyone else made the transition, and if so how did you cope. Any Tips?
| Transitioning from Visual Studio to Eclipse can indeed be a bit challenging due to differences in the IDEs' interfaces and workflows, but many developers have made this transition successfully. Below is a quick guide to help you get started with Eclipse, as well as some tips to ease the transition.
### Quick Guide to ... | 16,695 | [
{
"from": "human",
"value": "Is there guide out there that will help me, A .Net developer whose been using Visual studio for some time, get to grips with Eclipse?\nEven just a quick guide to eclipse.\nHas anyone else made the transition, and if so how did you cope. Any Tips?\n"
},
{
"from": "gpt",
... |
I have 2 tables. One (domains) has domain ids, and domain names (dom_id, dom_url).
the other contains actual data, 2 of which columns require a TO and FROM domain names. So I have 2 columns rev_dom_from and rev_dom_for, both of which store the domain name id, from the domains table.
Simple.
Now I need to actually displ... | To display both domain names from your `domains` table based on the `rev_dom_from` and `rev_dom_for` columns in your data table, you need to perform two LEFT JOIN operations on the `domains` table—one for each domain column.
Here’s how you can structure your SQL query:
```sql
SELECT
reviews.*,
dom_for.dom_... | 22,748 | [
{
"from": "human",
"value": "I have 2 tables. One (domains) has domain ids, and domain names (dom_id, dom_url).\nthe other contains actual data, 2 of which columns require a TO and FROM domain names. So I have 2 columns rev_dom_from and rev_dom_for, both of which store the domain name id, from the domains t... |
I am building a C#/ASP.NET app with an SQL backend. I am on deadline and finishing up my pages, out of left field one of my designers incorporated a full text search on one of my pages. My "searches" up until this point have been filters, being able to narrow a result set by certain factors and column values.
Being th... | Implementing a full-text search in an ASP.NET application with an SQL Server backend can vary in complexity depending on the specifics of your project and the requirements of the search feature. However, in many cases, it is feasible to implement a basic full-text search without a monumental effort, especially if you a... | 18,987 | [
{
"from": "human",
"value": "I am building a C#/ASP.NET app with an SQL backend. I am on deadline and finishing up my pages, out of left field one of my designers incorporated a full text search on one of my pages. My \"searches\" up until this point have been filters, being able to narrow a result set by c... |
I want to do a select in MySql that combines several columns... something like this pseudocode:
SELECT payment1_paid AND payment2_paid AS paid_in_full
FROM denormalized_payments
WHERE payment1_type = 'check';
Edit: payment1_paid and payment2_paid are booleans.
I can't use any other language for this particular probl... | To create a query that combines two boolean columns (`payment1_paid` and `payment2_paid`) into a single column `paid_in_full`, you can use the `AND` operator directly in the `SELECT` statement. Since both columns are booleans, the result will be `TRUE` if both are `TRUE`, and `FALSE` otherwise.
Here's how you can writ... | 25,758 | [
{
"from": "human",
"value": "I want to do a select in MySql that combines several columns... something like this pseudocode:\nSELECT payment1_paid AND payment2_paid AS paid_in_full \nFROM denormalized_payments \nWHERE payment1_type = 'check';\n\nEdit: payment1_paid and payment2_paid are booleans.\nI can't u... |
Umm, I guess my questions in the title:
How do I turn on Option Strict / Infer in a VB.NET aspx page without a code behind file?
<%@ Page Language="VB" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
</script>
| In VB.NET, the `Option Strict` and `Option Infer` statements control type safety and type inference in the code. However, these options are typically set at the file level and can't be toggled directly in an inline code block or ASPX page without a code-behind file.
If you want to enable `Option Strict` and `Option In... | 21,047 | [
{
"from": "human",
"value": "Umm, I guess my questions in the title:\nHow do I turn on Option Strict / Infer in a VB.NET aspx page without a code behind file?\n<%@ Page Language=\"VB\" %>\n<script runat=\"server\">\n Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)\n\n End ... |
Here's the code I want to speed up. It's getting a value from an ADO recordset and converting it to a char*. But this is slow. Can I skip the creation of the _bstr_t?
_variant_t var = pRs->Fields->GetItem(i)->GetValue();
if (V_VT(&var) == VT_BSTR)
{
... | To speed up the conversion from a BSTR to a `char*`, you can avoid using the `_bstr_t` wrapper and instead convert the BSTR directly to a `char*`. This will typically result in less overhead. Here's how you can do that:
1. Use the `SysStringByteLen` and `WideCharToMultiByte` functions directly to convert the BSTR to a... | 21,071 | [
{
"from": "human",
"value": "Here's the code I want to speed up. It's getting a value from an ADO recordset and converting it to a char*. But this is slow. Can I skip the creation of the _bstr_t?\n _variant_t var = pRs->Fields->GetItem(i)->GetValue();\n\n if (V_VT(&var) ... |
When debugging JavaScript in Visual Studio 2008 and I use the ? command in the command window to list a JavaScript object's members I always get that ellipses {...}. Example:
>? Page_Validators
{...}
[0]: {object}
[1]: {object}
[2]: {object}
[3]: {object}
[4]: {object}
[5]: {object}
length... | In Visual Studio 2008, when you're debugging JavaScript and you see the `{...}` output for an object, it indicates that the object's properties and methods are too numerous or complex to display directly in the immediate window. However, you can utilize a few approaches to explore the members of a JavaScript object.
S... | 24,536 | [
{
"from": "human",
"value": "When debugging JavaScript in Visual Studio 2008 and I use the ? command in the command window to list a JavaScript object's members I always get that ellipses {...}. Example: \n>? Page_Validators \n{...}\n [0]: {object}\n [1]: {object}\n [2]: {object}\n [3]: {object}... |
I am writing some code to see if there is a hole in the firewall exception list for WinXP and Vista for a specific port used by our client software.
I can see that I can use the NetFwMgr.LocalPolicy.CurrentProfile.GloballyOpenPorts to get a list of the current Open port exceptions. But i can not figure out how to get... | Your Delphi code snippet appears to be trying to access a COM object (specifically the Windows Firewall API) to enumerate globally open ports. The Access Violation occurs because the `Item` method is not accessed properly in this context, as COM collections are typically accessed via the `Item` method with 1-based inde... | 18,331 | [
{
"from": "human",
"value": "I am writing some code to see if there is a hole in the firewall exception list for WinXP and Vista for a specific port used by our client software. \nI can see that I can use the NetFwMgr.LocalPolicy.CurrentProfile.GloballyOpenPorts to get a list of the current Open port except... |
We are trying to look at optimizing our localization testing.
Our QA group had a suggestion of a special mode to force all strings from the resources to be entirely contained of X. We already API hijack LoadString, and the MFC implementation of it, so doing it should not be a major hurdle.
My question is how would yo... | To accomplish the task of transforming a string to fit your requirements using C++, you will need to process the source string and replace certain characters while preserving the formatting and escape sequences. Here's how you can approach this:
1. **Iterate through the string** and look for characters that need to be... | 17,434 | [
{
"from": "human",
"value": "We are trying to look at optimizing our localization testing. \nOur QA group had a suggestion of a special mode to force all strings from the resources to be entirely contained of X. We already API hijack LoadString, and the MFC implementation of it, so doing it should not be a ... |
I tried to set innerHTML on an element in firefox and it worked fine, tried it in IE and got unexpected errors with no obvious reason why.
For example if you try and set the innerHTML of a table to " hi from stu " it will fail, because the table must be followed by a sequence.
| The behavior you're experiencing with `innerHTML` in Internet Explorer (IE) is due to how it handles parsing of HTML content, particularly for certain elements like `<table>`, `<tr>`, and `<td>`. While modern browsers like Firefox and Chrome are more forgiving with HTML structure, IE tends to be stricter and expects a ... | 21,137 | [
{
"from": "human",
"value": "I tried to set innerHTML on an element in firefox and it worked fine, tried it in IE and got unexpected errors with no obvious reason why.\nFor example if you try and set the innerHTML of a table to \" hi from stu \" it will fail, because the table must be followed by a sequence... |
I'm developing a mission-critical solution where data integrity is paramount and performance a close second. If data gets stuffed up, it's gonna be cata$trophic.
So, I'm looking for the C/C++ version of JTA (Java Transaction API). Does anyone know of any C or C++ libraries that supports distributed transactions? And ye... | You're correct that implementing distributed transactions can be a complex task, especially in C/C++. While the Java Transaction API (JTA) is a well-established solution in the Java ecosystem, the options for distributed transactions in C and C++ are more limited. Here are a few libraries and frameworks you can conside... | 21,052 | [
{
"from": "human",
"value": "I'm developing a mission-critical solution where data integrity is paramount and performance a close second. If data gets stuffed up, it's gonna be cata$trophic.\nSo, I'm looking for the C/C++ version of JTA (Java Transaction API). Does anyone know of any C or C++ libraries that... |
we're running in this issue. We're using a web service (using soap4r) to run some kind of searches and the problem appears when the webservice server is down and our aplication is trying to connect to it.
At that point the application is unreachable, and all the customers are blocked.
What can we do to avoid that? Is ... | Hi Roberto,
It sounds like you're encountering a situation where your application becomes unresponsive when trying to connect to a downed web service. To mitigate this issue, here are several strategies you can consider:
1. **Timeout Settings**: Ensure that your SOAP client (soap4r) has proper timeout settings. By de... | 20,517 | [
{
"from": "human",
"value": "we're running in this issue. We're using a web service (using soap4r) to run some kind of searches and the problem appears when the webservice server is down and our aplication is trying to connect to it. \nAt that point the application is unreachable, and all the customers are ... |
One of our programs is sometimes getting an OutOfMemory error on one user's machine, but of course not when I'm testing it. I just ran it with JProfiler (on a 10 day evaluation license because I've never used it before), and filtering on our code prefix, the biggest chunk both in total size and number of instances is ... | Diagnosing an `OutOfMemoryError` due to lingering object references can be challenging. Here are some strategies for identifying the references holding onto your instances and resolving the issue.
### Analyzing with JProfiler
1. **Identify Retained Size**:
In JProfiler, identify the retained size of the instances ... | 21,001 | [
{
"from": "human",
"value": "One of our programs is sometimes getting an OutOfMemory error on one user's machine, but of course not when I'm testing it. I just ran it with JProfiler (on a 10 day evaluation license because I've never used it before), and filtering on our code prefix, the biggest chunk both ... |
I have a row of data that I need to modify in a database, using a stored procedure. But in order to call that stored procedure, I need to know the name of the each column. How do I determine the name of the columns? (Hardcoding is not an option as we are talking a LOT of columns whose names may change).
EDIT: given the... | To retrieve the names of columns in a database table without hardcoding, you can use system tables or views that provide metadata about the structure of your tables. The exact method may vary slightly depending on the database management system (DBMS) you are using. Below are examples for some common databases:
### SQ... | 22,226 | [
{
"from": "human",
"value": "I have a row of data that I need to modify in a database, using a stored procedure. But in order to call that stored procedure, I need to know the name of the each column. How do I determine the name of the columns? (Hardcoding is not an option as we are talking a LOT of columns... |
How would I go about spawning a separate process using a SQL Server 05/08 trigger? Ideally, I would like to spawn the process and have SQL Server not wait on the process to finish execution. I need to pass a couple parameters from the insert that is triggering the process, but the executable would take care of the rest... | Spawning a separate process directly from a SQL Server 2005/2008 trigger is not straightforward and is generally discouraged for several reasons, including potential performance issues and complexity in managing transactions. However, you can accomplish this by using a combination of SQL Server features and external to... | 19,944 | [
{
"from": "human",
"value": "How would I go about spawning a separate process using a SQL Server 05/08 trigger? Ideally, I would like to spawn the process and have SQL Server not wait on the process to finish execution. I need to pass a couple parameters from the insert that is triggering the process, but t... |
I'm using NetBeans, trying to change the familiar Java coffee cup icon to a png file that I have saved in a resources directory in the jar file. I've found many different web pages that claim they have a solution, but so far none of them work.
Here's what I have at the moment (leaving out the try-catch block):
URL url... | It looks like you are trying to load an image from your JAR file, but the URL you're constructing is not correct for loading resources from the classpath. The `new URL(...)` approach won't work for loading resources from within a JAR; instead, you should use the `getResource()` method provided by the class loader.
Her... | 21,962 | [
{
"from": "human",
"value": "I'm using NetBeans, trying to change the familiar Java coffee cup icon to a png file that I have saved in a resources directory in the jar file. I've found many different web pages that claim they have a solution, but so far none of them work.\nHere's what I have at the moment ... |
The main focus of the package is developer tools but there is also one component (a DLL) that some small number of developers would like to redistribute with their own application. This is managed code running under .NET 3.5.
| When dealing with redistributing a DLL that is part of a developer tools package, there are several important factors to consider. Here’s a brief guide to help you navigate the process:
### 1. **License Agreement**
- **Check Licensing:** Ensure that the license agreement for the developer tools package allows for r... | 22,434 | [
{
"from": "human",
"value": "The main focus of the package is developer tools but there is also one component (a DLL) that some small number of developers would like to redistribute with their own application. This is managed code running under .NET 3.5.\n"
},
{
"from": "gpt",
"value": "When dea... |
I have this C-code to do multiplications over GF(8):
int32_t GaloisMultiply (int32_t a, int32_t b)
{
int32_t i;
int32_t mask = 0x100;
int32_t y = 0;
for(i=0;i<8;i++)
{
if(b & mask)
{
y ^= a;
}
mask >>= 1;
y <<= 1;
}
if(b & 0x1)
{
... | In GF(8), squaring an element \( x \) indeed has the effect of interleaving its bits, as the polynomial representation for GF(8) leads to this property. This effect can be exploited for optimization. Instead of doing the multiplication in the traditional sense, we can optimize for squaring \( x \).
Here’s a streamline... | 17,817 | [
{
"from": "human",
"value": "I have this C-code to do multiplications over GF(8):\nint32_t GaloisMultiply (int32_t a, int32_t b) \n{\n int32_t i;\n int32_t mask = 0x100;\n int32_t y = 0;\n\n for(i=0;i<8;i++) \n {\n if(b & mask) \n {\n y ^= a;\n }\n mask ... |
I haven't been around Java development for 8 years, but am starting to build a NetBeans Web Application. When I walk through the Web Application wizard, it asks for the server I'm going to be using.
What would be the best and simplest server for me to start using with NetBeans?
| For starting a web application in Java with NetBeans, the most popular and straightforward server you might consider is **Apache Tomcat**. Here are a few reasons why Tomcat is a good choice for beginners:
1. **Simplicity**: Tomcat is lightweight and easy to configure, making it suitable for new developers. It runs ser... | 21,750 | [
{
"from": "human",
"value": "I haven't been around Java development for 8 years, but am starting to build a NetBeans Web Application. When I walk through the Web Application wizard, it asks for the server I'm going to be using. \nWhat would be the best and simplest server for me to start using with NetBeans... |
Has anyone been able to implement the JQuery grid plugin, jqGrid? I'm trying to implement the JSON paging, and I feel like I'm getting close, but that I am also being swamped by inconsequential details. If anyone could post some sample code, I would greatly appreciate it.
| Certainly! Here's a basic example of how to implement the jqGrid plugin with JSON paging. This example assumes you have a server-side endpoint that returns a JSON response in the format expected by jqGrid.
### 1. Include the Required Libraries
Make sure you include jQuery and jqGrid in your HTML:
```html
<!DOCTYPE h... | 18,406 | [
{
"from": "human",
"value": "Has anyone been able to implement the JQuery grid plugin, jqGrid? I'm trying to implement the JSON paging, and I feel like I'm getting close, but that I am also being swamped by inconsequential details. If anyone could post some sample code, I would greatly appreciate it.\n"
}... |
I have some code which I am making available via RMI.
If my program terminates abnormally, I won't have called Naming.unbind(), and a reference to the object will presumably be hanging around in the RMI registry, and subsequent calls to Naming.bind() with the same name will fail.
How do I make sure that rogue reference... | You're correct in noting that if your RMI (Remote Method Invocation) server terminates abnormally, any references to the remote objects that were bound to the RMI registry using `Naming.bind()` will not be unbound. This could lead to issues when you try to re-bind an object using the same name.
To manage this situatio... | 19,998 | [
{
"from": "human",
"value": "I have some code which I am making available via RMI.\nIf my program terminates abnormally, I won't have called Naming.unbind(), and a reference to the object will presumably be hanging around in the RMI registry, and subsequent calls to Naming.bind() with the same name will fai... |
Does anyone have any pointers on how to read the Windows EventLog without using JNI? Or if you have to use JNI, are there any good open-source libraries for doing so?
| If you're looking to read the Windows Event Log without using JNI, there are a few options you can consider, but they often involve using external libraries or tools that provide a way to interface with the Windows Event Log from Java.
### Options Without JNI
1. **JNA (Java Native Access)**:
- JNA allows you to ca... | 17,987 | [
{
"from": "human",
"value": "Does anyone have any pointers on how to read the Windows EventLog without using JNI? Or if you have to use JNI, are there any good open-source libraries for doing so?\n"
},
{
"from": "gpt",
"value": "If you're looking to read the Windows Event Log without using JNI, ... |
Has anyone used CSLA in an application that has a WPF front end and a WCF wire for entities?
If so, which "entity framework" did you use? (nHibernate, Linq, etc...)
What were the hang-ups? What did it help you with?
I am concerned with implementing this for an application, not knowing how data-binding, validation with... | Using CSLA (Component-based Scalable Logical Architecture) with a WPF frontend and WCF for data transport can be a robust solution, but there are definitely considerations to take into account regarding data binding, validation, and performance. Here are some thoughts based on common experiences and best practices:
##... | 19,551 | [
{
"from": "human",
"value": "Has anyone used CSLA in an application that has a WPF front end and a WCF wire for entities? \nIf so, which \"entity framework\" did you use? (nHibernate, Linq, etc...)\nWhat were the hang-ups? What did it help you with?\nI am concerned with implementing this for an application,... |
I'm looking for a profiler to use with native C++. It certainly does not have to be free, however cost does factor into the purchase decision. This is for commercial work so I can't use personal or academic licensed copies.
The key features I'm looking for are:
Process level metrics
Component level metrics
Line-level ... | There are several profiling tools available for native C++ that meet your requirements. Here’s a list of some good options, along with reasons why they might fit your needs:
1. **Visual Studio Profiler**:
- **Cost**: Included with Visual Studio Professional and higher editions.
- **Usability**: Integrated into V... | 17,507 | [
{
"from": "human",
"value": "I'm looking for a profiler to use with native C++. It certainly does not have to be free, however cost does factor into the purchase decision. This is for commercial work so I can't use personal or academic licensed copies.\nThe key features I'm looking for are:\n\nProcess level... |
I want to capture as a bitmap the system cursor on Windows OSes as accurately as possible.
The provided API for this is to my knowledge GetCursorInfo, DrawIconEx.
The simple chain of actions is:
Get cursor by using GetCursorInfo
Paint the cursor in a memory DC by using DrawIconEx.
Here is how the code looks roughly.
... | To capture the current step of an animated cursor in Windows, you will need to use a few more Win32 API functions. Specifically, you can use `GetCursorInfo()` to retrieve the cursor handle, and then you can use `GetCursor()` to get the current cursor.
However, determining the current step of an animated cursor is not... | 21,342 | [
{
"from": "human",
"value": "I want to capture as a bitmap the system cursor on Windows OSes as accurately as possible.\nThe provided API for this is to my knowledge GetCursorInfo, DrawIconEx.\nThe simple chain of actions is:\n\nGet cursor by using GetCursorInfo\nPaint the cursor in a memory DC by using Dra... |
I have to use an other application (console) to pass some parameter to this program and inside my C# program get the output of that program. I would like not to see the console (all invisible to the user). How can I do that?
| To run another application from your C# program without showing a console window, you can use the `Process` class from the `System.Diagnostics` namespace. You need to configure the `ProcessStartInfo` to hide the window. Below is a simple example of how to accomplish this.
### Example Code
```csharp
using System;
usin... | 18,045 | [
{
"from": "human",
"value": "I have to use an other application (console) to pass some parameter to this program and inside my C# program get the output of that program. I would like not to see the console (all invisible to the user). How can I do that?\n"
},
{
"from": "gpt",
"value": "To run an... |
I have a memory buffer corresponding to my screen resolution (1280x800 at 24-bits-per-pixel) that contains my screen contents at 24bpp. I want to convert this to 8-bpp (ie. Halftone color palette in Windows).
I currently do this:
1. Use CreateDIBSection to allocate a new 1280x800 24-bpp buffer and access it as a DC, as... | To achieve your goal of converting a 1280x800 24-bpp buffer to an 8-bpp buffer without the intermediate `memcpy`, you can consider either approach you've outlined. Here's how to proceed with both methods:
### Method A: Wrapping Your Original Buffer in a DC
You can create a memory device context (DC) directly from you... | 11,800 | [
{
"from": "human",
"value": "I have a memory buffer corresponding to my screen resolution (1280x800 at 24-bits-per-pixel) that contains my screen contents at 24bpp. I want to convert this to 8-bpp (ie. Halftone color palette in Windows).\nI currently do this:\n1. Use CreateDIBSection to allocate a new 1280x... |
I want to use Phing as a build tool and I was wondering if there any (web) interface for generating build files.
Any recommendations on alternative methods to writing those by hand would be appreciated as well.
| Phing is a build tool for PHP that uses XML to define build processes, similar to Apache Ant. While it is powerful and flexible, Phing does not come with an official web interface for generating build files. However, you do have several options for generating or managing Phing build files without writing them entirely ... | 21,356 | [
{
"from": "human",
"value": "I want to use Phing as a build tool and I was wondering if there any (web) interface for generating build files.\nAny recommendations on alternative methods to writing those by hand would be appreciated as well.\n"
},
{
"from": "gpt",
"value": "Phing is a build tool... |
How to read a web server log file in Java. This file is getting updated all the time. If I open a new FileInputStream, will it read the log real time?
Regards
| To read a web server log file in real time using Java, you would typically need to keep the file stream open and read new data as it becomes available. If you open a `FileInputStream` only once and read its content, it won't automatically update as the log file is modified, because file input streams are designed to re... | 16,389 | [
{
"from": "human",
"value": "How to read a web server log file in Java. This file is getting updated all the time. If I open a new FileInputStream, will it read the log real time?\nRegards \n"
},
{
"from": "gpt",
"value": "To read a web server log file in real time using Java, you would typical... |
I decided to install APC to speed up the site that I work for. Sadly, I found out that it was already installed and enabled(The developer who first worked on the servers has moved on).
Then I decided to check the usage of it to see if it needs more memory allocated to it or not. This is when I discovered something weir... | It looks like you're experiencing issues with APC (Alternative PHP Cache) where it behaves differently when accessed through Apache versus the command line interface (CLI). Here are a few steps you can take to troubleshoot and potentially resolve the issue:
### 1. Check PHP SAPI
Ensure that the PHP running in Apache a... | 16,740 | [
{
"from": "human",
"value": "I decided to install APC to speed up the site that I work for. Sadly, I found out that it was already installed and enabled(The developer who first worked on the servers has moved on).\nThen I decided to check the usage of it to see if it needs more memory allocated to it or not... |
In this asp.net I'm cleaning up it's possible for deadlocks to occur. I want to make sure that the code deals with them properly, so I'm trying to write NUnit tests which trigger a deadlock.....
The DAO is split by entity. Each entity has a set of tests which are surrounded by Startup() and Teardown() methods which c... | Simulating deadlocks in a database environment, particularly with ADO.NET and TransactionScope, can be tricky since you want to create a scenario where two transactions are waiting on each other. Here is a way to reliably reproduce deadlocks in your NUnit tests using SQL Server and TransactionScope.
### Steps to Creat... | 18,228 | [
{
"from": "human",
"value": "In this asp.net I'm cleaning up it's possible for deadlocks to occur. I want to make sure that the code deals with them properly, so I'm trying to write NUnit tests which trigger a deadlock.....\nThe DAO is split by entity. Each entity has a set of tests which are surrounded b... |
I am trying to sort a list using delegates but I am getting a signature match error. The compiler says I cannot convert from an 'anonymous method'
List<MyType> myList = GetMyList();
myList.Sort( delegate (MyType t1, MyType t2) { return (t1.ID < t2.ID); } );
What am I missing?
Here are some references I found and they... | The error you're encountering is due to the fact that the `Sort` method in the `List<T>` class expects a comparison delegate that returns an `int`, not a `bool`. The delegate you provided returns a `bool`, which is why the compiler cannot convert it.
To fix this issue, you need to change the comparison logic to return... | 24,344 | [
{
"from": "human",
"value": "I am trying to sort a list using delegates but I am getting a signature match error. The compiler says I cannot convert from an 'anonymous method' \nList<MyType> myList = GetMyList();\nmyList.Sort( delegate (MyType t1, MyType t2) { return (t1.ID < t2.ID); } );\n\nWhat am I missi... |
I'm relatively new to web application programming so I hope this question isn't too basic for everyone.
I created a HTML page with a FORM containing a dojox datagrid (v1.2) filled with rows of descriptions for different grocery items. After the user selects the item he's interested in, he will click on the "Submit" ... | Welcome to web application programming! It's great that you're exploring ways to handle data between different pages. Based on your description, passing the item ID as a URL query string parameter is a common and straightforward approach. However, let’s explore a few options and discuss their pros and cons.
### 1. **U... | 21,643 | [
{
"from": "human",
"value": "I'm relatively new to web application programming so I hope this question isn't too basic for everyone. \nI created a HTML page with a FORM containing a dojox datagrid (v1.2) filled with rows of descriptions for different grocery items. After the user selects the item he's int... |
This is my query:
$query = $this->db->query('
SELECT archives.id, archives.signature, type_of_source.description, media_type.description, origin.description
FROM archives, type_of_source, media_type, origin
WHERE archives.type_of_source_id = type... | In SQL queries, when you have multiple columns with the same name (like `description` from different tables), it's a good practice to give them unique aliases. This prevents confusion and makes it easier to reference them in your output.
To address your situation, you can modify your SQL query to include aliases for e... | 21,617 | [
{
"from": "human",
"value": "This is my query:\n$query = $this->db->query('\n SELECT archives.id, archives.signature, type_of_source.description, media_type.description, origin.description \n FROM archives, type_of_source, media_type, origin ... |
I noticed the following today: Mono at the PDC 2008?
My talk will cover new technologies that we have created as part of Mono. Some of them are reusable on .NET (we try to make our code cross platform) and some other are features that specific to Mono's implementation of the CLI.
Posted by Miguel de Icaza on 01 Oct ... | In Miguel de Icaza's talk at PDC 2008, he highlighted several new technologies and features related to the Mono project. Here’s a brief overview of the topics he mentioned:
1. **Mono's SIMD Support**: SIMD (Single Instruction, Multiple Data) support allows for efficient processing of data using vectorized instructions... | 23,546 | [
{
"from": "human",
"value": "I noticed the following today: Mono at the PDC 2008?\n\nMy talk will cover new technologies that we have created as part of Mono. Some of them are reusable on .NET (we try to make our code cross platform) and some other are features that specific to Mono's implementation of the ... |
Does anyone know of a good dictionary API or ruby library to lookup the definitions of words?
I'm thinking it should work something like:
I call get_definition(word)
It returns the definition for that word (ideally in some way to easily format the definition for display.
Thanks
| Yes, there are several dictionary APIs and Ruby libraries that can help you look up word definitions. Here are some options:
### Dictionary APIs
1. **Merriam-Webster Dictionary API**
- Offers definitions, examples, synonyms, and antonyms.
- Requires an API key (free for limited usage).
- Documentation: [Merr... | 21,717 | [
{
"from": "human",
"value": "Does anyone know of a good dictionary API or ruby library to lookup the definitions of words?\nI'm thinking it should work something like:\n\nI call get_definition(word)\nIt returns the definition for that word (ideally in some way to easily format the definition for display.\n\... |
My production system occasionally exhibits a memory leak I have not been able to reproduce in a development environment. I've used a Python memory profiler (specifically, Heapy) with some success in the development environment, but it can't help me with things I can't reproduce, and I'm reluctant to instrument our pro... | To analyze memory issues in a production Python system where you can't reproduce the memory leak easily, capturing a snapshot of your Python process can provide valuable insights. Here's how you can achieve this, along with steps for analysis:
### Step 1: Capturing a Snapshot of the Python Process
1. **Use `faulthand... | 17,964 | [
{
"from": "human",
"value": "My production system occasionally exhibits a memory leak I have not been able to reproduce in a development environment. I've used a Python memory profiler (specifically, Heapy) with some success in the development environment, but it can't help me with things I can't reproduce... |
Assuming a fluid layout is not an option (since that is a different discussion all together), what is the recommended width for a site layout? What are the pros and cons of different sizes?
| When designing a fixed-width layout for a website, the recommended width can vary based on your target audience, content type, and design aesthetic. However, some common widths tend to work well based on typical screen sizes. Here are the most common fixed widths and their pros and cons:
### Common Fixed Widths
1. **... | 19,160 | [
{
"from": "human",
"value": "Assuming a fluid layout is not an option (since that is a different discussion all together), what is the recommended width for a site layout? What are the pros and cons of different sizes?\n"
},
{
"from": "gpt",
"value": "When designing a fixed-width layout for a we... |
I need to take a paragraph of text and extract from it a list of "tags". Most of this is quite straight forward. However I need some help now stemming the resulting word list to avoid duplicates. Example: Community / Communities
I've used an implementation of Porter Stemmer algorithm (I'm writing in PHP by the way):
h... | The challenge you're facing with stemming algorithms is that they can sometimes produce roots that aren't actual words, which makes it difficult when you want to maintain human-readable tags. Here are some strategies you can consider to solve this problem:
1. **Use Lemmatization Instead of Stemming**: While stemming r... | 17,801 | [
{
"from": "human",
"value": "I need to take a paragraph of text and extract from it a list of \"tags\". Most of this is quite straight forward. However I need some help now stemming the resulting word list to avoid duplicates. Example: Community / Communities\nI've used an implementation of Porter Stemmer ... |
I'm trying to call the OpenThemeData (see msdn OpenThemeData) function but I couldn't determine what are the acceptable Class names to be passed in by the pszClassList parameter.
HTHEME OpenThemeData(
HWND hwnd,
LPCWSTR pszClassList
);
Could anybody tell me what are the acceptable class names that I can ... | The `OpenThemeData` function in the Windows API is used to obtain a handle to a theme for the specified window based on the specified class names. The acceptable class names you can pass as the `pszClassList` parameter correspond to the common Windows controls and UI elements that can have themes applied to them.
Here... | 21,931 | [
{
"from": "human",
"value": "I'm trying to call the OpenThemeData (see msdn OpenThemeData) function but I couldn't determine what are the acceptable Class names to be passed in by the pszClassList parameter.\nHTHEME OpenThemeData( \n HWND hwnd,\n LPCWSTR pszClassList\n);\n\nCould anybody tell me ... |
In the Java code I'm working with we have an interface to define our Data Access Objects(DAO). Most of the methods take a parameter of a Data Transfer Object (DTO). The problem occurs when an implementation of the DAO needs to refer to a specific type of DTO. The method then needs to do a (to me completely unnecessary ... | To achieve type safety in your DAO interface and its implementations without unnecessary casting, you can use Java generics. By defining a generic interface, you can specify the type of DTO each DAO implementation will handle. This allows the compiler to enforce type checking and eliminates the need for casting.
Here’... | 22,737 | [
{
"from": "human",
"value": "In the Java code I'm working with we have an interface to define our Data Access Objects(DAO). Most of the methods take a parameter of a Data Transfer Object (DTO). The problem occurs when an implementation of the DAO needs to refer to a specific type of DTO. The method then nee... |
I need to generate a new interface at run-time with all the same members as an existing interface, except that I will be putting different attributes on some of the methods (some of the attribute parameters are not known until run-time). How can it be achieved?
| Generating a new interface at runtime with all the same members as an existing interface but with different attributes for some methods is a more advanced task in C#. It involves using Reflection and Dynamic Type Creation.
In C#, you can use the `System.Reflection.Emit` namespace to define new types at runtime. Here's... | 16,317 | [
{
"from": "human",
"value": "I need to generate a new interface at run-time with all the same members as an existing interface, except that I will be putting different attributes on some of the methods (some of the attribute parameters are not known until run-time). How can it be achieved?\n"
},
{
"... |
If I'm deploying to servers with WebSphere 6.1 (Java 1.5), should I use IBM's JDK on my build box? Or will Sun's JDK compile to the same binary?
If I should use IBM's, where can I get the Windows x64 version?
| When deploying to servers running WebSphere 6.1, which is based on Java 1.5, it is generally advisable to use IBM's JDK on your build box. This ensures compatibility since IBM's JDK may include specific optimizations, extensions, or proprietary implementations that are designed to work specifically with WebSphere. Whil... | 15,276 | [
{
"from": "human",
"value": "If I'm deploying to servers with WebSphere 6.1 (Java 1.5), should I use IBM's JDK on my build box? Or will Sun's JDK compile to the same binary?\nIf I should use IBM's, where can I get the Windows x64 version?\n"
},
{
"from": "gpt",
"value": "When deploying to serve... |
I have a ASP.NET GridView with a column mapped to a boolean. I want do display "Yes"/"No" instead of "True"/"False". Well actually I want "Ja"/"Nej" (in Danish).
Is this possible?
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="false">
<columns>
...
<asp:boundfield headertext="Acti... | Yes, you can display "Ja" (for true) and "Nej" (for false) in your ASP.NET GridView instead of the default "True" and "False" values. The `BoundField` doesn't support custom formatting of boolean values directly with a format string. However, you can achieve this by using a `TemplateField`, which allows you to define a... | 21,847 | [
{
"from": "human",
"value": "I have a ASP.NET GridView with a column mapped to a boolean. I want do display \"Yes\"/\"No\" instead of \"True\"/\"False\". Well actually I want \"Ja\"/\"Nej\" (in Danish).\nIs this possible? \n<asp:gridview id=\"GridView1\" runat=\"server\" autogeneratecolumns=\"false\">\n ... |
Why do computers use RGB (red, green, and blue) values for color composition rather than the primary hues, red, yellow, and blue?
| Computers use RGB (Red, Green, Blue) values for color composition primarily due to the way light works and how human vision perceives color. Here are some key reasons:
1. **Additive Color Model**: RGB is based on the additive color model, which means that colors are created by combining different intensities of light.... | 22,343 | [
{
"from": "human",
"value": "Why do computers use RGB (red, green, and blue) values for color composition rather than the primary hues, red, yellow, and blue?\n"
},
{
"from": "gpt",
"value": "Computers use RGB (Red, Green, Blue) values for color composition primarily due to the way light works a... |
I can't retrieve cookie maxage it always returns -1
Creating cookie:
Cookie securityCookie = new Cookie("sec", "somevalue");
securityCookie.setMaxAge(EXPIRATION_TIME);
Retrieve cookie:
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for(int i=0; i<cookies.length; i++) {
Cookie cookie = cook... | The issue you're experiencing with retrieving the `maxAge` of your cookie is related to how cookies are handled in the HTTP protocol.
### Explanation:
1. **Setting Max-Age**: When you create a cookie and set its `maxAge` using `securityCookie.setMaxAge(EXPIRATION_TIME);`, you are instructing the browser how long to k... | 16,588 | [
{
"from": "human",
"value": "I can't retrieve cookie maxage it always returns -1\nCreating cookie:\nCookie securityCookie = new Cookie(\"sec\", \"somevalue\");\nsecurityCookie.setMaxAge(EXPIRATION_TIME);\n\nRetrieve cookie:\nCookie[] cookies = request.getCookies();\nif (cookies != null) {\n for(int i=0; ... |
I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy requires, is that possible? Here is my current configuration:
<defaultProxy useDefaultCredentials="false">
<proxy us... | When configuring a web application to use a proxy server with authentication, specifying credentials in the configuration file directly can sometimes be challenging, especially if you're working with a closed-source CMS. However, there are a few approaches you can consider to include credentials for your proxy server:
... | 19,541 | [
{
"from": "human",
"value": "I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy requires, is that possible? Here is my current configuration:\n<defaultProxy us... |
I'm using LINQ to SQL and C#. I have two LINQ classes: User and Network.
User has UserID (primary key) and NetworkID
Network has NetworkID (primary key) and an AdminID (a UserID)
The following code works fine:
user.Network.AdminID = 0;
db.SubmitChanges();
However, if I access the AdminID before making the change, t... | The issue you're encountering relates to how LINQ to SQL manages object state and change tracking. When you retrieve an entity (like `Network`) and access its properties, LINQ to SQL performs change tracking on that object. However, the key point is that the property you're accessing must be correctly recognized as cha... | 21,326 | [
{
"from": "human",
"value": "I'm using LINQ to SQL and C#. I have two LINQ classes: User and Network. \nUser has UserID (primary key) and NetworkID\nNetwork has NetworkID (primary key) and an AdminID (a UserID)\nThe following code works fine:\nuser.Network.AdminID = 0;\ndb.SubmitChanges();\n\nHowever, if ... |
I was going through the AWDR book on web development with ruby on rails and one of the issues with the old code was it didn't use respond_to to make sure the view used would be the javascript view. Now in some updated examples I've seen people mention they later, when implementing graceful degradation, use request.xhr?... | You're on the right track in thinking about how to structure your Rails controller actions to handle both JavaScript and HTML formats effectively. The use of `respond_to` is indeed a good approach when you want to serve different formats based on the request type, but there are some nuances to keep in mind.
In your ex... | 21,521 | [
{
"from": "human",
"value": "I was going through the AWDR book on web development with ruby on rails and one of the issues with the old code was it didn't use respond_to to make sure the view used would be the javascript view. Now in some updated examples I've seen people mention they later, when implementi... |
OpenGL. Let's say I've drawn one image and then the second one using XOR. Now I've got black buffer with non-black pixels somewhere, I've read that I can use shaders to count black [ rgb(0,0,0) ] pixels ON GPU?
I've also read that it has to do something with OcclusionQuery.
http://oss.sgi.com/projects/ogl-sample/regis... | Counting black pixels in an image rendered to a framebuffer using OpenGL can indeed be achieved using shaders, but the method you might want to consider does not necessarily involve occlusion queries. Instead, you can use a compute shader or a fragment shader that processes the pixels in the framebuffer directly.
### ... | 16,357 | [
{
"from": "human",
"value": "OpenGL. Let's say I've drawn one image and then the second one using XOR. Now I've got black buffer with non-black pixels somewhere, I've read that I can use shaders to count black [ rgb(0,0,0) ] pixels ON GPU? \nI've also read that it has to do something with OcclusionQuery.\nh... |
Scaffolding, what is it? Is it a Rails-only thing?
| Scaffolding is a development technique used in web frameworks to generate the basic structure of an application, typically including the code for the model, view, and controller layers. It automates the creation of these components, allowing developers to quickly set up a working prototype of an application without hav... | 24,220 | [
{
"from": "human",
"value": "Scaffolding, what is it? Is it a Rails-only thing?\n"
},
{
"from": "gpt",
"value": "Scaffolding is a development technique used in web frameworks to generate the basic structure of an application, typically including the code for the model, view, and controller laye... |
We are considering using ClearCase Multisite to enable the offshore development team. The other option is the ClearCase Remote Client using the local (onshore) ClearCase installation. Has anyone had experiences using Multisite? Is the synchronization and management hassle worth offshore being able to use the fat client... | Using ClearCase Multisite versus ClearCase Remote Client involves weighing the advantages of each in terms of performance, usability, synchronization, and management overhead.
### ClearCase Multisite
**Advantages:**
1. **Fat Client Experience**: Developers offshore can utilize the full features of the ClearCase fat c... | 22,314 | [
{
"from": "human",
"value": "We are considering using ClearCase Multisite to enable the offshore development team. The other option is the ClearCase Remote Client using the local (onshore) ClearCase installation. Has anyone had experiences using Multisite? Is the synchronization and management hassle worth ... |
Is it possible to create a .NET equivalent to the following code?
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_... | Yes, you can create a .NET equivalent of the PHP code you provided using ASP.NET. Below is a simple example of how to implement HTTP Basic Authentication in an ASP.NET Core application.
First, you can set up a static username and password in the `appsettings.json` file. Then, you can use middleware to handle the auth... | 18,148 | [
{
"from": "human",
"value": "Is it possible to create a .NET equivalent to the following code?\n<?php\nif (!isset($_SERVER['PHP_AUTH_USER'])) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Text to send if user hits Cancel button';\n exit;... |
I have a nice little file upload control I wrote for ASP.NET webforms that utilizes an IFrame and ASP.NET AJAX.
However, on large uploads, the browser times out before it can finish posting the form.
Is there a way I can increase this?
I'm not really interesting in alternative solutions, so don't suggest changing the e... | To increase the timeout for large file uploads in an ASP.NET WebForms application, you can adjust a few settings in your web application. Here's a breakdown of what you need to do:
### 1. Update `web.config` Settings
You can increase the `executionTimeout` and `maxRequestLength` in your `web.config` file. Here’s how ... | 23,601 | [
{
"from": "human",
"value": "I have a nice little file upload control I wrote for ASP.NET webforms that utilizes an IFrame and ASP.NET AJAX.\nHowever, on large uploads, the browser times out before it can finish posting the form.\nIs there a way I can increase this?\nI'm not really interesting in alternativ... |
I work for a product development company.We first do internal releases,and then public release.I was wondering, how other product developing companies manage their release? How do you give release number? Tag the source control?
| Managing product releases effectively is crucial for product development companies. The practices can vary depending on the company’s size, product type, and development methodologies (e.g., Agile, Waterfall). However, there are common strategies many companies use for managing releases, assigning version numbers, and ... | 19,863 | [
{
"from": "human",
"value": "I work for a product development company.We first do internal releases,and then public release.I was wondering, how other product developing companies manage their release? How do you give release number? Tag the source control?\n"
},
{
"from": "gpt",
"value": "Manag... |
Using only VBScript (launched from Windows Scripting Host) can I pull the DLL metadata from kernel32.dll? Specifically, I'm looking for the version info and the architecture specified in the DLL header. Can this be done without any dependencies?
| Yes, you can retrieve version information and architecture from `kernel32.dll` using VBScript, but you need to utilize the Windows Script Host (WSH) and the Windows API to access this information. Here's how you can do it without any external dependencies.
### Getting Version Information
To pull the version informati... | 22,363 | [
{
"from": "human",
"value": "Using only VBScript (launched from Windows Scripting Host) can I pull the DLL metadata from kernel32.dll? Specifically, I'm looking for the version info and the architecture specified in the DLL header. Can this be done without any dependencies?\n"
},
{
"from": "gpt",
... |
I am building a menu and have it set up so that I use a standard <!--#include virtual = "myDoc.xml" --> SSI tag to include my xml document. The xml document includes the xsl document with <?xml-stylesheet type="text/xsl" href="myOtherDoc.xsl"?>. For some reason the xsl document is not working. The xml is being displ... | When you include an XML document that references an XSL stylesheet using the `<?xml-stylesheet?>` processing instruction, it typically works when viewed directly in a browser that supports XSLT transformation. However, when serving XML through an SSI (Server Side Includes) directive like `<!--#include virtual="myDoc.xm... | 20,047 | [
{
"from": "human",
"value": "I am building a menu and have it set up so that I use a standard <!--#include virtual = \"myDoc.xml\" --> SSI tag to include my xml document. The xml document includes the xsl document with <?xml-stylesheet type=\"text/xsl\" href=\"myOtherDoc.xsl\"?>. For some reason the xsl ... |
I came across this class while reading a C# book and have some questions.
Why is this added into System.Linq namespace and not into usuall Collections namespace?
What the intention behind this class is
Why this class is not intended for direct instantiation? This is available through the ToLookup extension only, right... | The class you're referring to is likely `Lookup<TKey, TElement>`, which is part of the System.Linq namespace in C#. Let's address each of your questions one by one:
### 1. Why is `Lookup<TKey, TElement>` added to the System.Linq namespace and not the usual Collections namespace?
The `Lookup<TKey, TElement>` class is ... | 19,554 | [
{
"from": "human",
"value": "I came across this class while reading a C# book and have some questions.\n\nWhy is this added into System.Linq namespace and not into usuall Collections namespace?\nWhat the intention behind this class is\nWhy this class is not intended for direct instantiation? This is availab... |
A client using our system has requested that we store the SSNs/SINs of the end users in our database. Currently, we store minimal information about users (name, email address, and optionally, country), so I'm not overly concerned about a security breach - however, I have a suspicion there could be legal issues about st... | Yes, there are valid concerns regarding the storage of Social Security Numbers (SSNs) in the U.S. and Social Insurance Numbers (SINs) in Canada. Here are a few key points to consider:
### Legal Concerns
1. **Data Protection Laws**:
- In the U.S., the handling of SSNs is subject to various federal and state laws. F... | 17,955 | [
{
"from": "human",
"value": "A client using our system has requested that we store the SSNs/SINs of the end users in our database. Currently, we store minimal information about users (name, email address, and optionally, country), so I'm not overly concerned about a security breach - however, I have a suspi... |
I am playing with a CAD application using MFC. I was thinking it would be nice to save the document (model) as an SQLite database.
Advantages:
I avoid file format changes (SQLite takes care of that)
Free query engine
Undo stack is simplified (table name, column name, new value
and so on...)
Opinions?
| Using SQLite to save your CAD application documents can indeed offer several advantages, as you noted. Let's delve into some of the points you raised, along with some additional considerations:
### Advantages
1. **File Format Stability**: By using a database like SQLite, you can abstract the underlying data structure... | 18,831 | [
{
"from": "human",
"value": "I am playing with a CAD application using MFC. I was thinking it would be nice to save the document (model) as an SQLite database.\nAdvantages:\n\nI avoid file format changes (SQLite takes care of that)\nFree query engine\nUndo stack is simplified (table name, column name, new v... |
I am working on an application that loads a generic list of objects into an RDLC report, which is then rendered on the client machine using the WebForms ReportViewer Control. It renders fine and exports fine, but if I try to print it, it spools maybe 500k to the printer and then stops responding.
| When you encounter issues with printing an RDLC report using the WebForms ReportViewer Control, there can be several factors at play. Here are some steps you can take to diagnose and potentially resolve the problem:
1. **Check Report Size and Complexity**:
- Large reports or those with complex layouts can lead to p... | 18,647 | [
{
"from": "human",
"value": "I am working on an application that loads a generic list of objects into an RDLC report, which is then rendered on the client machine using the WebForms ReportViewer Control. It renders fine and exports fine, but if I try to print it, it spools maybe 500k to the printer and then... |
For my current project, I need to request XML data over a tcp/ip socket connection. For this, I am using the TcpClient class:
Dim client As New TcpClient()
client.Connect(server, port)
Dim stream As NetworkStream = client.GetStream()
stream.Write(request)
stream.Read(buffer, 0, buffer.length)
// Output buffer and re... | When dealing with TCP/IP sockets, it's crucial to recognize that TCP is a stream-oriented protocol, meaning that it does not preserve message boundaries. As a result, the data you read from the socket may not always correspond to the exact structure of the XML message you expect. To handle larger blocks of data effecti... | 20,756 | [
{
"from": "human",
"value": "For my current project, I need to request XML data over a tcp/ip socket connection. For this, I am using the TcpClient class:\nDim client As New TcpClient()\nclient.Connect(server, port)\n\nDim stream As NetworkStream = client.GetStream()\nstream.Write(request)\nstream.Read(buf... |
While simple, interface-driven event notification frameworks in Java have been around since pre-Cambrian times (e.g. java.beans.PropertyChangeSupport), it is becoming increasingly popular for frameworks to use annotation-driven event notification instead.
For an example, see JBossCache 2.2. The listener class has its... | Yes, there are several existing frameworks and libraries in Java that implement annotation-driven event notification systems. While JBossCache is one example, there are others that you might find useful for your needs. Here are a few options:
1. **Spring Framework**:
- Spring provides a powerful event handling mec... | 18,111 | [
{
"from": "human",
"value": "While simple, interface-driven event notification frameworks in Java have been around since pre-Cambrian times (e.g. java.beans.PropertyChangeSupport), it is becoming increasingly popular for frameworks to use annotation-driven event notification instead. \nFor an example, see ... |
I have a micro-mini-search engine that highlights the search terms in my rails app. The search ignores accents and the highlight is case insensitive. Almost perfect.
But, for instance if I have a record with the text "pão de queijo" and searches for "pao de queijo" the record is returned but the iext is not highlighted... | To handle the accent-insensitive search and ensure that highlighting works correctly when the search terms contain characters that are different from the text, you need to normalize the text before highlighting. In Ruby, you can use the `unicode_utils` gem for this purpose, which can help you to handle accent normaliza... | 21,451 | [
{
"from": "human",
"value": "I have a micro-mini-search engine that highlights the search terms in my rails app. The search ignores accents and the highlight is case insensitive. Almost perfect.\nBut, for instance if I have a record with the text \"pão de queijo\" and searches for \"pao de queijo\" the reco... |
I have an HTML wrapper that contains a Flex application, is there an Event that I can listen on, that is triggered when a user leaves the HTML wrapper either by navigation arrows or closing the browser?
Thanks.
| When you're dealing with an HTML wrapper that contains a Flex application, the events you can listen for are primarily JavaScript events related to the window or document. You might want to listen for the `beforeunload` event, which triggers when the user is about to leave the page, whether by navigating away or closin... | 23,025 | [
{
"from": "human",
"value": "I have an HTML wrapper that contains a Flex application, is there an Event that I can listen on, that is triggered when a user leaves the HTML wrapper either by navigation arrows or closing the browser?\nThanks. \n"
},
{
"from": "gpt",
"value": "When you're dealing w... |
I have a site, from which you can download an HTML file. This HTML file contains a form with hidden fields, which is right away posted back to the site using JavaScript. This is a way of allowing users to download to their own machine data that they edit on the site.
On some machines, you get an IE "yellow bar" when tr... | The issue you're encountering is related to Internet Explorer's (IE) security settings and how they handle HTML files that are downloaded directly from the web versus those that are opened from a local source, such as an email attachment. This behavior is often governed by the browser's security policies, which are des... | 19,892 | [
{
"from": "human",
"value": "I have a site, from which you can download an HTML file. This HTML file contains a form with hidden fields, which is right away posted back to the site using JavaScript. This is a way of allowing users to download to their own machine data that they edit on the site.\nOn some ma... |
Is there any real practical difference between "java -server" and "java -client"?
All I can find on Sun's site is a vague
"-server starts slower but should run faster".
What are the real differences? (Using JDK 1.6.0_07 currently.)
| The `-server` and `-client` options for the Java Virtual Machine (JVM) control which version of the Java HotSpot VM to use when running your Java application. These options primarily influence the performance characteristics of the JVM, especially in relation to the type of application being executed.
Here are the ma... | 22,403 | [
{
"from": "human",
"value": "Is there any real practical difference between \"java -server\" and \"java -client\"? \nAll I can find on Sun's site is a vague \n\n\"-server starts slower but should run faster\". \n\nWhat are the real differences? (Using JDK 1.6.0_07 currently.)\n"
},
{
"from": "gpt... |
I need to call a method that accepts a stream argument. The method loads text into the stream, which would normally be a file. I'd like to simply populate a string with the contents of the stream, instead of writing it to a file. How do I do this?
| You can achieve this by using a `MemoryStream` in combination with a `StreamWriter` to write the text to memory instead of a file. Here's a step-by-step approach in C#:
1. Create a `MemoryStream` to hold the data in memory.
2. Use a `StreamWriter` to write the text into the `MemoryStream`.
3. Reset the position of the... | 21,229 | [
{
"from": "human",
"value": "I need to call a method that accepts a stream argument. The method loads text into the stream, which would normally be a file. I'd like to simply populate a string with the contents of the stream, instead of writing it to a file. How do I do this?\n"
},
{
"from": "gpt",
... |
I want to add the option of automatic port forwarding (NAT Traversal) to an application.
I know this can be done using UPnP (specifically the part that communicates with the device presenting itself as an IGD - Internet Gateway Device).
I need to be able to test this port forwarding feature while developing it. And wha... | Yes, there are several options you can use to emulate a UPnP-compatible router for testing purposes. Here are a few software solutions you might consider:
1. **MiniUPnP**: This is an open-source project that provides a UPnP IGD (Internet Gateway Device) implementation. You can set it up on a local machine to act as a ... | 23,064 | [
{
"from": "human",
"value": "I want to add the option of automatic port forwarding (NAT Traversal) to an application.\nI know this can be done using UPnP (specifically the part that communicates with the device presenting itself as an IGD - Internet Gateway Device).\nI need to be able to test this port forw... |
Update: Looks like the query does not throw any timeout. The connection is timing out.
This is a sample code for executing a query. Sometimes, while executing time consuming queries, it throws a timeout exception.
I cannot use any of these techniques:
1) Increase timeout.
2) Run it asynchronously with a callback. This ... | If you're facing a timeout issue on the connection rather than the command execution, and you're unable to increase the timeout or run the command asynchronously, you can consider keeping the connection alive in the following ways:
### 1. **Use a `SqlCommand` with a Keep-Alive Query**
You can periodically execute a li... | 13,398 | [
{
"from": "human",
"value": "Update: Looks like the query does not throw any timeout. The connection is timing out.\nThis is a sample code for executing a query. Sometimes, while executing time consuming queries, it throws a timeout exception.\nI cannot use any of these techniques:\n1) Increase timeout.\n2)... |
I'm porting an existing .NET 3.5 application into a plug-in for Eclipse.
I want to have my custom UserControl, written in C#, embedded within Eclipse; I've exported it successfully as a COM Control, and it works well in Eclipse Europa.
In Ganymede, it seems the OLE load code has changed, and what originally worked in E... | It sounds like you're dealing with a challenging interoperability issue between your .NET UserControl and Eclipse Ganymede's OLE handling. Since you're already successfully using COM with your control in earlier versions, the differences you're encountering could be due to how Ganymede manages OLE controls compared to ... | 16,552 | [
{
"from": "human",
"value": "I'm porting an existing .NET 3.5 application into a plug-in for Eclipse.\nI want to have my custom UserControl, written in C#, embedded within Eclipse; I've exported it successfully as a COM Control, and it works well in Eclipse Europa.\nIn Ganymede, it seems the OLE load code h... |
I would like to use the 7-Zip DLLs from Delphi but have not been able to find decent documentation or examples. Does anyone know how to use the 7-Zip DLLs from Delphi?
| Using 7-Zip's DLLs from Delphi involves loading the DLLs, making the appropriate function calls, and handling the structures defined in the 7-Zip SDK. Below is a simplified guide to help you get started with using 7-Zip in Delphi.
### Prerequisites
1. **7-Zip DLLs**: You need to have `7z.dll`, `7zxa.dll`, or `7z.dll` ... | 13,646 | [
{
"from": "human",
"value": "I would like to use the 7-Zip DLLs from Delphi but have not been able to find decent documentation or examples. Does anyone know how to use the 7-Zip DLLs from Delphi?\n"
},
{
"from": "gpt",
"value": "Using 7-Zip's DLLs from Delphi involves loading the DLLs, making ... |
I have backups of files archived in optical media (CDs and DVDs). These all have par2 recovery files, stored on separate media. Even in cases where there are no par2 files, minor errors when reading on one optical drive can be read fine on another drive.
The thing is, when reading faulty media, the read time is very, v... | Controlling the number of read retries for optical drives on Linux and Windows can be somewhat involved, as it typically requires either kernel-level access or specific configurations in user-space tools. Here are some methods you can explore for both operating systems:
### On Linux:
1. **Using `hdparm` or `sg` comma... | 16,263 | [
{
"from": "human",
"value": "I have backups of files archived in optical media (CDs and DVDs). These all have par2 recovery files, stored on separate media. Even in cases where there are no par2 files, minor errors when reading on one optical drive can be read fine on another drive.\nThe thing is, when read... |
I'm trying to access the Facebook API Admin.getMetrics method via jQuery. I'm correctly composing the request url on the server side (in order to keep my app secret secret). I'm then sending the url over to the browser to be request using jQuery.getJSON().
Facebook requires that I send a copy of all of my request param... | To resolve the issue you're facing with Facebook's API and jQuery's handling of JSONP requests, you need to ensure that you can explicitly define the name of the callback function that jQuery uses. Fortunately, jQuery allows you to customize the name of the callback parameter used in JSONP requests.
By default, jQuery... | 19,636 | [
{
"from": "human",
"value": "I'm trying to access the Facebook API Admin.getMetrics method via jQuery. I'm correctly composing the request url on the server side (in order to keep my app secret secret). I'm then sending the url over to the browser to be request using jQuery.getJSON().\nFacebook requires tha... |
Would it be wwwroot, C, the root virtual directory where the assets are hosted, or the same folder that the assets are in?
Meaning if I have a virtual directory 'virdir' with a sub directory 'swf', which is really like C:\somedir\assets\swf\, where would the crossdomain.xml need to go so that my swf app on a different ... | To allow your SWF application on a different server to access the assets in your virtual directory, you need to place the `crossdomain.xml` file at the root of the virtual directory that serves the assets. In your case, if you have a virtual directory named `virdir`, the `crossdomain.xml` file should be placed in the f... | 21,259 | [
{
"from": "human",
"value": "Would it be wwwroot, C, the root virtual directory where the assets are hosted, or the same folder that the assets are in?\nMeaning if I have a virtual directory 'virdir' with a sub directory 'swf', which is really like C:\\somedir\\assets\\swf\\, where would the crossdomain.xml... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.